Repository navigation
Let Settings switch off Changed on disk and Recently viewed (#684) - #787
Merged
Merged
Conversation
A new Settings section, 02 Sidebar, holds two instance switches, HATCHDOOR_SIDEBAR_CHANGED_ON_DISK and HATCHDOOR_SIDEBAR_RECENTLY_VIEWED, both on by default and pinnable from .env like any live setting. A list switched off is gone from the sidebar, the phone drawer and Home; what feeds it keeps running, and its stored fold is left for when it returns. The shell reads the switches through useSidebarSections, from GET /api/settings, again after any accepted save (patchSettings now dispatches SETTINGS_SAVED_EVENT) and when the tab comes back into view. It caches the last answer so a reload never flashes a hidden list. A demo has no Settings, so it shows both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rPDLgM3gtcXHDRDXajcub
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.
Closes #684
Summary
Two instance settings in a new Settings section, 02 Sidebar, both on by default:
The hook reads
GET /api/settings, again after any accepted save (patchSettingsnow dispatchesSETTINGS_SAVED_EVENT) and when the tab comes back into view, and caches the last answer so a reload never flashes a hidden list. A list switched off draws nothing; what feeds it keeps running and its stored fold is left alone. A demo has no Settings, so it shows both.Evidence
After:
just checkpassed in full mode. A live Playwright pass on the dev app passed 76 of 76 checks at phone and desktop, light and dark: Sidebar is section 02 with both switches on; a save hides Changed on disk beside Settings without a reload; its fold survives and it comes back unfolded; each of the four states is right in the sidebar or phone drawer and on Home; with both off the tree comes first.the_sidebar_lists_are_switches_that_default_to_on(Rust),sidebarSections.test.ts, and the Allow hiding or disabling the Changed on disk and Recently viewed sidebar sections #684 cases inExplorerPane.test.tsx,HomePage.test.tsxandSettingsPage.test.tsx.Merge Danger
Door: two-way
Both settings default to on, so nothing changes on an existing instance until someone turns one off. A rollback leaves two unused keys in
settings.json.Blast Radius: sidebar
The Settings section numbers after 01 move up by one, and the shell fetches
GET /api/settingsonce more on load and on each return to the tab.🤖 Generated with Claude Code
https://claude.ai/code/session_013rPDLgM3gtcXHDRDXajcub