Skip to content

fix(artifacts): align the detail toolbar and add send-to-session - #17194

Merged
buluoray merged 2 commits into
mainfrom
fix/artifact-toolbar-copy-send
Oct 15, 2026
Merged

buluoray merged 2 commits into
mainfrom
fix/artifact-toolbar-copy-send

Conversation

@buluoray

@buluoray buluoray commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Attaching an artifact as a structured chip in the chat composer; the reference is plain text the agent resolves with artifact_get.
  • Replacing native title tooltips on pages other than the artifact detail toolbar.
  • Changing the companion chat panel or its sparkle toggle.

What changed (motivation → approach → change)

  • Heights: the toolbar's 32px rule targeted direct children, so the selects wrapped in a div escaped it. The rule now reaches them, icon buttons are 32×32 squares, and the folder / Star / tag chips share one h-8 chip size.
  • Copy: moved off its own row above the body (the row is gone) into the toolbar's More menu.
  • Reading width: the M / F letter cap becomes 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.
  • Two actions in the row, the rest in More: the header row keeps at most two actions beside the version select (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's DropdownMenu (the CronRowActions pattern), 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's ErrorNotice. New catalog keys more / more_actions; the tooltip-only keys the moved buttons used are removed.
  • Send to a session (new, More → submenu): a submenu with New session and the ten most recent live sessions, leaving out artifact-bound companion chats. Picking one navigates through the page's existing sendNav and appends Reference 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 same CommentDraftReportProvider; 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 through discardSignaland 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 in artifactReference.prompt.ts(English by design, like other agent prompts). It reusesprepareCurrentSlots, createSlot, writePrefillandmergeIntoDraft`; the only new logic is the reference line.
  • Leaving with unsaved edits: no longer part of this PR. The edit-buffer leave guard and the popout-intent mayLeave check 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.
  • Tooltips: a small HoverTip wrapper over the existing InstantTip shows the label after 100ms. It points aria-describedby at a permanent hidden copy of the label, so screen readers still get the text the title used to supply without reading it again as page text. Every toolbar control uses it.
  • docs/system-specs/modules/artifacts.md documents the toolbar row, the More menu and the send-to-session submenu; docs/feature-map/README.md names 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_full on 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.tsx passes.

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 reddens creates no session when the page declines to leave; removing the editing check reddens abandons the hand-off when the user starts editing while the session is being created, and finishes a New session hand-off after the menu has closed pins that the create outlives the menu; ArtifactDetailPage.anchoredComments.test.tsx covers 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; reporting false from ReplyBox reddens 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 (no window.confirm, one dialog on a repeated ask); discarding lets the repeated navigation leave, cancelling keeps the edit; a clean buffer leaves without asking. Restoring window.confirm reddens 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. Wiring mayLeave to 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 is hidden, so a wrapped control inside a heading is not read twice as page text (reverting to sr-only reddens it); the tip opens after the short delay rather than the OS title delay, opens at once on keyboard focus, and keeps its description while closed; the reading-width toggle renders an icon with no native title.
  • ArtifactDetailPageCoverage.test.tsx pins 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-checked flips), 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 /chat shows is staged on mainComposerAppend with no sessionStorage prefill, and another slot still gets the prefill; removing the App wiring reddens the first.
  • Every ArtifactDetailPage suite that reached a moved control now goes through the shared artifactMoreMenu.ts helper; 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/slots with a 503, and the page showed the ErrorNotice.

Local gate: tsc, eslint (--max-warnings=0), i18n:check with I18N_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 of local-gate.py reported 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.mjs against 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.

Light theme: artifact toolbar with Version, Edit, chat and More buttons
Dark theme: artifact toolbar with Version, Edit, chat and More buttons

More open: Full width, Hide comments, Pop out to window, Copy content, Send to a session, Publish, Download.

Light theme: More menu open with the moved toolbar actions
Dark theme: More menu open with the moved toolbar actions

More → Send to a session: New session and the recent sessions.

Light theme: Send to a session submenu listing New session and three sessions
Dark theme: Send to a session submenu listing New session and three 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.

