Conversation
… fullscreen The recognized-global postinstall only short-circuited when tuiMode was already "fullscreen", so every update overwrote an explicit "regular" choice made through /settings. Treat an absent tuiMode as never-chosen (first-install fullscreen default is unchanged) and any explicit value as settled: later postinstalls leave it byte-identical. - installer: short-circuit on any defined tuiMode, not just fullscreen - tests: cover explicit-regular preservation, first-run default, and a later packages-only save + postinstall rerun keeping the choice - docs: README note and readme-reference install-time fullscreen section Fixes Gentleman-Programming#1017
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe installer now sets ChangesTUI mode preference preservation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The installer preserves explicit TUI preferences and self-heals missing or invalid values without affecting project-local installs; no concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
…ving them
Review found that short-circuiting on any defined tuiMode also preserved
corrupted or hand-edited values (null, empty string, typos), silently
pinning the user to Pi's regular-mode fallback with no log line, and
removed the previous self-heal to fullscreen. Recognized explicit modes
("regular", "fullscreen") remain settled; anything unrecognized falls
through to the documented fullscreen default again.
- installer: short-circuit only on recognized modes
- tests: byte-identity assertion for the rerun path plus 4 self-heal cases
- docs: README note and readme-reference now say "unset or unrecognized"
Suggested by adversarial review of Gentleman-Programming#1018.
Fixes #1017
Summary
The recognized-global postinstall used to overwrite any
tuiModethat was not already"fullscreen", so every package update silently reset an explicit"regular"choice (made through/settings) back to fullscreen. This PR makes the installer treattuiModeas a settled preference:tuiMode→ first-install default to"fullscreen"(unchanged experience for fresh installs).tuiMode("regular","fullscreen", or any written value) → installer returnschanged: falseand leavessettings.jsonbyte-identical.Already-fullscreen settings keep the exact current behavior (byte-identical, same inode), and unowned/project-local installs were never touched and still are not.
Changes
scripts/install-tui-mode-setting.mjs: short-circuit on any definedtuiModeinstead of only"fullscreen".tests/install-tui-mode-setting.test.ts:tuiMode(the actual defaulting scenario).regularis preserved across reruns (both recognized npm and Pi Git paths).README.md+docs/readme-reference.md: the install-time fullscreen note now states the default only applies when notuiModeis set, and that an explicit choice is preserved across updates.Test evidence
node --experimental-strip-types --test tests/install-tui-mode-setting.test.ts→ 50/50 pass (Node 22.14 local; CI runs Node 24).pnpm run typecheck→ no regressions against the recorded diagnostic baseline."tuiMode": "regular"surviveinstallTuiModeSetting()unchanged; settings withouttuiModegain"fullscreen".Notes for maintainers
GENTLE_PI_SKIP_TUI_MODE=1) while keeping the overwrite semantics, say the word and I will rework the branch.Summary by CodeRabbit
Documentation
Bug Fixes