Skip to content

Let Settings switch off Changed on disk and Recently viewed (#684) - #787

Merged
BattermanZ merged 1 commit into
developmentfrom
feature/684-sidebar-section-switches
Nov 14, 2026
Merged

BattermanZ merged 1 commit into
developmentfrom
feature/684-sidebar-section-switches

Conversation

@BattermanZ

Copy link
Copy Markdown
Member

Closes #684

Summary

Two instance settings in a new Settings section, 02 Sidebar, both on by default:

 Settings / This server
   01 Notes handling
+  02 Sidebar
+       Show Changed on disk   HATCHDOOR_SIDEBAR_CHANGED_ON_DISK=true
+       Show Recently viewed   HATCHDOOR_SIDEBAR_RECENTLY_VIEWED=true
-  02 Agent access (MCP)  … 05 Usage report
+  03 Agent access (MCP)  … 06 Usage report
 <AppSession> (App.tsx)
+  useSidebarSections({ settingsEnabled, demoMode })   # features/settings/sidebarSections.ts
   <ExplorerPane sections>                              # sidebar and phone drawer
+    {changedOnDisk && <ChangesPanel>}
+    {recentlyViewed && <RecentNotesList>}
   <HomePage sections>
+    {changedOnDisk && <HomeList "Changed on disk">}
+    {recentlyViewed && <HomeList "Recently viewed">}

The hook reads GET /api/settings, again after any accepted save (patchSettings now dispatches SETTINGS_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

  • Before: both lists always drawn; no setting or variable turns them off.
    After: just check passed 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.
  • New tests: 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 in ExplorerPane.test.tsx, HomePage.test.tsx and SettingsPage.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/settings once more on load and on each return to the tab.

🤖 Generated with Claude Code

https://claude.ai/code/session_013rPDLgM3gtcXHDRDXajcub

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
@BattermanZ
BattermanZ merged commit 830d197 into development Nov 14, 2026
@BattermanZ
BattermanZ deleted the feature/684-sidebar-section-switches branch November 14, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant