diff --git a/.changeset/vertical-rail-detailed-rows.md b/.changeset/vertical-rail-detailed-rows.md new file mode 100644 index 000000000..950b2f7ad --- /dev/null +++ b/.changeset/vertical-rail-detailed-rows.md @@ -0,0 +1,20 @@ +--- +"aicodeman": patch +--- + +Vertical tab rail: detailed rows, and a rename cancel that no longer wipes the name. + +The vertical rail (Tab Orientation → Vertical) now draws the same per-session +line the home screen and the rich sidebar draw — when the session was created, +how long it has been in the state it is in, the folder it runs in, and a status +pill — instead of just the name. New per-device setting **Vertical Rail Rows** +(`tabRailDetail`, App Settings → Appearance → Tabs) with `Detailed` as the +default and `Simple (name only)` as the opt-out. A rail that has never been +sized now opens at 320px (the existing Wide preset) so the line fits; a narrower +rail sheds the created stamp below 288px and falls back to simple rows below +240px. + +Also fixes a data-loss bug in the inline tab rename that predates the rail: +pressing Escape cleared the input and blurred it, and the blur handler commits — +so cancelling a rename stored an EMPTY session name and the tab fell back to its +folder label. Escape now cancels without a request, in every layout. diff --git a/CLAUDE.md b/CLAUDE.md index 35e0addc9..4b4842a39 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -270,7 +270,7 @@ Frontend JS modules have `@fileoverview` with `@dependency`/`@loadorder` tags. L **Mobile tab strip scrolling** (issue #257): under 768px the tab strip is a horizontal scroller (desktop wraps to a second row instead), so the active tab can sit off-screen. Three rules keep it reachable and they only work together: `_updateActiveTabImmediate()` scrolls the selected tab into view via `computeTabScrollLeft()` (pure, in constants.js) using **rect math on the strip's own `scrollLeft`**, never `scrollIntoView()`, which would also scroll the document under a fixed header; `_fullRenderSessionTabs()` **restores `scrollLeft`** across the `innerHTML` rebuild, since ambient rebuilds (a task badge appearing, a session created elsewhere) otherwise snap a mid-swipe strip back to 0; and it re-reveals the active tab **only when it changed** (`_lastRenderedActiveTabId`), so browsing the far end of the strip is not undone by background renders. ⚠️ **The ACTIVE tab is the only one with action icons, and on a phone they can eat it**: `.session-tab.active .tab-name` reserves `min-width: 44px` in the ≤430px block, because a short session name rendered a 13px label against a 50px gear+close cluster, putting the tab's geometric CENTRE on the gear, so a thumb aiming at the tab opened Session Options instead of switching (measured at 360/393/430px; only long names cleared it). ⚠️ **The floor is set by the 10th tab onward, not by the tabs you can see**: `.tab-number` renders only for `_tabIdx < 9`, so tab 10 loses 16px + a gap off its left and its centre sits 10px further right. The centre clears the icons when `reserved > icons + rightEdge - leftRunUp - gap` (= 50 + 9 - 17 - 4 = **38px**), hit-testing snaps to whole pixels so 39px still lands on the gear, and the practical floor is 40px — a NUMBERED tab clears it at 20px, which is exactly why reasoning from the tabs on screen would put the centre back on the gear. `test/mobile-tab-tap-zones.test.ts` recomputes that inequality from the stylesheet, so widening the gear or the padding fails there rather than on a phone. The guarantee is centre-off-the-ICONS, not centre-inside-the-label (on a numberless tab it lands in the gap between them, which still switches). Non-active tabs keep their icons hidden and stay tappable end to end. ⚠️ Mobile no longer hoists the active session to the front of the strip: that reordering ran on full renders only, so tab order flipped depending on which render path fired, and it renumbered the Alt+N badges. Scroll-into-view replaces it; do not reintroduce it. -**Session list layout: header strip or left sidebar** (`sessionListLayout`, App Settings → Appearance → Tabs, default `header`; per-device policy — it IS in `SettingsUpdateSchema` and persists server-side, but `displayKeys` makes a device keep its own value): with many sessions the horizontal strip stops being scannable, so the list can move into a vertical `