You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem -- There is no way to enter edit mode or reset the titlebar layout. Users need a discoverable entry point for customization and a safety net to restore the default.
Approach -- Add a right-click context menu to the titlebar background with two items: "Customize" (enters edit mode) and "Reset" (writes the default titlebarLayout config). Edit mode is a boolean signal that, when active, visually decorates the five controls with dashed rings, suppresses all click handlers (popovers, dialogs), and renders a checkmark icon button at the rightmost edge. Escape key and the checkmark button both exit edit mode.
Scope -- in: context menu with "Customize" and "Reset", edit mode signal, visual treatment (dashed rings, suppressed clicks), checkmark exit button, Escape handler. out: drag-and-drop (next slice), actual reordering.
Assumptions -- The titlebarLayout setting from slice 1 is available. The edit mode signal is consumed by a later slice for DnD activation.
Acceptance Criteria
Right-clicking the titlebar background (not on a tab) shows a context menu with "Customize" and "Reset"
Right-clicking on a tab does NOT show the titlebar context menu
"Customize" sets the edit mode signal to true
"Reset" writes the default titlebarLayout to the settings store
In edit mode, each of the five controls displays a subtle dashed ring (1px border)
In edit mode, clicking a control does NOT open its popover or dialog
In edit mode, a checkmark icon button appears at the rightmost position in the titlebar
Clicking the checkmark exits edit mode (signal to false), checkmark disappears, right-slot buttons slide to fill
Pressing Escape while in edit mode exits edit mode
The edit mode signal is exported/accessible for consumption by the DnD slice
Testing Decisions
Test the context menu: right-click on titlebar background shows menu, right-click on tab does not. Test edit mode signal: "Customize" sets it, checkmark clears it, Escape clears it. Test that "Reset" writes the default config. Visual tests for the dashed ring can be handled with a Storybook state or a class-presence assertion.
Key Decisions
Edit mode is a process-global signal (not per-session) since the titlebar is a window-level surface
The context menu is native-style (no Kobalte popover), consistent with OS context menus
"Customize" and "Reset" are the only two items -- no tab-specific actions (separate concern)
Save-on-drop semantics: config saves immediately on each reorder, not on exit. Escape is "done," not "cancel"
Constraints & Invariants
Edit mode suppresses ALL button click handlers -- no popover or dialog can open during customization
The checkmark button is ephemeral -- only rendered during edit mode, never persisted in config
The context menu must not appear when right-clicking inside the tab strip (tabs may get their own context menu later)
Prior Art
titlebar.tsx -- the <header> element where the context menu attaches
titlebar-tab-strip.tsx -- the tab strip area that must be excluded from the context menu
chrome-dropdown.ts -- singleton signal to close any open dropdown when edit mode activates
Important
Problem -- There is no way to enter edit mode or reset the titlebar layout. Users need a discoverable entry point for customization and a safety net to restore the default.
Approach -- Add a right-click context menu to the titlebar background with two items: "Customize" (enters edit mode) and "Reset" (writes the default
titlebarLayoutconfig). Edit mode is a boolean signal that, when active, visually decorates the five controls with dashed rings, suppresses all click handlers (popovers, dialogs), and renders a checkmark icon button at the rightmost edge. Escape key and the checkmark button both exit edit mode.Scope -- in: context menu with "Customize" and "Reset", edit mode signal, visual treatment (dashed rings, suppressed clicks), checkmark exit button, Escape handler. out: drag-and-drop (next slice), actual reordering.
Assumptions -- The
titlebarLayoutsetting from slice 1 is available. The edit mode signal is consumed by a later slice for DnD activation.Acceptance Criteria
titlebarLayoutto the settings storeTesting Decisions
Test the context menu: right-click on titlebar background shows menu, right-click on tab does not. Test edit mode signal: "Customize" sets it, checkmark clears it, Escape clears it. Test that "Reset" writes the default config. Visual tests for the dashed ring can be handled with a Storybook state or a class-presence assertion.
Key Decisions
Constraints & Invariants
Prior Art
titlebar.tsx-- the<header>element where the context menu attachestitlebar-tab-strip.tsx-- the tab strip area that must be excluded from the context menuchrome-dropdown.ts-- singleton signal to close any open dropdown when edit mode activatesSource
Part of #684
Blocked by #686