Light theme: editing, Save and Cancel in the row and More open with Snapshot and Preview
Dark theme: editing, Save and Cancel in the row and More open with Snapshot and Preview

A failed New session create (the gateway answered 503) shows as an ErrorNotice under the toolbar.

Light theme: failed New session create shown as an ErrorNotice under the toolbar
Dark theme: failed New session create shown as an ErrorNotice under the toolbar

Picking Release prep in the submenu opens Release prep with the reference pre-filled in its composer.

Light theme: Release prep session opened with the artifact reference pre-filled
Dark theme: Release prep session opened with the artifact reference pre-filled

A historical version: Revert takes the Edit slot in the row.

Light theme: historical version v1 with Revert in the row beside chat and More
Dark theme: historical version v1 with Revert in the row beside chat and More

Popped out: More offers Focus popped-out window and Bring artifact back to this window instead of Pop out.

Light theme: More menu while popped out, with Focus and Bring back entries
Dark theme: More menu while popped out, with Focus and Bring back entries

The Notes app keeps the reading-width toggle as a button: the icon at medium width, with its tip.

Light theme: Notes app reading-width toggle icon at medium width with its Medium width tip
Dark theme: Notes app reading-width toggle icon at medium width with its Medium width tip

The same toggle at full width, pressed, with its tip.

Light theme: Notes app reading-width toggle pressed at full width with its Full width tip
Dark theme: Notes app reading-width toggle pressed at full width with its Full width 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

  • 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

@buluoray
buluoray requested a review from a team as a code owner October 6, 2026 02:01
@buluoray
buluoray requested a review from bolichen97 October 6, 2026 02:01
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 40ec56eba217e3ae40475fa355cc900723a3e5f1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check by hand the popout hand-off to the session already open on /chat: it relies on mainComposerAppend reaching the live draft in both ChatPage and the split-view pane.

