fix(config): unfreeze bundled ckb-tui version for upgraded installs - #480
Merged
Conversation
Releases up to 0.4.10 wrote the entire merged settings object on any `offckb config set`, freezing the then-current bundled ckb-tui version (v0.1.3) into settings.json. After upgrading offckb, the frozen value overrode the new shipped default, so affected users never moved to v0.1.4 — and the stale-binary digest check compares against the configured version, so it never triggered a reinstall for them either. readSettings now upgrades a persisted ckb-tui version that is older than the shipped default (a newer hand-set version is still respected, and unparseable values are left for install-time validation), and writeSettings no longer persists the version when it merely equals the default, so future default bumps flow through. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughSettings now migrate older persisted bundled ChangesSettings version migration
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
RetricSu
added a commit
that referenced
this pull request
Jul 31, 2026
Merge pull request #480 from ckb-devrel/agent/claude-bear/19afdb3b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Releases up to 0.4.10 wrote the entire merged settings object back to
settings.jsonon anyoffckb config set(proxy, ckb-version, etc.), freezing the then-current bundled ckb-tui version (v0.1.3) into the user config. After upgrading offckb, that frozen value overrides the new shipped default — and the stale-binary digest check from #476 compares against the configured version, so it never triggers a reinstall either. Result: any user who ever ranconfig setstays on ckb-tui v0.1.3 forever, even after #476 ships.Fix
readSettings: if the persisted ckb-tui version is older than the shipped default, upgrade it in memory (a newer hand-set version is still respected; unparseable values are left for install-time validation to report).writeSettings: no longer persists the ckb-tui version when it merely equals the default, so future default bumps flow through to existing installs instead of being frozen again.Tests
tests/setting.test.tswith 9 cases covering: frozen old version upgraded, newer hand-set version respected, unparseable value preserved, default version not written back onconfig set, and round-trip behavior.tscandeslintclean.Follow-up to #476 — recommend shipping both in the next release.