Release ON: show_cli_sessions default-on for new installs (#3988) + symlink delete/rename guard (#4217) (#4230)
* fix(#3988): default show_cli_sessions to true for new installs, grandfather existing OFF Combines the best of #3997 (rodboev) and #4222 (Sanjays2402): - config.py default flipped True so NEW installs surface CLI/TUI/Telegram/ Discord/Hermes One sessions in the sidebar without hunting for the toggle. - load_settings() backfill grandfathers ESTABLISHED installs OFF: when the saved settings predate the flip (onboarding_completed True + key absent), pin False so an existing user's sidebar doesn't silently change. Fresh installs get True. - Default-true hydration at every read site (config.py / boot.js / panels.js checkbox) via the !==false idiom — no config-ON-but-UI-OFF mismatch (#4006 class). - 10 tests: config default, bool-key round-trip, grandfather matrix (fresh/mid-onboarding/established-absent/explicit-true/explicit-false/ save-preserves-grandfather), and both frontend hydration sites. Co-authored-by: Rod Boev <rod.boev@gmail.com> Co-authored-by: Sanjays2402 <Sanjays2402@users.noreply.github.com> * fix(#4217): guard /api/file/delete and /api/file/rename against symlink targets * chore(release): stamp v0.51.427 (Release ON) for #3988 + #4217 * chore: drop unused imports (ruff F401) in absorbed test files * fix(#4217,#3988): address review — dangling-symlink ordering + boot.js catch fallback Greptile review on #4230 + the related-PR reviews surfaced two fixes on the shipped code: 1. (#4217) _handle_file_delete/_handle_file_rename checked target.exists() BEFORE is_symlink(), so a DANGLING workspace symlink resolved to a missing target -> misclassified as 404 'File not found' and left permanently undeletable/unrenameable. Moved the no-follow is_symlink() guard before the follow-based exists() check in both handlers. +2 dangling-symlink tests. 2. (#3988) boot.js settings-load-FAILURE catch block hardcoded _showCliSessions=false, inconsistent with the new True default (the #4006 catch-block-fallback class). Now defaults true. +1 test pinning the fallback. Both confirmed by the new tests (20/20 in the two files). * fix(#3988,#4217): address Opus review — broaden grandfather signal + move-handler parity Opus #4230 ship-review surfaced 2 LOW findings, both now fixed in-line: 1. (#3988) The grandfather keyed only on onboarding_completed, so a CLI-configured user who tweaked a WebUI setting but never ran the wizard would get flipped ON (and onboarding.py later auto-persisting onboarding_completed=True would make it permanent). Now: established = show_cli_sessions absent AND (onboarding_completed OR any persisted setting other than a falsy onboarding flag). A genuinely new / still-mid-onboarding file still falls through to True. +1 test. 2. (#4217) _handle_file_move still checked exists() before is_symlink() — the same dangling-symlink-404 bug just fixed in delete/rename. Reordered for parity so a dangling symlinked source is rejected 400, not 404. 22 tests across the two files pass; ruff clean. --------- Co-authored-by: nesquena-hermes <agent@nesquena-hermes> Co-authored-by: Rod Boev <rod.boev@gmail.com> Co-authored-by: Sanjays2402 <Sanjays2402@users.noreply.github.com>
This commit is contained in:
7 files changed
+483
-11
No files matched your search
+2
-2
@@ -1848,7 +1848,7 @@ function applyBotName(){
|
||||
applyEmptyStateSuggestionPref();
|
||||
window._showTps=!!s.show_tps;
|
||||
window._fadeTextEffect=!!s.fade_text_effect;
|
||||
window._showCliSessions=!!s.show_cli_sessions;
|
||||
window._showCliSessions=s.show_cli_sessions!==false;
|
||||
window._showPreviousMessagingSessions=!!s.show_previous_messaging_sessions;
|
||||
window._soundEnabled=!!s.sound_enabled;
|
||||
window._notificationsEnabled=!!s.notifications_enabled;
|
||||
@@ -1959,7 +1959,7 @@ function applyBotName(){
|
||||
applyEmptyStateSuggestionPref();
|
||||
window._showTps=false;
|
||||
window._fadeTextEffect=false;
|
||||
window._showCliSessions=false;
|
||||
window._showCliSessions=true; // settings-load failed: mirror the True config default (#3988)
|
||||
window._soundEnabled=false;
|
||||
window._notificationsEnabled=false;
|
||||
window._whatsNewSummaryEnabled=false;
|
||||
|
||||
Reference in new issue
Block a user