Repository navigation
fix(app-sdk): show "New session" in an untitled ChatEmbed header - #19887
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that [DESIGN-REVIEWED] b266889 Description read[DESCRIPTION-READ] 976c63fb1a8196ef1505bcd1a16294275360f98b5338a942dfe67a309065de84 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Before merging, check that "New session" is acceptable wording on resumed untitled chats that already have messages. #20362 is deferring that wording problem. What this change shipsInventory (6 items) — 6 justifiedIntent: someone using an app that embeds a chat wants a readable header on an untitled session, not an internal id like
[FIRST-PRINCIPLES-REVIEWED] b266889 Description read[DESCRIPTION-READ] ea776632381d040765d3a795a464bda8e1cf7799c7902d831a3f04de71e49f17 That sha256 names the PR description this verdict read. 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: |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Check one case before merge: a resumed untitled chat that already has messages will still be labelled "New session" (tracked in #20362). [UX-REVIEWED] b266889 Description read[DESCRIPTION-READ] 57d88343d8fdd0fc3806526ba0bfe3eefbe03f9cf8c501fb12ba22cac676828e That sha256 names everything this verdict read: the PR description, plus the 8 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 |
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: |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]: dispositions for the advisory lanes on First Principles: symptom-level, 2 siblings. Agreed and verified. UX: slot key in the hover tooltip. Kept on purpose. The audit item asked for the slot key to move out of the visible text and stay on the UX: "New session" over "Session ready." Both lines are existing copy describing the same chat. Changing the empty-state line is outside this PR's Goal. No change. |
CrysisDeu
left a comment
There was a problem hiding this comment.
Reviewed head 7f0e6ef. Key in all 12 catalogs + en-XA, tests red without the fix, no scope creep. CI green. Approving.
Nits: no test drives one mount from untitled to titled (first resolve {}, then {title:'X'}, advance past the 5000 ms poll); title={slotKey} at ChatEmbed.tsx:329 is unconditional, so titled headers also show the internal id on hover, which the body itself calls meaningless to the user, suggest title={title ? undefined : slotKey}; hi/ru use "सेशन" / "сеанс" in the new string while the status line in the same block uses "सत्र" / "Сессия".
Posted by code-reviewer (Kiro Crew member) on behalf of @CrysisDeu. Full report on file.
iamwhatever
left a comment
There was a problem hiding this comment.
This PR changes the ChatEmbed header fallback from {title || slotKey} to a new appSdk.chatEmbed.untitled_session_title ("New session"), keeps the slot key as the hover title, and adds the key to all 12 catalogs plus en-XA. That fixes the root cause for this component. I read the full diff and the tests. Both changed tests assert the new text, assert the slot key is not visible text, and would fail with the old fallback. Checks are green, base is main and mergeable is clean, so the code itself is fine. What blocks approval is deferred work with nothing tracking it. The Pattern harvest names website/src/pages/chat/crew-window/CrewChatWindow.tsx:300 (header falls back to key) and website/src/components/SessionTabStrip.tsx:232 (tab label falls back to key) as deferred, and the author's reply to First Principles agrees. Please open one GitHub issue for each sibling and link both in the description. Also, the replies to the First Principles and UX CONCERNS are one prose comment with no <!-- ai-review-disposition target=first-principles|ux head=7f0e6ef... --> markers, so please repost each item as a marked disposition. Optional, not blocking: title={slotKey} at ChatEmbed.tsx:329 also shows the internal id on titled headers; title={title ? undefined : slotKey} would fit the PR's own goal. Note that #19879 inserts text at the same spot in docs/app-kit/api-reference.md, so whichever PR lands second needs a rebase. — crew-pr-reviewer (deep re-check)
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]: @iamwhatever @CrysisDeu — review follow-up at
One new commit, two total; no merge, auto-merge, review dismissal, or finding override. |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]: @iamwhatever @CrysisDeu — the separate marker-first dispositions are now posted: First Principles and UX.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
An embedded chat with no title yet showed its internal slot key (for example coder-abc123) as the header text. Fall back to a translated "New session" label and keep the slot key only as the hover title.
5cd8ab3 to
b266889
Compare
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#19887]:
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (18 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: an untitled ChatEmbed header shows a localized "New session" label instead of the internal slot key, which moves to the hover title; one new i18n string per locale plus tests. 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/app-kit-platform.md.
Problem / Motivation
Goal: An embedded chat that has no title yet shows "New session" in its header instead of an internal id.
ChatEmbed's header rendered{title || slotKey}, so until a session got a title the header showed the raw slot key, for examplecoder-abc123. That is an internal identifier that means nothing to the user.Why it matters
Every app that mounts
ChatEmbedon a fresh session shows this id as the first thing the user reads, in every language.Not a goal
framelessmode, which has no header at all.What changed (motivation → approach → change)
coder-abc123.slotKeywhentitlewas empty.appSdk.chatEmbed.untitled_session_title("New session"). The slot key moves to the header'stitleattribute, so it is still visible on hover for debugging.components.sessionGridView.new_session, because that one is a button label (an action) andwebsite/docs/i18n-catalog.mdasks for one key per grammatical role. The translations use each locale's existing word for "session";en-XAwas regenerated withnpm run i18n:pseudo.docs/app-kit/api-reference.mdnow documents the header's untitled behaviour.docs/system-specs/modules/app-kit-platform.mdnow pins the same fallback for fresh and resumed untitled chats, later title updates on the mounted header, the hover title, and frameless behavior.Backwards compatibility
Compatible: no prop or API changes; only the visible text of an untitled header changes, and the slot key is still exposed as the header's
titleattribute.Removes nothing: the slot key is no longer header text but remains on the same element as its hover title; no prop, key or route is removed.
Tests
Review follow-up at
1d8d35119e7ff493a7846ce092295975239cb25b:ChatEmbed.test.tsxpolling cases, for fresh and resumed untitled sessions. Each checks that a later title replaces the fallback on the same mounted header.{title || slotKey}makes both new cases fail. All 58 related tests pass across 5 files, including shuffled order (seed 19887); TypeScript, touched-test ESLint, and 53 flake-pattern ratchet tests pass. Full suites were not run locally for this follow-up.Initial implementation validation:
ChatEmbed.frameless.test.tsx— new case: an untitled slot shows "New session", the header'stitleattribute is the slot key, and the slot key is not visible text. The frameless case now asserts the header element is absent.ChatEmbed.test.tsx— the old "shows slotKey as fallback" case now asserts the new fallback.{title || slotKey}turns both of those tests red.npx tsc --noEmit(pass), eslint on the touched files (pass),npm run lint:i18n(pass),npm run i18n:check(pass),vitest run src/test/ChatEmbed(5 files, 56 tests pass),vitest run src/i18n(47 files, 769 tests pass).Manual verification
Rendered the real
ChatEmbedin an isolated Vite page with fake slot data (empty title), before (main) and after, in dark, light, a 320px-wide box, and zh-CN. The header reads "New session" / "新会话" after the change andcoder-abc123before; nothing overlaps or truncates at narrow width.Screenshots / video
Before (main), dark:
After, dark:
More variants (after: light, narrow, zh-CN)
Related Issues
Deferred siblings, one issue per fallback site. All nine additional sites were verified on main at
567df9af4d6f86a170783b1b64c2e0a0f636572a; none was skipped. These are follow-ups, not fixes included in this PR.ChatPane.tsx:535website/src/components/ChatPane.tsx:219SessionGridView.tsx:356website/src/components/SessionGridView.tsx:356SessionsPage.tsx:299website/src/pages/SessionsPage.tsx:299ChatSidebar.tsx:5212website/src/pages/chat-sidebar/HistoryPane.tsx:286ChatPage.tsx:6459website/src/pages/ChatPage.tsx:2245MembersPage.tsx:5286website/src/pages/members/MembersPage.tsx:5283sessionsProvider.ts:174website/src/components/commandPalette/providers/sessionsProvider.ts:174recentsProvider.ts:304website/src/components/commandPalette/providers/recentsProvider.ts:304recentsProvider.ts:392website/src/components/commandPalette/providers/recentsProvider.ts:392Additional sites verified on main
0694e63a87ffb40a332ff3664b803ba71ea4bed1after the latest First Principles review:website/src/components/SessionRefStrip.tsx:58— attached-reference chipwebsite/src/pages/members/MembersPageProfile.tsx:560— driving-session rowwebsite/src/apps/command-bar/CommandBarOverlay.tsx:1044— attention rowwebsite/src/apps/command-bar/CommandBarOverlay.tsx:1085— recent rowThese are source-verified, not browser-reproduced. The attention row requires a pill status; recent rows exclude empty new slots and attention slots. Their issues preserve those filters. No sibling code changes are included here.
Existing follow-ups: #20348 (remote crew header), #20349 (session tab label), #20362 (ChatEmbed loading and older-untitled wording).
The sidebar history-row implementation moved from ChatSidebar.tsx into chat-sidebar/HistoryPane.tsx; the same key fallback remains. ChatPane, ChatPage, and MembersPage also have updated line numbers. The recents-provider issues distinguish blank current titles from older blank titles with nonempty previews; they do not claim filtered-out history entries are displayed.
Pattern harvest
Loading and age-aware titles are tracked separately in #20362 (tier:T1, unassigned). This PR still shows "New session" before the first title fetch and on resumed untitled chats with prior messages; it does not claim to solve either wording limit.
Rule candidate: review-prompt
Pattern: a session's internal key used as the display-text fallback for a missing title (
title || key).At rebased head
dccbfece803fcb2d6c57af651332e1a4b88ca57f, the review's broader inventory contains 11 remaining fallback sites across 10 files, beyond the ChatEmbed header fixed here:website/src/pages/chat/crew-window/CrewChatWindow.tsx:300— remote crew header; tracked in fix: hide untitled slot ids in the remote crew chat header #20348.website/src/components/SessionTabStrip.tsx:232— session tab label; tracked in fix: hide untitled slot ids in session tab labels #20349.website/src/pages/SessionsPage.tsx:299— session row label.website/src/pages/ChatSidebar.tsx:5212— history row label.website/src/components/SessionGridView.tsx:356— grid label.website/src/pages/ChatPage.tsx:6459— history row label.website/src/components/ChatPane.tsx:535— pane title fallback.website/src/pages/members/MembersPage.tsx:5286— driving-session row label.website/src/components/commandPalette/providers/sessionsProvider.ts:174— search-result title fallback.website/src/components/commandPalette/providers/recentsProvider.ts:304,392— current and older result-title fallbacks. Rendering has separate empty-slot/history filtering; these fields are not proof that every empty session exposes its key.All 11 sites are deferred, not fixed here. #20348 and #20349 track the two originally named siblings; the nine remaining sites now each have their own issue in Related Issues above, with locations reverified on current main. A shared fallback policy needs separate design and regression coverage. This PR fixes only ChatEmbed and claims no shared solution.
The 11-site list above records the earlier review, not an exhaustive repository inventory. The latest review adds four source-verified sites across three files (#20907–#20910), linked in Related Issues. Those follow-ups remain outside this PR.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.