Skip to content

fix(chat): put the phone session menu chevron ahead of the title - #31406

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/22655-session-chevron-side
Nov 7, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/22655-session-chevron-side

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The session menu chevron sits on the same side of the session title on the phone as on desktop.

On desktop the chat header reads ⌄ Session title. On the phone it reads Session title ⌄, so the control moves to the other side when the viewport changes.

Builds on #22656 by @Pearcekieser.

Why it matters

Anyone who uses the dashboard on both a laptop and a phone sees the first control in the chat header jump sides. It is cosmetic, but it is the control a user reaches for to rename, pin or open session options.

Not a goal

  • Changing the desktop header, the split-view pane headers or SessionTitleControl.
  • Changing what the session menu contains or how it opens.

What changed (motivation → approach → change)

The phone's chevron sat after the title, while desktop puts it before. Both viewports render ChatHeaderMenu. Desktop uses its icon-only trigger, placed ahead of the title in ChatTitleOverlay.tsx. The phone uses its titled trigger (triggerLabel), and that button rendered the chevron after the title.

The fix moves the phone to the desktop order, not the other way round. That changes one viewport. Moving desktop instead would mean reversing the hover-pill rounding of SessionTitleControl, which the split-view pane headers also use. The phone order came from an earlier mock, and no recorded decision depends on it.

ChatHeaderMenu.tsx renders the chevron first inside the titled trigger. The comments in MobileTopBar.tsx and the phone top-bar row in website/docs/narrow-viewport.md now describe the chevron-then-title order.

Backwards compatibility

Compatible: only the order of two children inside one button changes. The test id, the accessible name ("<title>, Session options") and the menu contents stay the same.

Removes nothing: no element, test id or behaviour is taken away.

Tests

website/src/test/ChatPage.mobileSingleTopbar.test.tsx now asserts that the chevron is the first child of the phone's session menu trigger. With the ChatHeaderMenu.tsx change reverted it fails (expected <span> to be SVGSVGElement). With the change it passes.

Proof: not provable -- frontend test (prove.py runs Python only)

Determinism: the file passed 20 sequential runs (--maxWorkers=1), and 10 shuffled runs at --maxWorkers=4 beside ChatPage.mobileTopBarActions and a sibling ChatHeaderMenu spec (--sequence.shuffle, seeds 20248 to 20257). The related frontend set (7 files, 80 tests), tsc -p tsconfig.app.json and eslint src/ at the CI warning ceiling are clean.

Manual verification

I built the SPA and loaded it against the shared stub API (website/scripts/lib/stub-dashboard-api.mjs) in headless Chromium, once at a 390px touch viewport and once on desktop. Each pass checked that the chevron's left edge is left of the title's. Before the fix the phone check failed (chevron at x=225, title at x=50). After it, both pass (phone: chevron x=50, title x=70; desktop: chevron x=360, title x=392).

Screenshots / video

Phone, before: the chevron trails the title.

Phone header before the fix

Phone, after: the chevron leads the title.

Phone header after the fix

Desktop, unchanged: the chevron leads the title.

Desktop header

Related Issues

Closes #22655

Sibling sweep

Swept: git grep -n "<ChatHeaderMenu" -- website/src
Sibling: website/src/pages/chat/page/ChatTitleOverlay.tsx:172 -- not affected -- the desktop header already renders the chevron ahead of the title

Pattern harvest

Not generalizable: one button ordered its children differently from the sibling trigger of the same menu, and no lint rule can tell which order is intended.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license (see the Licensing section of CONTRIBUTING.md).

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 6, 2026 12:14
@bolichen97
bolichen97 requested a review from Zedmor November 6, 2026 12:14
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 6dab3e6f2060c53acd1de157f0dea5cf43b25499 — 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 does not.

First-Principles-Verdict: PASS

The fix reverses the order set by the "approved mock". The description says so openly, and the linked issue #22655 shows why. Nothing blocks.

Notes

  • Item 1 — inherited (symmetry): the only harm the description names is the gap between viewports: "the control moves to the other side when the viewport changes". It reverses a deleted pin that said "the menu chevron trails it, as on the approved mock". docs/decisions/ has no record for either order (grepped chevron|approved mock|session title: 0 hits). So Session menu chevron switches sides between desktop and phone #22655 is the only evidence that the mock was wrong.

What this change ships

Inventory (3 items) — 2 justified

