Skip to content

fix(chat): share the rename/regenerate title control with split-view pane headers (#9727) - #10140

Merged
bolichen97 merged 1 commit into
mainfrom
fix/split-pane-header-rename-controls-9727
Sep 15, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/split-pane-header-rename-controls-9727

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In split view every pane header showed only the session title: the rename (Pen / inline editor) and auto-rename (Sparkles) controls the single-session header offers were missing, so a session could not be renamed without leaving split view. The single-session header's inline-edit + regenerate block now lives in one shared SessionTitleControl, mounted by both ChatPage and ChatPane, so the two headers cannot drift again.

Closes #9727

What changed

  • website/src/pages/chat/SessionTitleControl.tsx (new): the memory-mode glyph, the title (click / Enter → inline editor), the Pen revealed on group/header hover, and the Sparkles button (api.generateTitle → sseSlotTitle, per-slot spinner that keeps the "Auto-title…" label beside it as a role=status live region; once the generated title lands, the previous name is offered back inline — an "Undo" button (pages.chatPage.undo_auto_title, 13 catalogs) that TAKES THE AUTO-TITLE BUTTON'S PLACE while the offer stands (so the row never holds more than two actions: rename + one of Auto-title / Undo), visible at rest, not hover-gated, whose aria-label/tooltip name the title it restores; pressing it goes through the normal rename path (optimistic + renameSlot + recovery). The baseline it restores is the title on screen at the moment the generated one replaces it — not the one at click time — so a rename that landed during the generation (another pane, another client via SSE) is what Undo brings back; what the server itself replaced is only knowable server-side and is Session title writes are last-writer-wins: generate-title can overwrite a concurrent manual rename #10149's conditional write. The offer is one-shot and keyed by slot, and it is a WINDOW rather than a permanent state (it occupies the Auto-title button's place, so a user who wants to re-roll a disliked name must not have to Undo first): it ends when used, after the session-move undo bar's horizon (MOVE_UNDO_MS, 8 s — one undo window across the product, not a second constant; and it runs on that bar's clock, literally: the deadline/hold/remainder logic is hooks/useHeldWindow.ts, extracted from useMoveUndo and consumed by both, so the product has one held-window implementation (FP lane on dc1ae57ac); the window is HELD while the pointer is over the row or focus is inside it (tracked apart, either holds — a pointer leaving cannot release a hold keyboard focus still owns; GPT lane on dc1ae57ac) and resumes with its remainder when the hold lifts — the tooltip that persuades the user to press promises the way back, so the window must not run out under a hand still weighing the new name; UX lane on 05b6a996e. Re-rolling under a parked pointer is Undo then Auto-title, two clicks), when the user opens the editor, when the title moves on (a remote or SSE rename — and it ENDS then, it is not merely hidden: a title that bounces away and back to the generated string inside the window cannot bring a stale Undo back that would write the pre-generation name over the intervening rename; GPT lane on ee8eb9ab0), when the user starts another rename or generate, or when the header re-targets another slot (and a generation completing for a slot the control no longer shows creates no offer). The server also pushes the generated title over the slots stream and that push can land before the POST resolves; when the store already shows the generated title at landing, the baseline falls back to the title at click time so the offer is still made. Requested as a BLOCK by the UX lane on ab85844d6 — cold readers named the control correctly and still refused to press it for fear of overwriting a hand-typed name with no way back; finding and fix recorded at fix(chat): share the rename/regenerate title control with split-view pane headers (#9727) #10140 (comment)) whose hover-revealed state now carries visible text — Auto-title (pages.chatPage.auto_title, translated in all 13 catalogs) — so the glyph is no longer an unexplained sparkle next to the composer's (requested by this PR's UX review lane on head 2b28f0319 — "Auto-rename is undiscoverable and unnerving", a blind reader could not decode the icon-only glyph with the tooltip present; finding and fix recorded at fix(chat): share the rename/regenerate title control with split-view pane headers (#9727) #10140 (comment)); the hover-revealed button sits at 70% opacity with muted text (not the 40% the icon-only glyph used: with a text label beside it that read as "disabled" to every cold reader across five UX rounds — the lane's Watch items and their recorded dispositions: a1ffc8fb4, 76b97d3e9, bb6f98937, 7f3636afd, 841f1251b; full opacity on hover). Keyboard parity with hover (UX round on c2bcab101): the Pen reveals when the title has focus-visible (group/title on the title, group-focus-visible/title:opacity-60 on the Pen) and the Auto-title button at full opacity on its own focus-visible, so a Tab through the header never draws a focus ring around nothing; the aria-label/tooltip say "Regenerate title with LLM — the current name can be restored with Undo" (13 catalogs): reversibility is stated at the decision point, not only after the fact — the UX lane's second BLOCK on 357079fc3 was that readers understood the Undo state once shown and still would not dare the first press. Commit on blur/Enter when the trimmed draft is non-empty and differs → sseSlotTitle (optimistic) + api.renameSlot. A refused rename carries the failure semantics fix: revert refused optimistic title on header rename failure (#10203) #10237 landed for the main header (Header rename failure keeps the refused optimistic title (mirror of #10151) #10203), ported into the shared control so both headers have exactly one (with one addition: a SUPERSEDED attempt's late refusal is not reported — the user has already renamed again, and a late notice would undo the clearing the newer attempt's start performed on the host; the recovery still runs, gated the same way) (the sidebar row rename is a separate spelling, tracked in Sidebar rename failure recovery is a no-op (invalidateQueries on unregistered 'chat-slots' key) #10151): the control re-reads the server truth (deduped through queryClient.fetchQuery(['chat-slots']), so overlapping failures share one request) and applies ONLY this slot's title — never the whole snapshot, whose late fulfillment could clobber a newer write of another slot; a recovery applies only while ITS OWN attempt is still the slot's latest generation AND the store still shows its refused value, so a delayed recovery can never overwrite a newer attempt's outcome, including a newer confirmed rename to the identical string; and when the re-read fails too (offline / expired auth takes renameSlot and chatSlots down together) it falls back to a local revert to the per-slot recovery baseline — the last CONFIRMED title, refreshed at commit time from any store title that is not one of this slot's own pending optimistic values. The per-slot record (baseline / inflight / gen) is module-level and keyed by slot, not per instance; inflight is a per-title count rather than a set, so two overlapping attempts at the identical string both stay marked until each settles and neither can be mistaken for a confirmed baseline; and baseline advances on a confirmed write only when that confirmation is newer than the last one applied (confirmedGen), not only when the attempt is still the slot's latest — so a rename that succeeds while a later one is in flight is still recorded, and a failure of that later one falls back to it rather than past it to a title the server no longer holds (GPT round on 2b28f0319). It is module-level because the main header re-targets one instance across slots and split view mounts one per pane, and the guard is about the slot. The host is notified once, at rename rejection, whichever way the recovery then settles. Escape cancels; IME-safe Enter via the existing useImeGuard. The editor is mounted per edit, so opening seeds the draft and closing drops it; an untouched editor writes nothing on blur (it compares against the seed it opened with, not the live title, so a generated or remote rename that landed while the editor was open is never overwritten by the stale seed). The editor caps the draft at 200 characters — the rename route keeps title.strip()[:200] (chat_title.py), so without the cap a longer name showed whole in the optimistic write and lost its tail only on the next re-read (GPT lane on 05b6a996e; same figure as the task-run rename field in ProjectsPage, and JS maxLength counts UTF-16 units against the server's code points, so the client cap is never the looser one). Failures go to the host's onError(message, lead); the control renders no error surface of its own. Optional editing/onEditingChange let a host own the flag; compact switches to pane typography.
  • ChatPage.tsx: the inline block — including the renameRecoveryRef recovery fix: revert refused optimistic title on header rename failure (#10203) #10237 added to it — is replaced by <SessionTitleControl editing={editingTitle} onEditingChange=… onError={showActionError} />. editingTitleSlot (the slot-pinned editor flag, also opened from the header menu and used for the z-index lift) stays in ChatPage; the host clears its actionError notice on onAttempt, as ChatPane does, so a retry never sits under a stale rename failure; titleDraft, generatingTitleSlots, cancelTitleRef, titleIme, renameRecoveryRef and the now-unused imports are removed; the fix: revert refused optimistic title on header rename failure (#10203) #10237 recovery is ported into the shared control and then HARDENED there (not verbatim: inflight becomes a per-title count and a confirmedGen baseline rule is added — both described under the SessionTitleControl bullet with the GPT findings that required them, and pinned by the two new fallback tests); main's ChatPage.titleRenamePin.test.tsx (the six Header rename failure keeps the refused optimistic title (mirror of #10151) #10203 cases) is kept unchanged as the pin that every behaviour the header had before still holds — the hardening only changes outcomes in races that pin never exercised (a later attempt failing after an earlier one succeeded). Markup is unchanged apart from the shared hover state: same class strings, same aria-labels/titles, same i18n keys, plus the visible "Auto-title" text label the control now renders next to the Sparkles button on hover (see the screenshots below). One micro-change: the control is mounted only when activeSlot is set, so with no active session the header renders no title cluster (previously an empty string plus a hover Pen); the header block itself already lives inside the activeSlot branch, so this is not reachable in practice.
  • ChatPane.tsx: the bare title span becomes <SessionTitleControl compact />; the pane bar gains group/header as the hover target; a new inline ErrorNotice (chat-pane-title-error) reports a failed rename/regenerate in the pane whose control failed, and is cleared the moment a new rename/regenerate starts on that pane (onAttempt), so a stale "Couldn't rename" never sits beside the spinner of the attempt superseding it (UX round on 7f3636afd, reader shot-08). Members-page DM threads render frameless (host owns the header) and are untouched.
  • i18n: one new key, pages.chatPage.auto_title ("Auto-title"), added to all 13 catalogs (en-XA regenerated with gen-pseudolocale.mjs); everything else reuses the existing pages.chatPage.* keys.
  • sessionTitleSqueeze.test.ts (source-contract test for the phone-width title shrink) now reads ChatPage + the shared control, since the title cluster moved.
  • website/src/hooks/useHeldWindow.ts (new) + useMoveUndo.ts: the held countdown (deadline, hold, remainder) that useMoveUndo ran inline is now a hook of its own, consumed by useMoveUndo (hold keyed to the offer id, as before) and by SessionTitleControl (hold = pointer over the row or focus inside it). Behaviour of the session-move bar is unchanged and its hold/resume test (ChatSidebar.moveUndo.test.tsx) still passes; the one addition, needed by the header, is that a fresh offer arriving under a standing hold holds a FULL window rather than a remainder read off the previous offer's deadline.
  • docs/feature-map/README.md: the Session title row (not the Sessions row — GPT lane on 357079fc3) now owns pages/chat/SessionTitleControl.tsx, names its two hosts (ChatPage.tsx, ChatPane.tsx) and the sidebar row's own rename, and its Reach column covers hover → Auto-title in the single-session header and every split-view pane header, plus the Undo window.
  • Tests: SessionTitleControl.test.tsx (23: render, click→editor→Enter commits via renameSlot + optimistic store, unchanged/blank draft is a no-op, an untouched editor writes nothing even after the title moved on while open, Escape restores without API, Sparkles→generateTitle applies title, spinner while generating, rename refused + re-read succeeds → onError + the server title replaces the optimistic one, rename refused + re-read fails → local revert to the confirmed title, exactly one onError (the fix: refetch slots when a sidebar rename is refused (#10151) #10172 / Header rename failure keeps the refused optimistic title (mirror of #10151) #10203 double failure), a slow OLDER rename failing after a NEWER rename landed leaves the newer title and reports nothing, a delayed recovery never overwrites a newer confirmed rename to the identical string (generation guard), a later failed rename falls back to the last CONFIRMED write, never past it (A→X succeeds while X→Y is in flight; Y and its re-read fail → X), generate failure→onError + title unchanged, memory glyph, the editor opens with the whole title selected, backward-anchored, scrolled to the start, a one-shot Undo after a generated title lands restores the previous name through the rename path and stands in the Auto-title button's place, the Undo offer ends when the title moves on or another attempt starts, the Undo baseline is the title on screen when the generated one lands, not the one at click time, retargeting the control ends the offer and a late completion for the old slot creates none, Undo is offered even when the slots stream pushed the generated title before the POST resolved, the offer is a window: closes on its own and when the editor is opened, no Undo when the generated title equals the current one, keyboard focus reveals what hover reveals) and ChatPane.headerRename.test.tsx (8: header renders the control inside group/header, rename via renameSlot(slotKey, …), Escape, generateTitle(slotKey), failed rename re-pulls the server title + shows chat-pane-title-error, rename and re-read both fail → the pane reverts locally and the notice stays visible, failed regenerate shows the notice and leaves the title, a new attempt clears the previous failure notice). ChatPage.titleRenamePin.test.tsx from main (12, incl. the six Header rename failure keeps the refused optimistic title (mirror of #10151) #10203 recovery cases) runs unchanged against the shared control, plus one added: 'a new rename attempt clears the previous rename failure from the header notice'.
  • website/scripts/capture-pane-header-autotitle.mjs: fixture harness (real built SPA + stubbed /api/** through the shared scripts/lib/split-pane-fixture.mjs stubSplitPanes wiring, with only the mc-lang seed and the rename/generate intercepts local; two-pane split via mc-split-layouts, no pod) that produces the hover frames (asserting the hovered pane's regenerate button is visible and carries the catalog text while the pane at rest does not; en and zh-CN) and the rename story on the current control: editing on a long title (asserts whole-title selection and scrollLeft === 0), the refused rename (PATCH …/title → 500; asserts the notice and the rolled-back title) the held generate-title spinner (asserts the label beside it), the undo offer after the generated title lands (asserts it is fully visible at rest, presses it, asserts the previous title is restored and the offer gone), and the two single-session-header frames (hover, editing; asserts exactly one hover group and the selected-at-start editor). The rest and renamed frames and the recording are from the pod harness.
  • Evidence (eight PNGs + the WebM below) is attached to this description with gh pr edit --attach (permanent user-attachments URLs, per chore: upload PR evidence with gh --attach instead of committing it #10010) and is NOT in the diff; temp-screenshots/ stays gitignored and is only where the harness writes locally.
  • website/scripts/capture-pane-header-rename.mjs: pod evidence harness against a REAL gateway (2×2 grid; drives and asserts hover, edit, commit, a route-forced 500 on the rename for the rollback, and a held regenerate response for the spinner; shoots only the frames a pod is needed for — the 2×2 rest frame, the committed rename against the real store, and the click → edit → Enter recording; the four states the fixture harness renders are asserted here but not re-shot, one source per frame).

What was tested

  • Head e20bc7346 (rebased onto current main at f739452 — past fix: revert refused optimistic title on header rename failure (#10203) #10237, fix(chat): keep shell controls reachable and show focus in split view #10585, the feat: unify panel controls and add workspace fullscreen #10119 revert in revert: unify panel controls and add workspace fullscreen (#10119) #10626 and fix(sidebar): show the crew's own refusal when a peer-session adopt fails #10735, whose slotIsRemoteBound import in ChatPage.tsx was the only conflict; select-all-on-open added on top): npx tsc -b clean; eslint clean on every touched file; I18N_BASE_REF=origin/main node scripts/i18n-check.mjs ok; FEATURE_MAP_BASE_REF=origin/main python3 scripts/check_feature_map.py ✓.
  • Vitest, targeted: SessionTitleControl.test.tsx (25 — the 14 from the previous round plus 'caps the draft at the 200 characters the rename route keeps', 'the Undo window is held open while the pointer is over the row or focus is inside it, and resumes where it stopped' and 'opens with the whole title selected, so a long name shows its start rather than a scrolled tail', pinning the select-all-on-open the UX round on 15c5cbc04 asked for; it changes the editing default on BOTH hosts, the main header included, since the editor is shared) + ChatPane.headerRename.test.tsx (8, incl. 'a new attempt clears the previous failure notice') + ChatPage.titleRenamePin.test.tsx from main (12, incl. the six Header rename failure keeps the refused optimistic title (mirror of #10151) #10203 recovery cases, + 1 added) + sessionTitleSqueeze + the whole src/i18n suite (catalog parity, glossary, dead keys…) — 721 green in the last run; every ChatPane.* test file green on main's current data-pane-title-row header (1001 across the targeted set in the last run). The five session-move undo suites that exercise useMoveUndo through the extracted clock (ChatSidebar.moveUndo, ChatSidebar.moveUndoStale, ChatSidebar.folderMoveUndo, ArtifactsPage.moveUndo, MoveUndoBar) — 97 green together with the three title suites. Full suite left to CI.
  • Real pod (kirocrew pod up on this worktree, session_grid on, four sessions in a 2×2 grid): every pane header carries the Sparkles button, hover reveals Pen + Sparkles, click opens the seeded editor, Enter renames — the new title appeared in the pane and landed in the pod's session file server-side. A second rename with the PATCH forced to 500 re-pulled the server title and showed the in-pane notice; Sparkles with the response held showed the per-pane spinner and applied the title on release. The pod frames below were captured on c90cc4dd4; the two pane-header-autotitle-* frames were captured on this head with the fixture harness (the pod's user systemd bus is not reachable from the agent sandbox after a gateway restart), and they are the frames that show the new label.

UX CONCERNS

  • Button-count rule. The pane bar's right group (split right / split down / close) is grandfathered on main and is not touched. The title control adds one Sparkles action to the LEFT title group, separated from the right group by the flex-1 spacer — the same left/right structure the single-session header already has. If the lane reads the whole bar as one row, the answer is that the cap is per visual group and the title group is the established header pattern being ported, not a new row.
  • Sparkles legibility. The UX lane blocked on the icon-only glyph; the hover-revealed state now shows "Auto-title" beside it in both hosts (shared control, so the main header inherits it). The composer's sparkle is a different control with its own label.
  • Hover-only affordance in a pane. Pen and the labelled Sparkles are opacity-0 until the bar is hovered, exactly as in the main header. Reviewers may want a persistent low-opacity state under (hover: none); that would be a change to the main header too, so it is left for a follow-up rather than diverging the two.
  • Editor width in a narrow pane. The inline input sizes itself from the draft length (capped, flex-1 min-w-0) as in the main header; in a quarter-width pane a long title can still scroll while typing (see the editing frame). What did change (requested by this PR's UX review lane on head 15c5cbc04, reader shot-03: a tail-scrolled editor read as "part of the name is already deleted" — finding and fix recorded at fix(chat): share the rename/regenerate title control with split-view pane headers (#9727) #10140 (comment)): the editor opens with the whole title selected, anchored BACKWARD (setSelectionRange(0, len, 'backward') + scrollLeft = 0): a plain select() keeps the selection focus at the end and Chromium still scrolls to the tail, which the first fixture capture showed; with the focus at the start the input scrolls to 0 and the START of a long title is what shows. Retype / append-after-End stay one keystroke each. Routed through the IME guard's focus handler, which owns the input's onFocus; pinned by a new SessionTitleControl test (selection range, direction and scrollLeft) and by the fixture harness's scrollLeft === 0 assertion before the editing frame.
  • Recording. The title → editor → title transition is the same in-place swap the main header already ships (span ↔ input in one cluster); pane-header-rename.webm below records click → edit → Enter in one pane. Playwright's bundled ffmpeg has no GIF encoder on this host, so the clip is WebM (the harness writes a GIF beside it when a system ffmpeg is present).
  • Concurrent writers (out of scope, tracked). A refused rename now never leaves the refused title on screen (server re-read, then local revert), and a stale attempt never overwrites a newer one. What remains is server-side: title writes are last-writer-wins there: a generation that completes after another client's manual rename overwrites it, and two clients renaming at once race. This is the single-session header's and the sidebar's existing behaviour, ported unchanged; a client-side guard cannot fix it because the server persists the generated title before the client sees it. Needs a server-side title version / conditional write — filed as Session title writes are last-writer-wins: generate-title can overwrite a concurrent manual rename #10149.
  • Same slot in two panes. The generating spinner is per control instance (an exact port of ChatPage's per-slot Set). If one slot is open in two panes, only the pane that pressed Sparkles spins; both receive the new title through the store.

Pattern harvest

Rule candidate: source-contract test. Pattern: two hosts render the same UI concept (here the session title) from separately hand-written JSX — the pane header was a copy that never received the affordances added to the original. A shared component is the fix; a pin that fails when a second title-rendering header appears outside the shared control would catch the next copy. Not generalizable as a lint rule: "same concept, two renderers" is a review judgment, not a syntactic shape.

Screenshots

2×2 split at rest (controls hidden, titles only):

rest

Hover on the left pane's bar — Pen, Sparkles and the Auto-title label revealed beside the title (fixture harness, current control; the right pane stays at rest):

hover

Hover with the visible Auto-title label (fixture harness, two-pane split; left pane hovered, right at rest) — en and zh-CN:

hover with Auto-title label

hover with Auto-title label, zh-CN

Title clicked — inline editor open in that pane on a LONG title: the whole title is selected and the input is scrolled to its START (scrollLeft 0, asserted by the harness), so the beginning of the name is what shows:

editing

Enter committed (server accepted the PATCH) — the pane shows the new title at rest, controls hidden (fixture harness, current control; replaces the pre-label pod capture the UX lane flagged on dc1ae57ac):

renamed

Server refused the rename (PATCH …/title answered 500): title rolled back to the previous name in the header, in-pane error notice above the composer:

rename error

Auto-title pressed, generate-title response held: the pane's Auto-title button becomes a spinner that keeps the label ("Auto-title…", role=status), so busy-naming is named rather than an anonymous glyph (UX round on d2bdd0b85, reader shot-08):

generating

Generated title landed — the previous name is offered back inline in the Auto-title button's place, visible at rest; the harness then presses it and asserts the previous title is restored and the offer gone:

undo offer

The SAME control on the single-session header (ChatPage, non-compact host; fixture harness, no split layout): hover reveals Pen + Sparkles + Auto-title, and the editor opens on a long title selected from its start:

main header hovered

main header editing

Recording — click → inline editor → Enter in one pane: pane-header-rename.webm

@CrysisDeu
CrysisDeu requested review from a team and buluoray September 11, 2026 15:55
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of e20bc734681d8b6951db833572201c038b647b3d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Shared control extraction fixes the drift at its root, and every scope addition (Undo, label, held-window hook) is disclosed, tested, and evidenced.

[DESIGN-REVIEWED] e20bc73

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of e20bc734681d8b6951db833572201c038b647b3d — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All evidence is read and verified where the repository can verify it: the server rename cap (src/kiro_crew/dashboard/chat_title.py:1353 does title.strip()[:200]), the ProjectsPage 200-char sibling, the 490-strong capture-*.mjs convention, and the loosened (not deleted) squeeze-test pin. Final review follows.

First-Principles-Verdict: CONCERNS

The #9727 fix carries a full Undo-after-auto-title capability — a new hook, two catalog keys ×13, held-window semantics — whose only provenance is this PR's own review-lane comments.

Not justified as shipped

  1. Visible "Auto-title" label on the hover state (both headers) — rides along: relabel of a control everyone had; the named failing reader lives in a linked PR comment, not in this repo.
  2. Undo button replaces Auto-title for 8s after a generated title lands — rides along: non-trivial surface (new useHeldWindow hook, undo_auto_title/auto_title keys in 13 catalogs, hold/resume semantics) inside a fix; provenance is the linked UX-lane comment on this PR.
  3. Tooltip now promises reversibility, 13 catalogs — rides along, same linked-comment provenance.
  4. Editor caps input at 200 chars — rides along, though derived: chat_title.py:1353 slices [:200], and ProjectsPage.tsx:643 uses the same 200.
  5. Editor now opens with the whole title selected, start-anchored (changes the main header too) — rides along; the failing user is a linked UX-round claim.
  6. useHeldWindow extracted from useMoveUndo — rides along; a dedup with 2 counted consumers (useMoveUndo.ts, SessionTitleControl.tsx).
  7. A superseded rename's late refusal is no longer reported — rides along; declared, pinned by a new test.

What this change ships

Inventory (10 items) — 3 justified

Intent: let a user rename or auto-title a session from a split-view pane without leaving split view — a FIX (#9727).

  1. Split-view pane headers gain click-to-rename with inline editor — justified
  2. Split-view pane headers gain the Auto-title action, per-pane spinner and inline error notice — justified
  3. Both headers now run one shared control with identical Header rename failure keeps the refused optimistic title (mirror of #10151) #10203 failure recovery — justified
  4. Hover state of the regenerate button shows the text "Auto-title" — rides along (see above)
  5. Undo offer after a generated title lands, 8s held window — rides along (see above)
  6. Regenerate tooltip now states the name can be restored with Undo — rides along
  7. Title editor caps typing at 200 characters — rides along, derived from the server cap
  8. Editor opens with the title fully selected, scrolled to its start — rides along
  9. One shared held-window clock for both undo offers — rides along, 2 consumers
  10. A superseded rename's late failure notice is suppressed — rides along

Watch

The Undo capability (item 5) and both relabels (4, 6) rest entirely on findings recorded as PR comments (e.g. issuecomment-5658980816, -5652072740) that this review cannot open; if those comments do not say what the description claims, three riders lose their named harm at once.
Clears when: a maintainer confirms the linked UX-lane comments exist on this PR and requested these shapes.

The client-side Undo baseline is admitted symptom-level — "what the server itself replaced is only knowable server-side" — with the cause deferred to #10149's conditional write.
Clears when: #10149 lands the server-side conditional write.

[FIRST-PRINCIPLES-REVIEWED] e20bc73

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of e20bc734681d8b6951db833572201c038b647b3d and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e20bc73

False positive or not applicable? A repository writer can comment:
/ai-review override gpt e20bc734681d8b6951db833572201c038b647b3d: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of e20bc734681d8b6951db833572201c038b647b3d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All evidence is in hand. Reconciling: the blind reader correctly identified every control this PR adds — the Pen/rename ("lets me retype it", sure, would click), the Auto-title button ("make the app invent a name", would click), the spinner ("thinking up a name", would wait), the Undo ("puts the previous name back... undo buttons feel safe", which the reader said answered their overwrite fear), the error notice, and both main-header states. All ten states (rest, hover en/zh, editing, renamed, error, generating, undo, main-header hover/editing) appear in supplied screenshots; the pane title↔editor swap has the required recording; the opaque "title store unavailable" detail in shot-07 is the fixture's stubbed server body, not a string this PR authors. The only residual: the tooltip promises Undo without mentioning the ~8-second window.

UX-Verdict: PASS

Cold readers named every new control and its outcome, and the visible Undo offer resolved the only hesitation — fear of overwriting a hand-typed name.

Suggestions

  • pages.chatPage.regenerate_title_with_llm promises "the current name can be restored with Undo" with no time bound, but the offer lapses after UNDO_WINDOW_MS (~8 s) unless hovered/focused — a user who clicks and steps away returns to a broken promise; add a brief qualifier ("…can be restored with Undo just after").

[UX-REVIEWED] e20bc73

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed e20bc734681d8b6951db833572201c038b647b3d — this comment is updated in place on each push.

Review details

No blocking issues; one advisory finding.

FINDING — website/src/pages/chat/SessionTitleControl.tsx:1365 — the regenerate button now renders visible text {i18nT('pages.chatPage.auto_title')} ("Auto-title") beside the Sparkles while its accessible name stays aria-label={i18nT('pages.chatPage.regenerate_title_with_llm')} ("Regenerate title with LLM — …"); the visible label is not a substring of the accessible name (the PR's own tests query this button by the long REGEN string, confirming the aria-label is the computed name), so speech-input/voice-control users cannot activate it by its visible word — a WCAG 2.5.3 label-in-name failure newly introduced by adding the label to a formerly icon-only button → Fix: make the accessible name start with the visible text, e.g. set aria-label to the auto_title string and move the longer sentence to title only (the sibling Undo button already satisfies this: visible "Undo" is a prefix of Undo: <name>).

[OPUS-REVIEWED] e20bc73

Verdict parsed from the review's SHA-scoped output markers for commit e20bc734681d8b6951db833572201c038b647b3d.

False positive or not applicable? A repository writer can comment:
/ai-review override fable e20bc734681d8b6951db833572201c038b647b3d: <one-sentence reason>

@CrysisDeu
CrysisDeu force-pushed the fix/split-pane-header-rename-controls-9727 branch from eefaca1 to 1d15b73 Compare September 11, 2026 16:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 11, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/split-pane-header-rename-controls-9727 branch from 1d15b73 to fe193cf Compare September 11, 2026 16:28
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 11, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/split-pane-header-rename-controls-9727 branch from fe193cf to 0a29053 Compare September 11, 2026 16:51
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 11, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/split-pane-header-rename-controls-9727 branch from 0a29053 to c90cc4d Compare September 11, 2026 17:07
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 11, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 5 — Undo offer after auto-title duplicates useMoveUndo's hold/resume clock — fixed in e58cfa0 (span=79d5b2208bbc)

Agreed: two implementations of one window semantics. The clock (deadline, hold, remainder) is now hooks/useHeldWindow.ts, extracted from useMoveUndo and consumed by both useMoveUndo (hold keyed to the offer id, as before) and SessionTitleControl (hold = pointer over the row or focus inside it). The inline undoClock effect is deleted. useMoveUndo's behaviour is unchanged and its hold/resume test (ChatSidebar.moveUndo.test.tsx, "resumes the held clock from its remainder") passes through the shared hook; the five session-move undo suites are green. The offer itself answers the UX lane's BLOCK on ab85844d6 (#10140 (comment)).
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

The cap answers the GPT lane's upheld finding on 05b6a996e (silent server-side truncation of the editor's own draft), select-on-open the UX lane's round on 15c5cbc04 (#10140 (comment)): both are fixes to the control this PR ships, not new capability. The sidebar row's rename is the separate spelling this PR declares and does not touch; the cap for that field is recorded on #10151, which already tracks mounting the shared control there.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 8 — a superseded rename's late refusal is now silent: main-header behaviour change beyond the pane fix — accepted-as-declared (span=b21e1adcd4b6)

Declared in the description with its mechanism (the late notice would re-raise what the newer attempt's start just cleared on the host; the recovery still runs, gated the same way). No #10203 pin was removed — ChatPage.titleRenamePin.test.tsx only gained cases. Confirming the suppressed-late-refusal semantics is a maintainer's call (the lane's own clearing condition); it is flagged for @bolichen97's review of this PR (the requested reviewer, whose CHANGES_REQUESTED on c90cc4dd4 is still the standing human review) and this record stands until then.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 10 — two capture scripts ride along — accepted (span=7149eab94c37)

Evidence tooling per the repo's capture-*.mjs convention (the lane counts 487 siblings); the harness is what produces the frames the UX lane reads and the assertions it records (selection anchor, opacity, Undo restore). Not product surface.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch: the undo-window clock exists twice — fixed in e58cfa0 (span=a80cfa847a72)

One implementation now: hooks/useHeldWindow.ts, consumed by useMoveUndo and SessionTitleControl. Clears the Watch by its own first condition ("one shared clock implementation serves both").
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Pre-existing in the sidebar's own rename spelling, which this PR does not touch (declared; #10151 tracks mounting the shared control there, and the cap is now recorded on that issue). Clears when #10151 lands.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Subtraction: delete the inline undoClock effect; consume useMoveUndo's clock — fixed in e58cfa0 (span=1456a4554f5f)

Done in the shape the hook's own deps allow: useMoveUndo's clock is folder-move-shaped (keyed to an offer id, with live/superseded guards the header has no use for), so the clock alone was extracted into useHeldWindow and useMoveUndo now consumes it too. undoClock is gone.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

The lane's own reading: friction, not failure, decaying after first use, and "after five recorded rounds this may be as good as hover-gating allows" (its prior Watch on 253aeb455). An at-rest hint of restorability outside the tooltip is a design decision for both hosts (it competes with the row's two-action budget and with #10502's touch/hover-none affordance), recorded on #10152 with this round's reader quotes. The reversibility promise now sits in the tooltip/aria-label at the decision point (13 catalogs) and the Undo state read "sure… happily" in the blind read.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Shot-06 (pane-header-renamed.png) is a pre-label pod capture HEAD cannot render — fixed in e58cfa0 (span=5eaab3c7188a)

Agreed — that frame was shot on c90cc4dd4, before the label. Replaced: the fixture harness now has a 5b step (an accepted rename, pane at rest with the new title, and it asserts the earlier failure notice did not survive the attempt that superseded it), and the body's "renamed" frame is that harness capture at HEAD (https://github.com/user-attachments/assets/41477cc6-fdec-4968-84df-4ff70b6e53f4). Every frame in the body is now from the current control; the only pod frames left are the at-rest 2×2 (controls hidden, so no label to be stale) and the recording.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Tooltip/aria alignment with the label is already an item on #10152 ("tooltip/aria alignment"); added the lane's proposed wording ("Auto-title: replaces the current name — Undo restores it") there. Not changed on this head: the tooltip was rewritten across 13 catalogs one round ago to answer the lane's BLOCK on 357079fc3, and a second rewrite one round later is copy churn best done once with the rest of #10152.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • setHeld(false) on pointer leave releases a hold keyboard focus still owns — fixed in e58cfa0 (span=65a316874c9c)

Agreed. Pointer and focus are now tracked apart (hovered, focused) and the window is held while either is true; the test 'the Undo window is held open…' gained the case (pointer enters and leaves while focus is inside; the offer survives). The session-move bar's onHoldChange has the same single-flag shape and is left as is — pre-existing, outside this change.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Correct as a description, and the description says so: every one of items 4–9 is tagged with the lane round that required it and its recorded finding. The lane also names why none is deletable — each fixes a real harm in the control this PR ships (irreversible overwrite of a hand-typed name, an undecodable glyph, silent truncation). What it asks for is a maintainer's call, and it is a genuine one, because the two advisory lanes contradict each other on it: the UX lane BLOCKED this PR twice without the Undo (#10140 (comment) on ab85844d6; the tooltip BLOCK on 357079fc3), so splitting items 5–6 into their own PR re-raises that BLOCK here. Either ruling is implementable — keep the riders in this PR, or split 5–6 and carry the UX BLOCK with them — and I am not the one who gets to make it. Left for @bolichen97 / @buluoray with this PR's review; no further riders will be added while it is open.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch: rider provenance is this PR's own lane comments; Undo baseline is a client approximation; sidebar rename is a second spelling — accepted, awaiting the maintainers' ruling (span=faa894db47e4)

Three facts, all recorded in the description: the provenance links are review-lane records on this thread (verifiable by any reader); the client-side Undo baseline is declared an approximation of #10149's server-side conditional write (which will replace it); the sidebar row's rename is tracked in #10151 with the cap and recovery semantics it lacks. The clearing condition is a maintainer's confirmation or a split — the same decision as the record above, and it stays open until they rule.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

The adjudication's reading holds: the row is min-w-0 and the title truncates first, the pane root is overflow-hidden, and the label is revealed only on hover, so at ≤320px with a horizontal split the hover label can clip against the pane's split/close buttons — cosmetic, self-correcting on widen/unsplit, no data loss, and the same clip the main header's own controls take on a 320px viewport. A ResizeObserver branch is the disproportionate remedy the adjudicator named; the proportionate one is hiding the label (not the button — its aria-label and tooltip stay) below a pane width, which needs container queries this Tailwind (3.4) does not ship without a plugin. Recorded on #10502 alongside the touch/hover-none affordance, which is the same question — what the revealed control shows under constraints — and not added to this PR (FP lane, this head: no further riders).
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Agreed that shape, not opacity, is what would carry interactivity; it is a design decision for both hosts (the main header's revealed controls are all flat text/glyph today, and a pill on one of them changes the header's family) and belongs with #10152's revealed-state items (full-opacity label text, tooltip/aria alignment), where this round's proposal — a subtle border/pill the role=status spinner state does not share — is now recorded with the reader quotes. Not changed on this head: no further riders while the FP lane's split-or-keep question is open with the maintainers.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Already an acceptance item on #10152 ("Refused-rename notice names the outcome … instead of only the transport error", from the round on 76b97d3e9). The lead and the rollback are the shared control's; the detail string is the same errMessage(e) the main header's banner has always shown, and mapping server vocabulary to plain retry language is one copy decision for both hosts, made once there.
self-added: no

…pane headers (#9727)

Split-view pane headers rendered a bare title span, so a session could not
be renamed (Pen / inline editor) or given an LLM title (Sparkles) without
leaving split view. The single-session header's inline-edit + regenerate
block moves into one shared SessionTitleControl, mounted by both ChatPage
and ChatPane, so the two headers cannot drift again.

Closes #9727
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 4 — visible "Auto-title" label rides along; the failing reader is a PR comment — rebutted, provenance linked (span=45e919bf9c94)

The record is on this thread, readable by any thread reader: #10140 (comment) (UX lane, head 2b28f0319, "Auto-rename is undiscoverable and unnerving" — a blind reader could not decode the icon-only glyph with the tooltip present). The lane's sandbox not opening the link is not evidence about the record. Both headers by design: the control is shared so the two cannot drift again, which is #9727's root cause.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 5 — Undo-after-auto-title is a new capability inside a fix; provenance is this PR's UX lane — accepted-as-declared, maintainers' call (span=6fca6f6a6ff2)

Correct as a description and the PR says so: the offer answers the UX lane's BLOCK on ab85844d6 (#10140 (comment) — cold readers named the control correctly and still refused to press it with no way back), and the lane blocked a second time on 357079fc3 until reversibility was stated at the decision point. Splitting items 5–6 into their own PR re-raises that BLOCK here, so the two advisory lanes contradict each other on this and the ruling is a maintainer's (@bolichen97 / @buluoray), not mine; either outcome is implementable. Its surface is deliberately minimal: the window reuses MOVE_UNDO_MS, the clock is the product's one held-window hook, and the button occupies the Auto-title button's place so the row never grows.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 6 — tooltip promises reversibility, 13 catalogs; same provenance — rebutted, provenance linked (span=9c8b97b14776)

The UX lane's second BLOCK, on 357079fc3: readers understood the Undo state once shown and still would not dare the first press because nothing at the decision point said it was reversible. Stating it in the tooltip/aria-label is the smallest fix for that finding; 13 catalogs because the key is shared and the i18n gate requires parity.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 7 — 200-char cap rides along, derived from chat_title.py — rebutted (span=0728529f9023)

A defect fix in the control this PR ships, not new capability: the GPT lane's upheld finding on 05b6a996e was that the editor accepted a name longer than the server's title.strip()[:200] and the typed tail vanished silently on the next re-read. The figure is the server's, mirrored where the repo already mirrors it (ProjectsPage.tsx:643).
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 8 — select-whole-title-on-open changes the main header's editor — rebutted, provenance linked (span=d2043e60a2db)

UX lane on 15c5cbc04 (#10140 (comment)): caret-at-end autofocus scrolled a long title so only its tail showed, which a reader took as "part of the name is already gone". Shared editor, so the fix reaches both hosts by construction; the anchor is backward precisely so the start of the name is what shows.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 9 — useHeldWindow extracted from useMoveUndo rides along — rebutted (span=cf58949728dd)

It is this lane's own Subtraction on dc1ae57ac ("consume the pause/resume clock useMoveUndo already implements"): the alternative was a second hand-rolled clock, which the lane flagged as divergence risk. Two consumers is the point — one implementation of the held window for the product, with useMoveUndo's behaviour unchanged and its hold/resume test passing through the shared hook.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Item 10 — a superseded rename's late refusal is no longer reported — accepted-as-declared (span=28f74894be50)

Declared with its mechanism (a late notice would re-raise what the newer attempt's start just cleared on the host; the recovery still runs, gated the same way) and pinned by a test; no #10203 pin was removed. Maintainer confirmation of the semantics remains part of their review of this PR.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch: Undo and both relabels rest on PR-comment findings this review cannot open — accepted, awaiting maintainer confirmation (span=8f9ccce1bccd)

The links are review-lane records on this very thread — issuecomment-5658980816 (UX BLOCK requesting the Undo), -5652072740 (label), -5657816674 (select-all) — and any maintainer reading the PR sees them in order. The clearing condition names a maintainer, so this stays open until @bolichen97 or @buluoray confirms in review; I cannot clear it myself.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Declared in the description in those words. The client offers back the title on screen when the generated one replaced it; which title the server itself overwrote is only knowable server-side, and #10149 tracks the conditional write that makes the client machinery unnecessary. Clears when #10149 lands.
self-added: no

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Accurate. The window is held while the pointer is over the row or focus is inside it, so a user who deliberates in place keeps the offer, but one who clicks and walks away does not. The tooltip is a shared 13-catalog key already queued for one consolidated rewrite on #10152 (lead with the label's word, align with aria); the time-bound wording ("…can be restored with Undo for a few seconds") is added to that item now so the copy is changed once, not per round. Not changed on this head: no further riders while the FP lane's keep-or-split question is with the maintainers.
self-added: no

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer review (agent-assisted), pinned to e20bc73.

Re-reviewed all 25 changed files. The earlier double-failure rename blocker is addressed by per-slot generation-guarded recovery with a confirmed local baseline, partial title reconciliation, and regression tests for both requests failing and newer concurrent renames. Independently checked the shared commit handler and regression tests. No blocking findings.

Verification: reviewed source/tests and observed passing CI and PR Readiness on this exact head; no local test rerun or manual UI reproduction. Approval is for this commit only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename and auto-rename icons missing from pane headers in split-screen view

2 participants