Repository navigation
fix(artifacts): align the detail toolbar and add send-to-session - #17194
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check by hand the popout hand-off to the session already open on [DESIGN-REVIEWED] 40ec56e Description read[DESCRIPTION-READ] a9348417864edc4a9dd4003da95760184a9e0500a5fe8ba6169f3478465a28cf 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) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The send-to-session hand-off fills the user's chat box with agent-facing text ("slug", "artifact_get"), so the user doesn't know what they're about to send. Watch
Suggestions
[UX-REVIEWED] 40ec56e Description read[DESCRIPTION-READ] 531d6d72465fb28182334c9e2465de1370f0cc40b624d8fced03227ec916f1cc That sha256 names everything this verdict read: the PR description, plus the 23 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) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The comment-draft prompt only covers send-to-session. Back, the companion chat and slot navigation still lose those drafts, and the page's existing leave registry already guards every exit. Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: let a user give an artifact to any chat session and see an even toolbar. The type says FIX, but this is a fix plus an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 40ec56e Description read[DESCRIPTION-READ] 72bcb44457516529285d800e66df63dc5c253a1ae9a76e108cdd04d09d900920 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: |
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: |
60f8cf0 to
273c9b5
Compare
|
Review dispositions for GPT 6.1
Opus 5.5 (advisory): empty session left after cancelling the comment-draft prompt. Fixed. The component takes a First Principles
UX Review evidence gaps: closed with screenshots of the menu listing existing sessions (including a truncated long title), the pre-filled composer after a pick, the failed-create ErrorNotice, and the full-width toggle with its tip. The "Untitled session" fallback is not pictured, and the description explains why.
CI fixed in this push: i18n literal (the prompt moved to |
273c9b5 to
304b246
Compare
|
Review dispositions for GPT 6.1
Opus 5.5: both blocking findings are the same as GPT F3 (owner decision) and GPT F5 (fixed). The advisory popout finding is GPT F2 (fixed). First Principles: the unused UX Review (advisory CONCERNS): declined. The icon was the reporter's own choice. The trigger shows its name within 100ms, the reference line is addressed to the agent and stays editable before sending, and the ErrorNotice already has a dismiss control while the menu stays available for a retry. |
304b246 to
43ee0c7
Compare
|
Review dispositions for GPT 6.1 F1 Opus 5.5 (advisory)
First Principles
Design Review note (same-slot branch relies on the best-effort raise): this is expected. When the main window already shows that slot on UX Review (advisory CONCERNS): declined in this PR. The reference wording is agent-addressed and editable, and the ErrorNotice is dismissable while the menu stays available to retry. The toolbar wrapping onto a second row at 1280px comes from the owner's choice to keep Copy and Send in the row. A visible "Send" label would widen that row further. |
43ee0c7 to
ec933f4
Compare
|
Review dispositions for GPT 6.1
Opus 5.5
Design Review note (singleton across a ChatPage remount): the effect's cleanup unregisters only the entry it registered ( First Principles item 2 (Copy placement): owner decision, as above. Item 4 (no linked request for send-to-session): the reporter asked for it directly in the session that produced this PR. There is no issue to link. UX Review (advisory CONCERNS): unchanged from the previous round's disposition. |
|
@iamwhatever, about your review on
Not changed here: the Design and First Principles scope CONCERNS (the app-wide edit leave guard and |
|
Disposition for GPT 6.1 on
The same commit also fixes the Opus 5.5 findings on the popover; they are covered in their own disposition. This push also rebases onto main |
|
Disposition for Opus 5.5 on
"still closes on a plain Escape and on an outside click" pins the unchanged behaviour. Still 2 commits. |
chenmingwei23
left a comment
There was a problem hiding this comment.
[code-review-sage] No blocking issues; 3 should-fix notes (scope of the leave veto, a description claim with no diff, an unescaped name in the agent prompt).
Review feedback only. This is not an approval and does not request changes; the verdict is the maintainers'.
Phase 1 (design gate: CONCERNS, design risk medium). Problem: the artifact detail toolbar has uneven control heights, a stray Copy row, and no way to point an agent in an existing session at an artifact. The toolbar fix (the 32px rule never reached the wrapped selects) goes to the root cause, and the More menu plus a plain-text, draft-only send-to-session hand-off is proportionate, with the keyboard, popout and comment-draft paths tested. The weak lens is scope: the same PR also adds an app-wide leave veto (dirty edit buffer guard for sidebar, palette and Back, plus a mayLeave check on every popout-forwarded intent) that the stated Goal does not need, because send-to-session is already hidden while editing. The earlier Escape-in-More and endEditing defects are fixed at this head (verified in the diff).
Findings:
- should-fix, website/src/pages/ArtifactDetailPage.tsx and website/src/utils/navIntent.ts: the leave guard and the mayLeave veto are outside the Goal. Consequence: any popout-forwarded intent ("Ask agent to address", timeline links) is silently dropped while the main window has a dirty edit, and the user must repeat it after answering a dialog; this changes existing exits on every page that publishes a stake. Split it into its own PR, or record maintainer acceptance in a PR comment and say why in the description. The Design and First Principles lanes and the earlier human review all asked for this, and no maintainer decision is on record at this head.
- should-fix, PR description: it says CHUNK_BUDGETS.App in website/scripts/check-bundle-size.mjs moves from 2094 KB to 2199 KB, but the diff does not touch that file (main already has App at 2200 KB). A phantom claim hides whether the bundle gate was reviewed. Remove the bullet, or include the change if it is still needed after the rebase.
- should-fix, website/src/components/artifactReference.prompt.ts: the artifact name is interpolated unescaped into a line that lands in the user's own composer. An agent-chosen name containing a quote or newline can append extra instruction lines to a message the user may send without re-reading. Use the first line only, strip backticks and newlines, and quote with JSON.stringify.
Merge state at this head: GitHub reports the PR as CONFLICTING. A trial merge against current main conflicts in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json and website/src/uiLocations/guidePlans.gen.ts (the generated files can be regenerated; the README needs a hand merge). The earlier CHANGES_REQUESTED review is still on the PR, and its scope request is the first finding above. All CI checks on this head pass or are skipped.
Coverage: every changed source hunk (ArtifactDetailPage, ArtifactSendToSession, CommentThreadPopover, CommentsSidebar, HoverTip, ReadingWidthToggle, navIntent, popoutController, App, useSelectionComposerAnchor, CSS, docs) was walked against the nine dimensions; locale files and generated indexes were checked for key consistency only.
| // dirty buffer refuses the exit and opens the app's own discard dialog; after | ||
| // a discard the user repeats the navigation. The refused navigation cannot be | ||
| // resumed from here: the registry does not pass its target. | ||
| useRegisterNavigationLeaveGuard(() => { |
There was a problem hiding this comment.
should-fix: this guard (with usePublishNavigationStake below) is outside the PR Goal; send-to-session is already hidden while editing.
useRegisterNavigationLeaveGuard(() => {
if (!dirty) return trueConsequence: a dirty edit now vetoes the sidebar, the palette and browser Back app-wide, and the refused navigation is lost (the registry passes no target), so the user repeats the click after the dialog.
Suggestion: move the edit-buffer guard and the mayLeave check to their own PR, or get a maintainer to accept them in a PR comment and add the reason to the description.
| && intent.slotKey === prefill.slotKey && deps.appendToOpenComposer?.(prefill.slotKey, prefill.append)) { | ||
| return | ||
| } | ||
| if (deps.mayLeave && !deps.mayLeave()) return |
There was a problem hiding this comment.
should-fix: this veto applies to every intent a popout forwards, not only send-to-session.
if (deps.mayLeave && !deps.mayLeave()) returnConsequence: with a dirty artifact edit in the main window, a popout's "Ask agent to address" or timeline link does nothing visible after the dialog is answered; the whole intent (prefill, slot switch, navigate) is dropped.
Suggestion: keep the veto only for the send-to-session prefill path, or split it into the PR that adds the edit guard so the behavior change is reviewed on its own.
| * edit it before sending. | ||
| */ | ||
| export function artifactReferencePrompt(name: string, slug: string): string { | ||
| return `Reference artifact "${name}" (slug \`${slug}\`; load it with artifact_get).` |
There was a problem hiding this comment.
should-fix: the name is interpolated raw into text that is pre-filled into the user's composer.
return `Reference artifact "${name}" (slug \`${slug}\`; load it with artifact_get).`Consequence: an artifact name with a quote or newline (names can be set by the agent) can add extra instruction lines to a message the user may send unread.
Suggestion: use only the first line of the name, drop backticks and control characters, and quote it with JSON.stringify(name); add a test with a multi-line name.
CrysisDeu
left a comment
There was a problem hiding this comment.
Reviewed head 4f67796. The code resolves both defects from the standing CHANGES_REQUESTED, and send-to-session is client-only against the caller's own live slots with no new server surface. It still cannot merge as-is:
- CONFLICTING against main, 156 commits behind; please rebase.
- Scope:
useRegisterNavigationLeaveGuard+usePublishNavigationStake(dirty)(ArtifactDetailPage.tsx:1101-1116) let a dirty edit buffer veto sidebar / palette / browser Back app-wide. Both Design and First Principles flagged it. Decision: split the leave guard into its own PR so the toolbar + send-to-session change can land on its own. - Stale body: the "Bundle Size Gate 2094 -> 2199 KB" paragraph refers to a file not in the diff (main already carries 2200).
CommentThreadPopover.tsx:122-124:modalOpen()treats ANY[aria-modal="true"]outside the card as "stay open", so Escape stops dismissing the popover while an unrelated modal is up.
Will re-review after the rebase and split.
Posted by code-reviewer (Kiro Crew member) on behalf of @CrysisDeu. Full report on file.
|
/ai-review override first-principles 5bf70f1: same content passed First Principles on 4f67796; this head is a rebase only (range-diff shows no content change beyond regenerated digests and the rename of one call site main added); advisory lane, not security. 🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: override posted on the conductor's ruling. The command sits on the first line because the override workflow only parses the first line of a comment. |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.
|
iamwhatever
left a comment
There was a problem hiding this comment.
This PR evens out the artifact detail toolbar (32px controls, actions in a More menu), adds a draft-only Send to a session hand-off, and adds a leave guard for a dirty edit buffer. Head 5bf70f1d is the rebase and is no longer conflicting. Both defects from my last review are fixed. The document Escape handler skips an Escape that closes the More menu (ArtifactDetailPage.tsx:1051-1054), and the leave-guard discard calls endEditing() (:1109-1112), so an in-flight save cannot raise a stale 409. Three things still block. (1) The scope ruling you put to me is already made. Maintainer CrysisDeu ruled on 4f67796 that the edit-buffer leave guard (ArtifactDetailPage.tsx:1101-1116, the mayLeave veto in utils/navIntent.ts:86 and its App.tsx/NavigationLeaveGuard wiring) moves to its own PR. That ruling stands, so please split it out. The "resume navigation after discard" question (span 14fb3379) then belongs to that PR. (2) website/src/components/artifactReference.prompt.ts:9 interpolates the artifact name raw. A name is agent-settable, so a name with a newline or quote can add instruction lines to a draft the user may send without re-reading it. Use the first line only, strip backticks and control characters, quote with JSON.stringify(name), and add a multi-line-name test. (3) The description's Bundle Size Gate bullet (2094 -> 2199 KB) names check-bundle-size.mjs, a file the diff does not touch. Drop it. A new head is needed anyway, so fix the UX "failure notice runs two messages together" separator (span 0a38fde2) here rather than in a follow-up. If you would rather defer it, open an issue and link it in the description. — crew-pr-reviewer (deep re-check)
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: The edit-buffer leave guard is split out into #20355, as requested in the review. This branch is now rebased on top of it (head c0ad65d), so the first two commits here are #20355's and drop out once it merges; this PR's own changes are the last two commits.
Goal, Why and Not a goal are unchanged. Until #20355 merges, PR Hygiene counts four commits here; it will pass after the rebase onto main that follows that merge. |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: The draft-loss guard was split out as requested and merged on its own in #20355 (squash 79d021b). This branch is now rebased onto main at 2b98b8a and carries only the two toolbar commits. Checked on this head: the generated UI index is up to date, tsc is clean, and 17 targeted test files (333 tests) pass. The PR's Goal / Why / Not-a-goal are unchanged. @iamwhatever, please take another look when you have a moment. |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: dispositions for the UX and First Principles CONCERNS on head 2b98b8a. Both lanes are advisory here; no code change is pushed for them, because any push restarts every lane and this head is otherwise green. First Principles, item 7 — comment-draft check covers only send-to-session:
UX — reference line in the draft reads like code:
UX — failure notice runs into its cause:
UX — More items hide while editing:
UX — width tooltip names the state, not the action:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: dispositions for the Design CONCERNS on head 2915e53 (a conflict-only rebase of 2b98b8a onto main; range-diff shows commit 1 identical and commit 2 changed only in one feature-map context row). No code is pushed for these. Design — leave guard outside the PR's goal:
Design — new append path:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: dispositions for the UX CONCERNS on head 2915e53 (a conflict-only rebase of 2b98b8a onto main; range-diff shows commit 1 identical and commit 2 changed only in one feature-map context row). No code is pushed for these. UX — Snapshot vs Save:
UX — failed hand-off notice:
UX — repeat the navigation after Discard:
UX — wording of the draft reference line:
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: dispositions for the First Principles CONCERNS on head 2915e53 (a conflict-only rebase of 2b98b8a onto main; range-diff shows commit 1 identical and commit 2 changed only in one feature-map context row). No code is pushed for these. First Principles —
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: dispositions for the UX and First Principles CONCERNS on head b0f990e. This head is a conflict-only rebase of 2915e53 onto main 6d4f287. The one conflict (state declarations in UX — failed hand-off title "try again":
UX — width toggle tooltip names the current width:
UX — submenu hint "nothing is sent":
UX — wording of the draft reference line:
First Principles —
|
The artifact detail header mixed control heights: the version and kind selects sat inside wrappers the 32px toolbar rule did not reach, and the folder/star/tag chips were a smaller metadata size. Every control in the row is now 32px tall. The copy button moves from its own row above the body into the toolbar, and the reading-width toggle shows an unfold/fold icon instead of a one-letter cap (its two catalog keys are removed). A new Send to a session menu lists New session and the ten most recent live sessions. Picking one opens that session with a one-line artifact reference appended to its composer draft, so the agent there can load the artifact with artifact_get; nothing is sent until the user does. Toolbar tooltips use a shared HoverTip on top of InstantTip, so they appear after 100ms instead of the browser's title delay, and keep a permanent sr-only description for screen readers.
Move the agent-addressed reference prompt into a *.prompt.ts module so it stays English by design, and use the informal register for the new retry string in fr, ru, hi and bn. Guard the send-to-session hand-off against every unsaved comment: the selection composer and the comments sidebar's add, reply and edit boxes, which now report through onDraftDirtyChange. The guard runs before creating a new session, so cancelling it leaves no empty session. A confirmed discard takes effect at once (the sidebar's boxes reset and the selection toolbar remounts), so any draft present after the create was typed since and is asked about before leaving. It is skipped in a popout, which does not navigate. The hand-off is abandoned if the user starts editing while the create is in flight. A failed create and a failed Copy show through an ErrorNotice. Copy and the send trigger use Btn. From a popout, a hand-off to the session the main window already shows on /chat is appended to that live composer instead of written to the sessionStorage prefill, which activating an already-active slot never reads and which would later overwrite newer typing. A dirty artifact edit buffer registers with the app shell's leave registry and publishes its stake, so the sidebar, the command palette and browser Back cannot discard it. The registry needs a synchronous answer, so the guard refuses the exit and opens the page's own async discard dialog rather than window.confirm; after a discard the user repeats the navigation. A navigation intent a popout forwards to the main window runs the same check before it stages a prefill, switches slot or navigates; a refusal drops the intent. Wrap the tag name in its own element: the remove button's tooltip keeps an sr-only label inside the chip, which broke exact-text tag lookups. Drop HoverTip's unused placement parameter, and make its description target hidden so a wrapped control's label is not read again as page text. A popout hand-off to the session /chat already shows is staged on the store's mainComposerAppend, so ChatPage or the split-view grid pane for that session merges it, instead of through a module-level open-composer registry. The save-conflict suite finds the Edit button by its HoverTip description.
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#17194]: dispositions for the UX and First Principles CONCERNS on head 40ec56e. This head is a clean rebase of b0f990e onto main 0694e63 (which fixed main's UX — draft reference line reads as machine text:
UX — "Send to a session" read as a guess / unclear whether it sends:
UX — width toggle tooltip names the current width:
First Principles — item 7, comment-draft check covers only send-to-session:
|
Problem / Motivation
Goal: The artifact detail toolbar is one even row, and an artifact can be handed to any chat session for the agent there to use.
On the artifact detail page the header controls are different heights: the version and kind selects stand taller than the buttons beside them, and the folder / Star / tag chips are shorter. The copy button sits alone on its own row above the body, wasting a full line. There is also no way to point an agent in another session at an artifact: the only agent entry point is the companion chat bound to this page. The reading-width toggle is a bare letter (M / F) that reads as off-centre among line icons, and toolbar tooltips use the browser's
title, which takes about a second to appear.Why it matters
The toolbar is the first thing on every artifact page, so the uneven row and the stray copy line are visible on every visit. Handing an artifact to an existing session is the common case when the work that needs it is already in progress elsewhere; today the user has to copy the slug by hand and explain how to load it.
Not a goal
artifact_get.titletooltips on pages other than the artifact detail toolbar.What changed (motivation → approach → change)
divescaped it. The rule now reaches them, icon buttons are 32×32 squares, and the folder / Star / tag chips share oneh-8chip size.UnfoldHorizontal(medium, click widens) /FoldHorizontal(full, highlighted). Its two single-letter catalog keys are removed. The md-notebook page shares this component and gets the same icon. Requested by the reporter, who could not tell what the letter did ("M图标是干啥的", "what is the M icon for"); the control now also shows its name on hover within 100ms.max-two-buttons-per-row): Edit (or Revert on a historical version) and the companion-chat toggle, or Save and Cancel while editing. Everything else moves into one labelled More menu built on the app'sDropdownMenu(theCronRowActionspattern), keyboard-operable (Enter/ArrowDown opens it, focus moves into it, Escape returns focus to the trigger): Snapshot and Preview while editing, Snapshot of a drifted live state, Full width (a checkbox item), Show/Hide comments with the count, the pop-out entries, Copy content, the Send to a session submenu, Publish (a checkbox item reporting its panel) and Download. Copy keeps the menu open so its Copied label confirms success; a failed copy closes the menu and is reported only by the page'sErrorNotice. New catalog keysmore/more_actions; the tooltip-only keys the moved buttons used are removed.sendNavand appendsReference artifact "<name>" (slug \`; load it with artifact_get).to that session's draft viamergeIntoDraft, so an unsent draft survives. Nothing is sent automatically. The menu is hidden while editing so navigating away cannot drop unsaved edits. The unsaved-comment-draft prompt runs before anything else, including creating the new session, so cancelling it leaves no empty session; it covers the selection composer, the comments sidebar's add, reply and edit boxes, and the floating thread popover's reply and edit boxes (reported through the sameCommentDraftReportProvider; answering the prompt does not count as an outside click that dismisses the popover, and a confirmed discard closes it), and a confirmed discard takes effect at once (the sidebar's boxes reset throughdiscardSignaland the selection toolbar remounts), so after a new session is created any draft still present was typed since and is asked about before navigating; the accepted cost is that if the create fails, the discarded draft is already gone; the sidebar check is deliberately scoped to send-to-session, since Back and the other existingsendNavexits drop that text on main today too and are out of this PR's goal. In a popout the guard is skipped, becausesendNavforwards to a main window and the popout stays on the artifact. The create's state lives in the page-owneduseArtifactSendToSessionhook, because the menu closes (and unmounts the submenu) on select while a New-session create is still in flight; if the user starts editing during that create, the hand-off is abandoned. A failed create shows as anErrorNoticeon the page, and so does a failed Copy (the menu closes so the notice is on screen; the item itself keeps its normal label). From a popout, a hand-off to the session the main window already shows on/chatis staged on the store's existingmainComposerAppend(viastageToMainComposer), whose consumers — ChatPage, or the split-view grid pane for that session — merge it into the live draft, instead of written to the sessionStorage prefill, which an already-active slot never re-reads. The reference line lives inartifactReference.prompt.ts(English by design, like other agent prompts). It reusesprepareCurrentSlots,createSlot,writePrefillandmergeIntoDraft`; the only new logic is the reference line.mayLeavecheck were split out on review and landed on main in fix(artifacts): ask before an in-app exit drops unsaved artifact edits #20355; this branch is rebased on top of it and only adds the same-slot append branch, which leaves no page and does not ask.HoverTipwrapper over the existingInstantTipshows the label after 100ms. It pointsaria-describedbyat a permanenthiddencopy of the label, so screen readers still get the text thetitleused to supply without reading it again as page text. Every toolbar control uses it.docs/system-specs/modules/artifacts.mddocuments the toolbar row, the More menu and the send-to-session submenu;docs/feature-map/README.mdnames them on the Artifact detail and Publishing rows.Backwards compatibility
Compatible: no API, stored data or config changes; the frontend-only edits keep every existing toolbar action.
Reader: website/src/components/ReadingWidthToggle.tsx:LABEL_KEY -- app (artifact detail, md-notebook) -- the only reader of
components.readingWidthToggle.label_md/label_fullon origin/main; it now renders an icon, so nothing else reads the removed keys.Reader: website/src/apps/md-notebook/MdNotebookPage.tsx:ReadingWidthToggle -- app -- renders the same component with the icon instead of the letter;
MdNotebookPage.coverage.test.tsxpasses.Tests
ArtifactSendToSession.test.tsx: the reference names the slug; the menu lists live sessions but not artifact-bound companion chats; picking a session appends the reference to its stored draft; New session creates a slot and hands off to it; a failed create is reported to the page and does not hand off; when the page declines to leave (the comment-draft prompt answered "keep"), no session is created. Disabling the guard on New session reddenscreates no session when the page declines to leave; removing the editing check reddensabandons the hand-off when the user starts editing while the session is being created, andfinishes a New session hand-off after the menu has closedpins that the create outlives the menu;ArtifactDetailPage.anchoredComments.test.tsxcovers a draft started during the create (asked about), one already confirmed (not asked again), a new comment started after a confirmed discard (asked about, and the sidebar box was cleared at confirm), and the selection composer closing at confirm; removing the sidebar reset or the toolbar remount reddens its test.ArtifactDetailPage.popoutNav.test.tsx: in a popout, sending over an unsaved sidebar comment forwards to the main window without a prompt and keeps the text; removing the popout skip reddens it.CommentsSidebar.test.tsx: the add box and a reply box report unsaved text; reportingfalsefromReplyBoxreddens the reply case.ArtifactDetailPage.anchoredComments.test.tsx: sending to a session over an unsaved sidebar comment asks first, and cancelling creates no session and keeps the text; removing the sidebar check reddens it.ArtifactDetailPage.leaveGuard.test.tsx: with a dirty buffer the shell's leave check refuses and opens the app discard dialog (nowindow.confirm, one dialog on a repeated ask); discarding lets the repeated navigation leave, cancelling keeps the edit; a clean buffer leaves without asking. Restoringwindow.confirmreddens both dirty cases and the ratchet.App.navLeaveGuard.test.tsx: a popout-forwarded intent asks the page on screen, keeps it on a declined confirm and navigates on an accepted one. WiringmayLeaveto always-true reddens the declined case.popoutNavForwarding.test.ts: the same-slot append does not ask the page to leave (the refused-leave cases ship with fix(artifacts): ask before an in-app exit drops unsaved artifact edits #20355).popoutNavForwarding.test.ts: a hand-off to the slot the open composer shows is appended there with no sessionStorage prefill and no slot switch; a different slot still gets the prefill. Disabling the same-slot branch reddens the first.HoverTip.test.tsx: the description target ishidden, so a wrapped control inside a heading is not read twice as page text (reverting tosr-onlyreddens it); the tip opens after the short delay rather than the OStitledelay, opens at once on keyboard focus, and keeps its description while closed; the reading-width toggle renders an icon with no nativetitle.ArtifactDetailPageCoverage.test.tsxpins the row: exactly Edit, the chat toggle and More in view mode; Save, Cancel and More while editing; Revert, the chat toggle and More on a historical version (adding any button back to the row reddens them). It also opens More from the keyboard (focus enters the menu, Escape returns it to the trigger), and drives each moved action from the menu: Pop out to window, Full width (stays open,aria-checkedflips), Publish (aria-checked), Download, Focus / Bring back, Snapshot (live and edit), Preview, comments.ArtifactDetailPageCoverage.test.tsx: a reply typed in the thread popover is asked about before Send to a session; Cancel (a real mousedown + click on the dialog) keeps it and creates no session, a confirmed discard closes the popover and hands off. Dropping the popover from the guard reddens both; letting the popover's outside-dismiss see the dialog reddens the Cancel case.App.navLeaveGuard.test.tsx: a popout hand-off to the session/chatshows is staged onmainComposerAppendwith no sessionStorage prefill, and another slot still gets the prefill; removing the App wiring reddens the first.artifactMoreMenu.tshelper; the copy suite reads Copied off the menu item and a failure off the page notice, with the menu closed.Manual verification
Built the SPA and ran it on a pod for this worktree with a seeded markdown artifact and three titled sessions, in a real browser. Every header control measured 32px tall; hovering a control shows its tip immediately. Picking an existing session opened it with the reference pre-filled in the composer. A failed create was forced by intercepting
POST /api/chat/slotswith a 503, and the page showed the ErrorNotice.Local gate: tsc, eslint (
--max-warnings=0),i18n:checkwithI18N_BASE_REF=origin/main, and docs-lint pass; the full frontend suite passes on this revision (2733 files, 46161 tests passed, 1 expected fail, 2 skipped). The backend half oflocal-gate.pyreported failures only in files this frontend-and-docs diff does not touch, which come from this host's sandbox environment; CI runs them.Screenshots / video
Captured with
website/scripts/capture-artifact-toolbar-more.mjsagainst the built SPA with stubbed API data. Each frame light, then dark.The header row in view mode: version, Edit, the companion chat and More.
More open: Full width, Hide comments, Pop out to window, Copy content, Send to a session, Publish, Download.
More → Send to a session: New session and the recent sessions.
Editing: Save and Cancel stay in the row; More (opened from the keyboard) holds Snapshot, with its shortcut and disabled until there are edits, and Preview.
A failed New session create (the gateway answered 503) shows as an ErrorNotice under the toolbar.
Picking Release prep in the submenu opens Release prep with the reference pre-filled in its composer.
A historical version: Revert takes the Edit slot in the row.
Popped out: More offers Focus popped-out window and Bring artifact back to this window instead of Pop out.
The Notes app keeps the reading-width toggle as a button: the icon at medium width, with its tip.
The same toggle at full width, pressed, with its tip.
Related Issues
N/A — reported directly.
Pattern harvest
Rule candidate: review-prompt
Pattern: a "make every child N px" CSS rule written as a direct-child selector silently misses controls wrapped in a layout
div; size the control itself or match the wrapped descendant.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement