mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-20 09:09:35 +02:00
feat(tabs): pin tabs to a Focus section on the vertical rail
A session or web-tab ref in the owner tab layout may now carry `focus: true`. "Add to Focus" in a row's menu (right-click on a web tab) sets it; the vertical rail then draws a shortcut to that tab in a pinned, collapsible "Focus" section at its top, while the row itself stays where it is. A click on a shortcut selects its tab, a right-click or the menu key offers "Remove from Focus". Model: `TabRef.focus?: true`, parsed strictly (only `true` or absent) and carried through normalization, every pure edit and the legacy-order projection; `setTabFocus()` is the pure helper. TabLayoutService needed no change and no route was added: the flag rides the existing `PUT /api/tab-layout`. Browser: `copyRef`/`normalizeLayout` keep `focus` the way they keep `placement` (the browser writes whole layouts, so a dropped field would be erased on every save), `setFocus` is a named operation through `createEditCoordinator` and replays on a 409, and `focusRefs()` (also on `project()`) lists what the rail can draw. The section is its own element in #tabRail above #sessionTabs, so it works on the flat rail (no named groups) as well as the grouped one, and shortcuts are never rows: no Alt+N badge, no tree item, no lineage anchor, no drag target. It is a list with one tab stop and Up/Down/Home/End between shortcuts. Collapse is per-device localStorage under its own key. A shortcut whose session closed or whose web tab is not open drops out; the server already prunes deleted refs. zh-CN strings added.
This commit is contained in:
1 parent
aa3730aace
commit
cde90a465b
15 files changed
+1819
-16
No files matched your search
@@ -23,6 +23,7 @@ export const BROWSER_TEST_GLOBS = [
|
||||
'test/tab-activation.browser.test.ts',
|
||||
'test/tab-layout-editing.browser.test.ts',
|
||||
'test/tab-rail-search.browser.test.ts',
|
||||
'test/tab-focus.browser.test.ts',
|
||||
'test/session-sidebar-ux.browser.test.ts',
|
||||
'test/session-options-responsive.browser.test.ts',
|
||||
'test/inline-rename.test.ts',
|
||||
|
||||
Reference in new issue
Block a user