[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 .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 Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of 40ec56eba217e3ae40475fa355cc900723a3e5f1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • Pre-filled reference reads as machine text. artifactReference.prompt.ts puts Reference artifact "Release checklist" (slug \release-checklist`; load it with artifact_get).into the user's own composer, where it shows under "Prompt pre-filled — add context, then Send". The blind reader said "The words 'slug' and 'artifact_get' mean nothing to me… I'm uneasy because I don't understand what I'm sending" (shot-11). Every hand-off goes through this, so every user sees it on the PR's main path. Smallest fix: put a plain-language clause first, e.g.Use the artifact "Release checklist" (…)`, so the human-readable part leads and the tool hint comes after.
  • "Send to a session" was only a guess. The reader said "a guess" for the entry (shot-03) and still asked "whether it sends straight away or lets me add a note first" (shot-05). It is the primary new control. Making the entry say it only adds to the draft would answer that before the click, e.g. Add to a session's draft.
  • The width toggle mixes two meanings. The icon now shows what a click will do (arrows out = widen), but the tooltip keeps state labels ("Medium width" / "Full width"). The More menu's "Full width" item reads as an action. The reader "can't tell whether the hint describes what it is now or what clicking will do" (shots 17–20). This is a frequent control on two pages. Fix: change title_md / title_full to describe the action ("Widen to full width" / "Narrow to medium width").

Suggestions

  • send_to_session_failed "Could not start a session — try again": the reader read "try again" as a link that does nothing (shot-09). Change it to "Could not create the new session. Pick New session again." so it says exactly what to redo.

[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 .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 Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🟡 CONCERNS

Premise-level review of 40ec56eba217e3ae40475fa355cc900723a3e5f1 — 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/CONCERNS are advisory.

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

  • Item 7 — symptom-level: the description says "the sidebar check is deliberately scoped to send-to-session, since Back and the other existing sendNav exits drop that text on main today too". Grepping sendNav( in ArtifactDetailPage.tsx finds 3 sibling exits the guard skips: lines 1860, 2074 and 2787. The real gap is that comment drafts never reach the page's leave check. useRegisterNavigationLeaveGuard (website/src/components/NavigationLeaveGuard.tsx:128) is already registered at ArtifactDetailPage.tsx:1152 for the edit buffer, and every wired exit asks it.
    Subtraction: delete discardDraftsBeforeLeaving / guardSendToSession, the composerResetNonce / discardSignal resets and the sidebar/popover dirty reporting. Have the existing registered guard (plus usePublishNavigationStake) also refuse while a comment draft is dirty.
    Clears when: comment drafts are covered by the existing leave registry for all exits, or the description names a send-to-session-only need the registry's synchronous refuse-and-ask cannot meet.

What this change ships

Inventory (10 items) — 9 justified

Intent: 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.

  1. Toolbar selects, buttons and chips are all one height — justified
  2. Copy moved off its own row into More — justified
  3. Snapshot, Preview, Full width, Comments, Pop-out, Publish and Download moved into a More menu — justified
  4. Reading-width letter M/F replaced by fold icons (artifact page and Notes app) — justified
  5. Toolbar tooltips appear after 100ms instead of the native delay — justified
  6. New "Send to a session" submenu: new session or one of the 10 most recent, adds a reference line to the draft — justified
  7. Discard prompt for unsaved comment drafts before send-to-session, covering sidebar and popover — symptom-level, guards 1 of 4 exits
  8. From a popout, a hand-off to the session already open is added to its live composer — justified
  9. Playwright screenshot script for the toolbar — justified
  10. Spec, feature-map and UI-index entries — justified

[FIRST-PRINCIPLES-REVIEWED] 40ec56e

Description read

[DESCRIPTION-READ] 72bcb44457516529285d800e66df63dc5c253a1ae9a76e108cdd04d09d900920

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 Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 40ec56eba217e3ae40475fa355cc900723a3e5f1 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 40ec56e

Verdict parsed from the review's SHA-scoped output markers for commit 40ec56eba217e3ae40475fa355cc900723a3e5f1.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 40ec56eba217e3ae40475fa355cc900723a3e5f1: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 40ec56eba217e3ae40475fa355cc900723a3e5f1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 40ec56e

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 40ec56eba217e3ae40475fa355cc900723a3e5f1: <one-sentence reason>

@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 Oct 6, 2026
@buluoray
buluoray force-pushed the fix/artifact-toolbar-copy-send branch from 60f8cf0 to 273c9b5 Compare October 6, 2026 06:19
@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 Oct 6, 2026
@buluoray

buluoray commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Review dispositions for 273c9b5f1d33c963c9dbc81071f5036d71b365d1 (findings were raised on 60f8cf08c5).

GPT 6.1

  • F1 max-two-buttons-per-row (Copy and Send grow the grandfathered row): owner decision, not fixed. The repo owner chose to keep both in the toolbar rather than fold them into an overflow menu. That trade-off is recorded by the owner's override comment, not here.
  • F2 errors-use-error-notice: fixed. A failed New session create now renders through ErrorNotice on the page (the menu has already closed by then), with a dismiss control. The trigger no longer changes colour or label. Screenshot in the description.
  • F3 page-layout-pattern (raw <button>): fixed. Copy and the Send trigger both use Btn.

Opus 5.5 (advisory): empty session left after cancelling the comment-draft prompt. Fixed. The component takes a beforeSend gate that wraps session creation, so the guard runs first. creates no session when the page declines to leave covers it, and it goes red when the guard is bypassed on New session.

First Principles

  • Copy move reversing d159a6b's "toolbar must not grow" placement: owner decision, same as GPT F1. The description now says so.
  • M/F to icon "no user named": rebutted. The reporter asked what the M icon was for, so it is a direct request. That is now cited in the description.

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.

  • Watch, "three send controls look alike / icon-only trigger": declined. The trigger shows its name within 100ms on hover and focus, and a text label would grow the row further.
  • Suggestion, "Recent sessions" heading: declined for now. The separator already splits New session from the list.

CI fixed in this push: i18n literal (the prompt moved to artifactReference.prompt.ts), fr/ru/hi/bn register tests, and the E2E tag-badge lookup (the tag name is now wrapped in its own element, so the remove button's sr-only tooltip copy no longer joins the chip's text).

@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 Oct 6, 2026
@buluoray
buluoray force-pushed the fix/artifact-toolbar-copy-send branch from 273c9b5 to 304b246 Compare October 6, 2026 07:49
@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 Oct 6, 2026
@buluoray

buluoray commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Review dispositions for 304b246401e0c935831ed590bf6404084d0e42ff (findings were raised on 273c9b5f1d).

GPT 6.1

  • F1, unsaved sidebar drafts and editor text entered while the create is pending: fixed. CommentsSidebar reports unsaved text in its add, reply and in-place edit boxes through onDraftDirtyChange. The send guard asks about those as well as the selection composer. It runs before the session is created and again before navigating to it. If the trigger unmounts because the user started editing while the create was in flight, the hand-off is abandoned. Three tests cover this, and each goes red when its check is removed.
  • F2, same-slot delivery from a popout leaves a stale prefill: fixed. When the main window already shows the target slot on /chat, the hand-off is appended to that live composer through registerOpenComposer (using the new prefill.append). No sessionStorage prefill is written and no slot switch happens. Covered in popoutNavForwarding.test.ts.
  • F3 max-two-buttons-per-row: owner decision. It will be recorded by the owner's override.
  • F4, copy failure is tooltip-only: not changed. This PR moves the Copy button. It does not change how copy failures are reported. The page records that decision in a code comment above copyLabel: a clipboard failure is a browser outcome, not a rejected request, and the editor buffer may be dirty. The copy controls in AssistantMessage and PinnedMessagesPanel make the same choice.
  • F5, the new ErrorNotice had no hand-off decision: fixed. It now carries {/* No hand-off: comment draft (sidebar / selection composer text) */}, matching its sibling notices.

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 className prop on ArtifactSendToSession and the unused placement parameter on HoverTip are removed. The placement item is the same owner decision as above.

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.

@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 Oct 6, 2026
@buluoray
buluoray force-pushed the fix/artifact-toolbar-copy-send branch from 304b246 to 43ee0c7 Compare October 6, 2026 08:30
@buluoray

buluoray commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Review dispositions for 43ee0c7eb2e8dedca079c36d9a19bc78b9164190 (findings were raised on 304b246401).

GPT 6.1 F1 max-two-buttons-per-row: this is an owner decision. It will be recorded by the owner's override.

Opus 5.5 (advisory)

  • The second prompt after a confirmed discard could strand the new session: fixed. The guard runs once per hand-off, and there is no longer a re-check after the create. asks the page once per hand-off, not again after the session is created goes red if the second call is restored. A comment typed in the ~100ms create window is not re-guarded. That trade-off is intentional, because a second prompt would re-ask about the draft the user had just agreed to discard.
  • A popout prompted for a loss that never happens and cleared the saved draft: fixed. guardSendToSession proceeds directly when popout is true. In that case sendNav forwards the intent to the main window, and the popout stays put. Covered in ArtifactDetailPage.popoutNav.test.tsx.

First Principles

  • Item 6, sidebar check on only one of four exits: scope stated in the description. The check covers send-to-session only. Back and the existing sendNav exits behave the same as they do on main, and changing them is outside this PR's goal.
  • Item 7, pendingInput duplicate: explained in the description. Its intake replaces the composer with the payload, and only ChatPage holds the live text that an append has to merge with.
  • Item 2, Copy placement: this is the same owner decision as GPT F1.

Design Review note (same-slot branch relies on the best-effort raise): this is expected. When the main window already shows that slot on /chat, switchSlot and navigate would both be no-ops. window.focus() still runs on both branches.

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.

@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 Oct 6, 2026
@buluoray
buluoray force-pushed the fix/artifact-toolbar-copy-send branch from 43ee0c7 to ec933f4 Compare October 6, 2026 09:09
@buluoray

buluoray commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Review dispositions for ec933f4d57d3291b73d923a3a235ad95c96b92ed (findings were raised on 43ee0c7eb2).

GPT 6.1

  • F1, comment typed during a slow create is lost: fixed. It no longer conflicts with the earlier Opus finding. Before navigating to the created session, the page asks again, but only about a draft STARTED since the first prompt. It never re-asks about a draft the user already agreed to discard. There are two tests in ArtifactDetailPage.anchoredComments.test.tsx, one for each half of the check. Removing either half reddens its test.
  • F2 max-two-buttons-per-row: owner decision, to be recorded by the owner's override.
  • F3, copy failure bypasses ErrorNotice: fixed under the rule's touch-it-migrate-it clause. A failed copy now also sets a page ErrorNotice (No hand-off: comment draft). It stays until dismissed or until the next copy, after the button's glyph reverts. Covered in ArtifactDetailPage.copy.test.tsx.

Opus 5.5

  • BLOCKING toolbar growth: same as GPT F2 (owner decision).
  • HoverTip's sr-only description read inline (a heading read as " Rename this artifact"): fixed. The description target is now hidden. aria-describedby still resolves it, and it no longer joins the reading order. keeps the description out of the reading order… goes red if the span goes back to sr-only.

Design Review note (singleton across a ChatPage remount): the effect's cleanup unregisters only the entry it registered (if (openComposer === entry)), and the remount registers again. A hand-off that arrives in between finds no open composer and takes the ordinary sessionStorage path, which the mounting ChatPage then reads.

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.

@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 Oct 6, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

@iamwhatever, about your review on 980694e777: both defects are fixed in c3c1eb11b6. That head is rebased onto current main and still has 2 commits. The fixes are folded into the second commit.

  1. Escape that closes More also left edit mode: fixed. The document keydown handler in ArtifactDetailPage.tsx now returns early when the Escape event's target is inside [role="menu"], which covers the More menu and its Send submenu. An Escape outside a menu still cancels the edit. Tests in ArtifactDetailPage.leaveGuard.test.tsx: "closes the menu and keeps a clean editor open", "closes the menu without asking to discard a dirty buffer", and "still cancels the edit on an Escape outside the menu". Mutation: remove the [role="menu"] check, and the first two go red.
  2. Leave-guard discard did not end the edit generation: fixed. The discard branch calls endEditing(), as cancelEditing does. Test: "a save still in flight at the discard shows no failure notice afterwards". Mutation: restore the hand-written setters, and the test goes red.

Not changed here: the Design and First Principles scope CONCERNS (the app-wide edit leave guard and mayLeave on popout intents) and the UX items about the reference text. They are scope and wording calls, so they are left for the maintainer to accept or split out.

@buluoray

Copy link
Copy Markdown
Contributor Author

Disposition for GPT 6.1 on c3c1eb11b6. Fixed in code in 5600e5122b. Nothing is overridden.

  • F1, Escape in More silently discards a floating-thread draft: fixed. The cause is the popover's own document Escape listener (CommentThreadPopover.tsx), which closed on any Escape. That listener is part of this PR's change to the popover. It now returns early when the Escape event's target is inside [role="menu"]. So an Escape that closes More, or its Send submenu, leaves the popover and its reply in place. This is broader than a single stopPropagation on DropdownMenuContent: it covers every menu, and it leaves Radix's own escape handling untouched.
    Test: CommentThreadPopover.dismiss.test.tsx › "stays open when Escape closes a menu". Mutation: drop the [role="menu"] check from onKey, and that test goes red.

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 cbf2b3614a. range-diff: commit 1 identical, commit 2 adds only the popover change and its test. Still 2 commits.

@buluoray

Copy link
Copy Markdown
Contributor Author

Disposition for Opus 5.5 on c3c1eb11b6. Both findings are fixed in code in 5600e5122b. Nothing is overridden.

  • BLOCKING, cancelling the discard prompt with Escape or a backdrop click closed the thread popover anyway: fixed. CommentThreadPopover now checks, on both Escape and mouse-down, whether a modal ([role="dialog"][aria-modal="true"] or [role="alertdialog"]) outside its own card is open. If one is, it does nothing. So Escape and a backdrop click answer the discard prompt, and a reply the user chose to keep stays.
    Tests in CommentThreadPopover.dismiss.test.tsx: "stays open when Escape answers a modal over the page" and "stays open when the backdrop of a modal is clicked". Mutations: drop modalOpen() from onKey, and the first goes red. Drop it from onDown, and the second goes red.
  • Advisory, a mouse-down on the More trigger closed the popover before Send to a session could ask: fixed. The outside-click check now also skips [data-ui-location="artifacts.detail.more"]. The popover stays mounted, so its draft report reaches the send guard.
    Test: "stays open when the More trigger is pressed". Mutation: remove that selector, and the test goes red.

"still closes on a plain Escape and on an outside click" pins the unchanged behaviour. Still 2 commits.

@chenmingwei23 chenmingwei23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[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(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should-fix: this guard (with usePublishNavigationStake below) is outside the PR Goal; send-to-session is already hidden while editing.

useRegisterNavigationLeaveGuard(() => {
  if (!dirty) return true

Consequence: 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.

Comment thread website/src/utils/navIntent.ts Outdated
&& intent.slotKey === prefill.slotKey && deps.appendToOpenComposer?.(prefill.slotKey, prefill.append)) {
return
}
if (deps.mayLeave && !deps.mayLeave()) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should-fix: this veto applies to every intent a popout forwards, not only send-to-session.

if (deps.mayLeave && !deps.mayLeave()) return

Consequence: 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).`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 CrysisDeu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@buluoray

Copy link
Copy Markdown
Contributor Author

/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.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for 5bf70f1da4a55eb8435a5d083d3ff3ab84a8166c.

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.

This decision applies only to this commit. A new push requires a new judgment.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=0f7a8371def0 — The navigation change reaches past artifacts: needs-a-decision

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
Whether the nav-intent leave check, the open-composer append and the edit-buffer leave guard stay bundled here or move to their own PR is a scope call this rebase round does not make.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.
@iamwhatever: accept the bundle as shipped, or ask for the split?

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=9d85b5333b68 — Ship send-to-session from the main window only: rebutted

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
Disproportional for this round: dropping the popout hand-off removes shipped behaviour, and this round is limited to a rebase with no behaviour change.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=77ea8a020a26 — The pre-filled draft reads like machine instructions: rebutted

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
The reference line is addressed to the agent that receives the draft: the slug and artifact_get are what it needs to load the artifact. The user sees and can edit it before sending, and nothing is sent on their behalf.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=0a38fde2af06 — The failure notice runs two messages together: needs-a-decision

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
The missing separator is real and the fix is small.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.
@iamwhatever: take the fix on this PR at the cost of a new head, or in a follow-up?

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=e579737534ed — Send to a session is understood but not trusted: rebutted

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
Disproportional for this round: a hint line is an advisory copy addition, and the menu item behaves as on the accepted head.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=cd3a5d6bb495 — Reading-width toggle wording: rebutted

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
Disproportional for this round: a label wording suggestion on a control that behaves as on the accepted head.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=14fb3379da3e — Leave guard does not resume navigation after a discard: needs-a-decision

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. The same concern was raised on 4f67796, the head accepted as green.
Resuming the refused navigation after a confirmed discard is a behaviour change, which this rebase round excludes.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.
@iamwhatever: ask for it on this PR, or accept the current stay-on-page behaviour?

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition for one whole-design item on this head.

  • span=8b538ec70802 — Edit mode hides three More menu items: rebutted

Head 5bf70f1 is a rebase of 4f67796 with no content change: range-diff shows only regenerated digests and one call-site rename that main forced. This item is new on this head, but the code it judges is unchanged since 4f67796, the head accepted as green.
Disproportional for this round: showing the items disabled instead of hidden is a behaviour change, and edit mode behaves as on the accepted head.
Acting on it here needs a new head, which discards every lane verdict and the First Principles override on this one.

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 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.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 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. git range-diff shows both are unchanged (=) from c0ad65d, so the guard is no longer part of this PR's diff.

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.

@buluoray

buluoray commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 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: deferred (scope)

The description already states this is deliberately scoped to send-to-session, and that Back and the other existing sendNav exits drop that text on main today too. Feeding comment drafts into the registered leave guard would change Back and every other exit, which the frozen Goal does not cover. Left as a follow-up for @iamwhatever to rule on, together with the other scope items.

UX — reference line in the draft reads like code: rebutted (unchanged from 5bf70f1)

The line is addressed to the agent that receives the draft: the slug and artifact_get are what it needs to load the artifact. The user sees and can edit the draft before sending, and nothing is sent for them.

UX — failure notice runs into its cause: rebutted (stale evidence)

In the code on this head the notice renders with messagePlacement="below" (website/src/pages/ArtifactDetailPage.tsx:2415), so the cause sits on its own line under the title, and ArtifactDetailPageCoverage.test.tsx pins it. Shot-09 predates that change. A Retry action is a new control outside this PR's Goal; left as a follow-up.

UX — More items hide while editing: deferred

Showing them disabled with a reason is a new pattern no other menu here uses. Left as a follow-up.

UX — width tooltip names the state, not the action: rebutted (unchanged from 5bf70f1)

A wording suggestion on a secondary control that behaves as on the accepted head.

@buluoray

buluoray commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 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: resolved

The guard was split out as asked and landed on main in #20355. This diff no longer carries it. The description still described it; that bullet and one test line are now corrected to point at #20355.

Design — new append path: rebutted

Only ArtifactSendToSession.tsx:71 sets prefill.append. applyNavIntentInMain takes that branch only when the path is /chat, the intent's slot equals the prefill's slot, and the open composer for that slot accepts it (navIntent.ts:83); otherwise it falls back to the normal prefill. popoutNavForwarding.test.ts and App.navLeaveGuard.test.tsx pin both sides.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 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: acknowledged, held

True: the old "save and create a new version" hint is gone. The fix is a one-line secondary description on the More item. It is held, not pushed alone, because a push restarts every lane; it is raised to the owner with the open scope items.

UX — failed hand-off notice: rebutted (stale evidence), unchanged from 2b98b8a

messagePlacement="below" (ArtifactDetailPage.tsx:2415) puts the cause on its own line. A Retry action is a new control outside the Goal.

UX — repeat the navigation after Discard: out of scope

That behaviour belongs to the guard now on main via #20355, not to this diff.

UX — wording of the draft reference line: rebutted, unchanged

It is addressed to the receiving agent, and the user sees and can edit the draft before sending.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 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 — HoverTip duplicates useLabelTip; Copy moved into More: deferred (scope), unchanged

Both are among the scope items awaiting @iamwhatever's ruling.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 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 ArtifactDetailPage.tsx, both sides additive) kept both sides, and git range-diff shows commit 1 identical and commit 2 changed only in that context. No code is pushed for these advisory items. The description's stale Bundle Size Gate bullet (naming check-bundle-size.mjs, which the diff does not touch) is removed, per @iamwhatever's review on 5bf70f1.

UX — failed hand-off title "try again": rebutted, unchanged from 2915e53

messagePlacement="below" puts the cause on its own line under the title. Rewording the title is held with the other open wording items rather than pushed alone.

UX — width toggle tooltip names the current width: out of scope

The tooltip keys (components.readingWidthToggle.title_md / title_full) are not changed by this diff; they come from main. Flipping them to actions is its own change.

UX — submenu hint "nothing is sent": acknowledged, held

A fair clarity fix, but a new string and a push would restart every lane on a conflict-only rebase. Raised to the owner with the open scope items.

UX — wording of the draft reference line: rebutted, unchanged

It is addressed to the receiving agent, and the user sees and can edit the draft before sending.

First Principles — HoverTip duplicates useLabelTip; Copy moved into More: deferred (scope), unchanged

Both remain among the scope items awaiting @iamwhatever's ruling.

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.
@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 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 test_acp_bindings census red via #20902); git range-diff shows both commits identical (=). No code is pushed for these advisory items.

UX — draft reference line reads as machine text: rebutted, unchanged

It is addressed to the receiving agent, and the user sees and can edit the draft before sending.

UX — "Send to a session" read as a guess / unclear whether it sends: acknowledged, held

Same as the submenu-hint item on b0f990e: a new string would restart every lane; raised to the owner with the open scope items.

UX — width toggle tooltip names the current width: out of scope, unchanged

The components.readingWidthToggle.title_md / title_full keys come from main and are not changed by this diff.

First Principles — item 7, comment-draft check covers only send-to-session: deferred (scope), unchanged from 2b98b8a

The description states the scoping; guarding Back and the other sendNav exits is the leave-guard work that moved to #20355.

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.

4 participants