Skip to content

Keep a long title in its header row (#2134) - #2204

Queued
pixari wants to merge 5 commits into
mainfrom
fix/task-header-2134
Queued

pixari wants to merge 5 commits into
mainfrom
fix/task-header-2134

Conversation

@pixari

@pixari pixari commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What and why

Fixes #2134

The compact header is one 46 px row (app-shell "Page template"), but a task page for a subtask with a long title grew to three rows. The cause: in the header's wrapping row the title had flex-basis: auto, so its line-breaking size was the whole breadcrumb's max-content width. A title longer than the space left broke onto a line of its own, and the actions then wrapped onto a third. Only a narrow header (under 40 rem) gave the title a small basis.

We now give a tool page's title the same rule at every width: it asks for 6 rem before the actions wrap and grows up to its whole text (basis-24 grow-[999] max-w-max, the narrow header's existing class). When the room is there, nothing moves. In the task path, the task's own crumb (its title is shown whole on the page below) now has basis 0 and grows into the room the project and the parents leave, so "Inbox" and the parent's name stay whole while they fit. It is a TruncatedText, so a cut title shows whole on hover and keyboard focus. This restores the spec, so there is no OpenSpec change.

The test is a new story, Screens/Shell › Long subtask page (a 250-character subtask opened as its page), and scripts/ui-check/header-row.spec.ts, which runs in the UI check. At 1280 and 1462 px it checks that the header is as tall as the short task page's, that the sidebar toggle, the path, Close and Help share one line, that the task title is cut, and that the steps up are not (their text measured against their content box, since an ellipsis can cost a fraction of a pixel that scrollWidth rounds away). On main it fails with a header 105 px tall instead of 47, the numbers in the issue.

UI baselines: the new story needs its four baselines (screens-shell--long-subtask-page, light and dark, 1280 and 375). We measured every page header in all 847 stories at 1280 and 375 px before and after the change. Nothing else moved, so no existing baseline should change.

Checked: npm run typecheck, eslint on the changed files, make ui-lint, vitest for src/ui/patterns and the task page, path, page focus, phone and row layout tests (85 tests), and the new Playwright spec against a Storybook build. narrowHeader.test.tsx asserted that a wide title had no give-way class, so we updated it to the new rule.

Checklist

  • Behaviour changes start as an OpenSpec change (openspec/changes/<name>/), or this PR has none
  • One change per pull request; make check passes locally (we ran the checks listed above, not the full make check)
  • Commits credit every author, AI tools included, with a Co-Authored-By trailer
  • Data writes go through ops (no direct task/project row writes)
  • New API routes are registered with a policy in internal/httpapi/policy.go (public("reason") only when the spec says so)
  • No telemetry, no new third-party requests, no new mandatory env vars
  • Docs updated and a changelog entry added as changelog.d/<Section>/<name>.md (not in CHANGELOG.md); size impact noted for new dependencies
  • Templates only: I wrote the template in templates/ (or may license it) and agree to publish it under CC BY 4.0; make templates is committed

https://claude.ai/code/session_0187cnkXBm72ZSggGvrvUMKW


Generated by Claude Code

A tool page's title had flex-basis auto, so in the header's wrapping row a title
longer than the space left broke onto a line of its own and pushed the actions to
a third: a subtask with a 250-character title made the task page's header 105 px
instead of 47. The title now asks for 6 rem before the actions wrap and takes the
room up to its whole text at every width, as a narrow header already did, and the
task's own crumb gives way before the project and its parents.

A new story, Screens/Shell LongSubtaskPage, and a Playwright check
(scripts/ui-check/header-row.spec.ts) hold the header to one row at 1280 and 1462 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0187cnkXBm72ZSggGvrvUMKW
The new story's baselines showed "Inb…" and "Renew passp…": with flex-shrink
999 on the task's crumb the steps up still took a fraction of a pixel of the
shrink, enough for an ellipsis, and the check missed it because scrollWidth
rounds. The task's crumb now has basis 0 and grows into the room the steps leave,
and it is a TruncatedText, so a cut title shows whole on hover and focus. The
check measures the text against its content box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0187cnkXBm72ZSggGvrvUMKW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0187cnkXBm72ZSggGvrvUMKW
@pixari
pixari marked this pull request as ready for review November 28, 2026 13:34
@pixari
pixari enabled auto-merge November 28, 2026 13:34
@pixari
pixari added this pull request to the merge queue Nov 28, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 28, 2026
@pixari
pixari added this pull request to the merge queue Nov 28, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0187cnkXBm72ZSggGvrvUMKW
@pixari
pixari added this pull request to the merge queue Nov 28, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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.

Long task titles push the desktop task header onto three rows

2 participants