Repository navigation
fix(website): label untitled sessions in the palette and the composer's history suggestions - #23023
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The four relabels reuse the existing Notes
What this change shipsInventory (6 items) — 5 justifiedIntent: a person sees "Untitled session" instead of a machine slot id in the palette and the composer's resume suggestions. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 2d49e39 Description read[DESCRIPTION-READ] 5b2a1df8dd9d4914a8709fefe2cabd8ec1b4b19b2abcda2b5c1fe47bbc9b0e0a That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a display-only change through the existing [DESIGN-REVIEWED] 2d49e39 Description read[DESCRIPTION-READ] a2ce75d5a46d7d68beecd8a7a69395e8587b51c3826fee10e8af71667e66154c 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. All four changed surfaces appear in the screenshots in both themes, and the blind reader correctly took "Untitled session" for a past chat with no name and would open it. Notes
[UX-REVIEWED] 2d49e39 Description read[DESCRIPTION-READ] 8fca3fff21b60411e78d3f9409a626ff820e2b06a3232643e9fb405884f2d1f1 That sha256 names everything this verdict read: the PR description, plus the 9 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
1435e62 to
764152c
Compare
…'s history suggestions
764152c to
2d49e39
Compare
🤖 AI-assisted comment 🤖 |
🤖 AI-assisted comment 🤖 |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (7 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: display-only fix that labels untitled sessions "Untitled session" in the command palette and the composer's history suggestions, with the open, resume and copy payloads unchanged. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/history.md.
Problem / Motivation
Goal: An untitled session shows "Untitled session" instead of its internal slot key in the command palette's recent rows and session search, and in the composer's "Continue a previous chat" suggestions.
Four rows fell back to
title || key. A session with no title, or with its key as its title, showed a machine id such aschat-9-1785440411as its name.Why it matters
The key means nothing to a reader. In the palette, two untitled rows looked like two random ids, and searching for one showed only another id.
Not a goal
title || keysites listed in Route the remaining untitled-session labels through sessionDisplayTitle #22049 (session tabs, chat pane, chat notices, system rows, memory tab). They follow in later PRs.What changed (motivation → approach → change)
commandPalette/providers/recentsProvider.ts)commandPalette/providers/sessionsProvider.ts)pages/chat/page/ComposerDockView.tsx)All four read the shared
sessionDisplayTitlehelper from #22041. It treats a missing title and a title equal to the key as untitled. A real title shows as before, and a title that arrives later replaces the label on the next render.Only the shown label changes. A live row still switches to its key. An older row and a suggestion still resume their key, with the payload title still
title || key. A search row still opens, splits and copies with the same{key, title || key}it carried before.Session search still ranks an untitled row by its key, so the order is unchanged. Its name highlights are matched against the shown label, so they never point past the end of the text drawn on screen.
Two rows that both read "Untitled session" still need telling apart. Where nothing else on the row does it, the key leads the second line, never the name:
<key> · <agent>, the query highlighted in the key<key> · <date>The
history.mdspec paragraph on untitled labels names these surfaces.The issue for the suggestions (#20877) points at
ChatPage.tsx; that list now lives inComposerDockView.tsx.Backwards compatibility
Compatible: only the displayed label of an untitled session changes; keys, routes, payloads, ranking and stored data are untouched.
Removes nothing: no path, key, record or function is removed; search reads the same fields as before.
Tests
website/src/components/commandPalette/providers/recentsProvider.cov80.test.tsx: an untitled live row and a key-titled live row read "Untitled session", a named row keeps its name, and activating one switches to its key. The same for older rows, where activation resumes with the unchanged payload. Replaces the case that pinned the key fallback.website/src/components/commandPalette/providers/sessionsProvider.test.ts: untitled search hits read "Untitled session" with their own key as the subtitle; the Enter payload andopenSessionstill carry the key. A key match still scores, no name highlight points past the shown label, and the query is highlighted in the key line. An untitled body hit keeps its snippet. Replaces the case that pinned the key fallback.website/src/pages/ChatPage.composerDock.test.tsx: untitled suggestions read "Untitled session" on the name line and their key on the second line, next to a named one; mouse and Enter resume with the key and the old payload title.Each production file reverted to
origin/mainon its own makes its cases fail. Reverting only the highlight line, or only the key lines, makes those cases fail. Determinism: the three files passed 3 of 3 runs with--sequence.shuffle.Manual verification
Rendered the real
CommandPalette(recent rows, and a search for1785) and the realComposerDockViewsuggestion list on a loopback vite server with stubbed API answers, in dark and light themes. The composer input was stubbed out of the dock render. Before each capture the script asserted that no untitled key appears in the rendered text.Screenshots / video
Palette recent rows, dark:
Palette session search for
1785, dark:"Continue a previous chat", light:
Other theme
Related Issues
Part of #22049
Closes #20877
Closes #20879
Closes #20880
Closes #20881
Pattern harvest
Rule candidate: semgrep
Pattern: a session label rendered as
title || keyin website/src shows an internal id; route it throughsessionDisplayTitle.Checklist