fix: settings pane close affordance + sidebar toggle
The v1.9 settings pane had no way to dismiss once opened. ChatTabBar (which owns the per-pane close X for chat panes) is skipped for settings panes, and the pane header itself only rendered the maximize toggle (desktop-only). Mobile users had zero controls beyond the section tabs. Add three close paths: - X button in SettingsPane header, visible on mobile + desktop, sits next to the maximize toggle. Tap-target sized per the v1.6 mobile convention (max-md:min-h-[44px]). - Esc when the settings pane is the active pane and no input/textarea/ dialog has focus. Maximize-restore still wins when maximized. - Sidebar Settings button is now a strict toggle: opens on first click, closes on second. Renamed openOrFocusSettingsPane → toggleSettingsPane in the panes hook. Edge case: removing the settings pane when it's the only pane left falls back to an empty pane to preserve the "always one pane" invariant. In normal flow this is unreachable (the toggle only appends), but defensive against future entry points. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,11 +134,10 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
void api.projects.get(project.id).then(setProject).catch(() => {});
|
||||
return;
|
||||
}
|
||||
// v1.9: sidebar Settings button broadcasts this when a session is
|
||||
// mounted; we own the workspace pane state, so we open/focus the
|
||||
// singleton settings pane here.
|
||||
// Sidebar Settings button broadcasts this when a session is mounted;
|
||||
// toggleSettingsPane opens on first click, closes on second.
|
||||
if (event.type === 'open_settings_pane') {
|
||||
panesHook.openOrFocusSettingsPane();
|
||||
panesHook.toggleSettingsPane();
|
||||
}
|
||||
});
|
||||
}, [sessionId, editingName, navigate, project, panesHook]);
|
||||
|
||||
Reference in New Issue
Block a user