Intent: make the phone's session-menu chevron sit on the same side of the title as on desktop. This is a FIX.

  1. On the phone, the session menu chevron now sits before the title instead of after it. — inherited (symmetry; issue Session menu chevron switches sides between desktop and phone #22655 is its only support)
  2. The comments and the narrow-viewport doc now describe the chevron-then-title order. — justified
  3. A new test checks that the chevron is the first child of the phone's trigger. — justified

[FIRST-PRINCIPLES-REVIEWED] 6dab3e6

Description read

[DESCRIPTION-READ] cc66fded6dd2869c8271e860c979be6e1d99c467a7f0bc3a6833a3916acad076

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 6dab3e6f2060c53acd1de157f0dea5cf43b25499 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the change reorders two children in one phone-only trigger, the evidence is rendered, and no decision under docs/decisions/ records the old order.

Notes

  • The removed comment called the old order "the approved mock". If a human approved that mock, the reversal belongs to them, so name or tag that person in the PR so they can confirm. Without that, the change is easy to revert.

[DESIGN-REVIEWED] 6dab3e6

Description read

[DESCRIPTION-READ] cdac36133dd30785c746165029c854edb005841cd182ed277eb1c53b927b724b

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 6dab3e6

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 6dab3e6f2060c53acd1de157f0dea5cf43b25499 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 6dab3e6f2060c53acd1de157f0dea5cf43b25499 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the phone now matches the desktop order, and all three screenshots show the moved chevron.

Notes

  • With the chevron ahead of "Draft the release notes", the blind reader was less sure what it does: it "looks like a section I could fold or unfold", so "either a menu opens or something below folds away". That was a guess, not a misread, and the reader would still tap it. Desktop already has the same ambiguity. A follow-up could make the trigger read as a menu on both viewports, for example with a different icon or a visible open state.

[UX-REVIEWED] 6dab3e6

Description read

[DESCRIPTION-READ] d382e3523cc77e54d3e8ba5090e6d829ffd733a3b11cc59de3c07d3a2a0c8db0

That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 6dab3e6f2060c53acd1de157f0dea5cf43b25499 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6dab3e6

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 6dab3e6f2060c53acd1de157f0dea5cf43b25499 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 6, 2026 12:43
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • The phone session menu trigger stops reading as a menu once the chevron leads the title (span=85c9b682f607)

Rebutted: the title is not a separate, inert label. Chevron and title are children of ONE <button aria-haspopup="menu"> (session-title-menu): one tap target and one accessible name ("<title>, Session options"). The test pins exactly one button in the title cell.
The order adopted is the desktop header's, which this PR does not touch: the menu chevron, then the title, painted as one hover pill by group/header. Shot-03 is today's desktop. The issue asks for one order on every viewport; matching desktop changes one viewport, not two.
The reverse is a desktop redesign the issue does not ask for: after the title, desktop's chevron would sit behind the Pen and Auto-title controls of SessionTitleControl, whose pill rounding every split-view pane header shares. A resting pill on the phone alone would make the two viewports differ again.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/22655-session-chevron-side branch from 77cc3c8 to d68af4d Compare November 6, 2026 14:58
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/pages/chat/BrowserLiveCardViews.tsx, website/src/pages/chat/SubagentProgressBar.tsx, website/src/pages/chat/useChatPageSessionController.ts and test/test_chat_handlers_composition_contract.py since this head went green (090dad8 -> 85ce466); CI re-running.

The diff is unchanged (same patch id); the 7 related frontend test files (80 tests) pass on the rebased head.

[operator: bolichen97]

@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 Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] The three red checks on this head (Backend Tests shard 2 on Linux and Windows, and the Coverage Gate that folds them) are test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget, which this frontend-only change does not touch. #31469 fixed that red on main, but main went over the budget again since; #31625 raises it to the current size. This PR waits for #31625 to merge, then rebases onto it and re-runs CI.

The desktop header shows the session menu chevron before the session
title, but the phone's single top bar put it after the title, so the
control switched sides between viewports. The phone's titled trigger
now renders the chevron first, matching desktop.
@bolichen97
bolichen97 force-pushed the fix/22655-session-chevron-side branch from d68af4d to 6dab3e6 Compare November 7, 2026 02:35
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in test/test_chat_folder_cleanup.py, test/test_chat_runner_redact_across_tool_boundary.py, test/test_chat_runner_turn_sequence.py, test/test_chat_slot_facade_contract.py, test/test_chat_tag_column_infinite_order.py, website/src/pages/chat/AssistantMessage.tsx, website/src/pages/chat/ChatSettings.tsx, website/src/pages/chat/ErrorCard.tsx, website/src/pages/chat/FileBrowserRail.tsx, website/src/pages/chat/NewFileDialog.tsx, website/src/pages/chat/SessionTitleControl.tsx, website/src/pages/chat/SidePanel.tsx, website/src/pages/chat/SidePanelTabBodies.tsx, website/src/pages/chat/StopEventCard.tsx, website/src/pages/chat/ToolCallLine.tsx, website/src/pages/chat/ToolDetails.tsx, website/src/pages/chat/page/ChatTranscriptView.tsx, website/src/pages/chat/page/ComposerDockView.tsx, website/src/pages/chat/page/busyTurnControls.ts, website/src/pages/chat/page/composerSend.ts, website/src/pages/chat/page/eventBridges.ts, website/src/pages/chat/useChatPageResourcesController.tsx and website/src/pages/chat/useDirectoryUpload.tsx since this head went green (85ce466 -> 10e0a06); CI re-running.

The diff is unchanged (same patch id). The previous head's Backend Tests shard 2 and Coverage Gate reds were main's security package line-budget test, which #31625 fixed on main; the new base includes it. The 10 related frontend test files (116 tests), eslint on the touched files and tsc -p tsconfig.app.json pass on the rebased head.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 7, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved for the on-call. Review lanes pass on 6dab3e6, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit 277b277 into main Nov 7, 2026
97 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/22655-session-chevron-side branch November 7, 2026 03:31
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
buluoray pushed a commit that referenced this pull request Nov 9, 2026
)

The desktop header shows the session menu chevron before the session
title, but the phone's single top bar put it after the title, so the
control switched sides between viewports. The phone's titled trigger
now renders the chevron first, matching desktop.

(cherry picked from commit 277b277)
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.

Session menu chevron switches sides between desktop and phone

2 participants