fix(chat): renamed run title no longer collapses beside raw identity (#120) #121

Merged
dominik.polakovics merged 2 commits from afk/120 into main 2026-07-11 02:31:20 +02:00

Rename a run spawned without a label and the header showed ~3 characters of the new title beside a giant muted 20260710-1545 · coding-lab~20260710-1545 string — the raw-identity span out-shrank the title in the flex row, and it doubled the label (the session name already embeds it).

Per the agreed design on the issue, the header title is now one code path for titled and untitled runs:

  • Primary (.chat-title-text): runDisplayTitle — custom title, else the generated label title (dom · 15:00, AFK #7), else the branch. The repo · prefix is gone from the generated form (and from the edit-mode placeholder).
  • Secondary (.chat-title-project, replaces .chat-title-raw): just the project name (sessionRepo), muted, rendered for titled and untitled runs alike; hidden for legacy no-~ sessions.
  • Title always wins the space: the project span carries flex: 0 100000 auto so it shrinks to zero before the title gives up a pixel; both keep min-width: 0 + ellipsis. No media queries — narrow viewports shed the project naturally.
  • Raw identity lives in the tooltip: the title button's title attribute is the exact session name (coding-lab~grill-20260710-1018), keeping the ADR-0040 tmux/branch/worktree correlation reachable. ADR-0040's Status section records the amendment.

Rail and History already render runDisplayTitle only — untouched.

Tests: header expectations updated for titled/untitled/reset, placeholder now repo-less, plus a new legacy no-~ case (branch fallback, no project span, session-name tooltip). Full web gates green locally: vitest 590/590, tsc --noEmit, eslint, prettier, vite build. No Go changes. Browsers can't run in this sandbox, so no screenshot — surfaces to eyeball: chat header on a renamed unlabelled run (wide + narrow), and a run with a 120-char title.

Closes #120

🤖 Generated with Claude Code

https://claude.ai/code/session_01QF3QPn7z5ZTHLCe718grBg

Rename a run spawned without a label and the header showed ~3 characters of the new title beside a giant muted `20260710-1545 · coding-lab~20260710-1545` string — the raw-identity span out-shrank the title in the flex row, and it doubled the label (the session name already embeds it). Per the agreed design on the issue, the header title is now one code path for titled and untitled runs: - **Primary** (`.chat-title-text`): `runDisplayTitle` — custom title, else the generated label title (`dom · 15:00`, `AFK #7`), else the branch. The `repo · ` prefix is gone from the generated form (and from the edit-mode placeholder). - **Secondary** (`.chat-title-project`, replaces `.chat-title-raw`): just the project name (`sessionRepo`), muted, rendered for titled and untitled runs alike; hidden for legacy no-`~` sessions. - **Title always wins the space**: the project span carries `flex: 0 100000 auto` so it shrinks to zero before the title gives up a pixel; both keep `min-width: 0` + ellipsis. No media queries — narrow viewports shed the project naturally. - **Raw identity lives in the tooltip**: the title button's `title` attribute is the exact session name (`coding-lab~grill-20260710-1018`), keeping the ADR-0040 tmux/branch/worktree correlation reachable. ADR-0040's Status section records the amendment. Rail and History already render `runDisplayTitle` only — untouched. Tests: header expectations updated for titled/untitled/reset, placeholder now repo-less, plus a new legacy no-`~` case (branch fallback, no project span, session-name tooltip). Full web gates green locally: vitest 590/590, `tsc --noEmit`, eslint, prettier, `vite build`. No Go changes. Browsers can't run in this sandbox, so no screenshot — surfaces to eyeball: chat header on a renamed unlabelled run (wide + narrow), and a run with a 120-char title. Closes #120 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QF3QPn7z5ZTHLCe718grBg
fix(chat): renamed run title no longer collapses beside raw identity (#120)
All checks were successful
ci / native (pull_request) Successful in 5m10s
d315d957af
Two defects compounded in the chat header: the custom title and the
raw `label · session` identity string were equal flex children, so the
far-longer identity won ~80% of the width and the title ellipsized to a
few characters; and the identity string doubled the label, since the
session name already embeds it (`<repo>~<label>`).

Unify the header title as one code path for titled and untitled runs:

- primary text is runDisplayTitle (custom title || generated label ||
  branch), with the repo prefix dropped from the generated form
- secondary text is the project name (sessionRepo), muted, carrying a
  huge flex-shrink so it collapses to zero before the title gives up a
  pixel — no media query, narrow screens shed the project naturally
- the raw session name moves to the title button's tooltip, keeping the
  tmux/branch/worktree correlation reachable (ADR-0040 amended)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QF3QPn7z5ZTHLCe718grBg
Merge remote-tracking branch 'origin/main' into afk/120
All checks were successful
ci / native (pull_request) Successful in 5m33s
4b8053082f
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/coding-lab!121
No description provided.