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:
@@ -62,10 +62,10 @@ export interface OpenChatInActivePaneEvent {
|
||||
chat_id: string;
|
||||
}
|
||||
|
||||
// v1.9: client-side event fired by the sidebar Settings button when a
|
||||
// session is currently mounted. Session.tsx subscribes and calls
|
||||
// panesHook.openOrFocusSettingsPane(). Sidebar handles the no-session case
|
||||
// by navigating to /settings (themes page) directly.
|
||||
// Client-side event fired by the sidebar Settings button when a session is
|
||||
// currently mounted. Session.tsx subscribes and calls
|
||||
// panesHook.toggleSettingsPane() (open on first click, close on second).
|
||||
// Sidebar handles the no-session case by navigating to /settings directly.
|
||||
export interface OpenSettingsPaneEvent {
|
||||
type: 'open_settings_pane';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user