Repository navigation
Conversation
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- website/src/pages/useArtifactDetailPageCompanion.ts:451 -- Failed sends leave rewrite instructions for an unrelated turn
BLOCKING -- website/src/pages/ArtifactQuickEditStatus.tsx:34 -- Later snapshots overwrite a completed quick edit’s reported version
[BLOCK-MERGE] 6c9a15f Adjudication (Opus 5.5) — is blocking on each finding proportionate?I'm upholding both findings, so neither stops blocking the merge. F1: I rate the harm MEDIUM. The fix needs a new server-side path and the harm still outweighs that.
F2: I rate the harm LOW, but the fix is small, so it keeps blocking.
False positive or not applicable? A repository writer can comment: |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: it adds a frontend-only menu on the existing context-then-turn path (the same one Request a Feature uses), every result is saved through the agent's own versioned Notes
[DESIGN-REVIEWED] 6c9a15f Description read[DESCRIPTION-READ] dc80e0cc986f1a269e69d6cfd8a69a57914d94fc1043c1b286ab0a84d7503c85 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The only thing that changes for users is one opt-in submenu, and every new path has at least one real consumer. Two premise-level notes follow. Notes
What this change shipsInventory (9 items) — 7 justifiedIntent: let a reader of a document artifact ask the agent for a common rewrite of a passage or the whole document in one click, instead of typing it into the companion chat. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 6c9a15f Description read[DESCRIPTION-READ] d2cc4703bc70f475fef5b88ce7985b1406010ba8b0583eace0798c8e515aafc5 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK cannot evaluate: missing the busy-refusal and "finished without saving" notices. No screenshot shows the selection highlight the PR describes, so readers could not see which passage would be rewritten. BlockersSelection quick edit gives no visible cue for the passage Evidence gaps
Notes
[UX-REVIEWED] 6c9a15f Description read[DESCRIPTION-READ] 64cebe6e842157e01fce1b30cf4d265b8b0365491fd0610488119850e067caa0 That sha256 names everything this verdict read: the PR description, plus the 15 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
89f4d2c to
f798548
Compare
|
UX block (undo is not stated). Fixed in f798548. The submenu label now reads "Agent rewrites the selected text · saved as a new version", or "the whole document" with no selection, in all 13 catalogs. The Quick edits row uses a pen icon instead of the chat toggle's sparkle. Both submenu rows (Quick edits, Change tone) carry a chevron. The chevron is local to these two rows: the shared submenu trigger is used by 12 other menus, so a change there would alter every one of them, which is out of scope for this PR. After a pick the chat panel opens on the companion session and the sent turn appears in its transcript; the last pair of stills shows it. Test that fails on the old head: "applies a shortcut to the whole document when nothing is selected", "scopes a shortcut to the selected passage", and "marks the Quick edits row with a pen...". UX evidence gaps. The description now carries stills, light and dark, of the submenu with a selection, with nothing selected (whole-document label), with Change tone expanded, and the chat holding the sent quick-edit turn. The harness mocks the transcript to show that turn, since it has no gateway. Sidebar drafts lost ( Selected passage lost after autofocus ( Failed lookup creates a duplicate session ( First-principles note (second copy of the cold-load step). Taken. |
f798548 to
9948ee5
Compare
|
Rebased onto current main as |
9948ee5 to
edd99fd
Compare
|
UX BLOCK, the rewrite target is not visible (fixed in edd99fd). The Quick edits label now quotes the start of the passage the menu was opened on: GPT BLOCKING, recheck comment drafts after the session lookup (fixed in edd99fd). First principles, the Sparkle button is not guarded. Not changed. The Sparkle button swaps the same panel, but its behaviour is main's. It has several entry points (the toggle, the cold-load path, the create path and "Ask agent" from the sidebar), so a guard there is not a one-line change and would be a second mechanism in this PR. |
Add a Quick edits submenu to the artifact page's More menu for markdown, text and HTML artifacts: Shorter, Longer, Simpler wording, Proofread and Change tone (more formal or more casual). Each item sends one preset instruction to the artifact's companion chat for the selected text, or the whole document when nothing is selected, and the agent applies it through its normal artifact update, which keeps the version history. Nothing is sent until an item is picked or while the gateway is disconnected. Other kinds show no menu, as before. No new route and no setting.
edd99fd to
6c9a15f
Compare
|
The sent turn showed the raw instruction as the reader's own message. Fixed with the pattern the top bar's Request a Feature already uses ( Nothing said whether the rewrite was running, finished or failed. One Note: the quoted passage was not highlighted while the menu was open. For markdown and text bodies, the menu now paints the passage it quotes with the existing Note: the whole-document rewrite showed no way back. The scope label now reads "Agent rewrites the whole document · saved as a new version you can revert", in all 13 catalogs. The saved status line names the controls that undo it (Version, then Revert). |
|
One design question before another round. This PR has had four UX rounds, and the blocking GPT finding on How the instruction travels with its turn (GPT,
Which would you prefer, or should Quick edits wait? The other open items will go into the same round: keep the saved version a status line reports when later saves happen (GPT, I'll hold further pushes on this PR until a maintainer weighs in. |
Problem / Motivation
Goal: on a document artifact (markdown, plain text or HTML), one click asks the agent for the common rewrites: shorter, longer, simpler wording, proofread, and a more formal or more casual tone, for the text the reader selected or, with no selection, the whole document.
Today a reader who wants a paragraph tightened opens the companion chat and types the instruction by hand each time, naming the passage and the artifact. The page already knows the artifact, can read the selection in the rendered body, and has a bound companion session whose agent keeps versions through its own artifact update.
Why it matters
Rewrite requests are the most repeated thing readers ask an artifact's agent. A fixed menu removes the typing and the vague instruction ("make it better"), and every result lands as a new version the reader can revert.
Not a goal
What changed
website/src/components/artifactEditShortcuts.prompt.ts: the preset instructions, which kinds offer them, and the selection rule (the passage goes in as a JSON string; a blank or over 4,000-character selection falls back to the whole document).editQuotePreviewcuts the passage to one line of 60 characters at a word (string methods, no regular expression).website/src/pages/ArtifactDetailPageHeader.tsx: a Quick edits submenu in the More menu. Its label says who acts, quotes the passage and says how to go back:Agent rewrites “We ship on Tuesday, after the team has finished running…” · saved as a new version, orAgent rewrites the whole document · saved as a new version you can revert. While the menu is open, the quoted passage of a markdown or text body is painted with the existing annotate highlight (an HTML body renders in an iframe, so the quote is the cue there).website/src/pages/useArtifactDetailPageCompanion.ts:sendEditShortcutfollows the top bar's Request a Feature. The instruction goes to the bound session as background context (api.chatSlotContext(slot, text, { source: 'artifact-quick-edit', maxAge: 60 })), then the visible turn is one short catalog line such as "Shorter · selected passage". A refused context write sends nothing and shows its reason. A busy session (a turn running or sub-agents active) is refused before anything is written, because the drain hands context to the next turn that starts.slotBusyinbusySend.tsxis the busy readslotBusySteeralready took, now shared.resolveBoundSlotis the one cold-load lookup; a failed lookup sends nothing, and a session is created only after a lookup that found none.website/src/pages/ArtifactQuickEditStatus.tsx: onerole="status"line in the notice area: working, then "Shorter: saved as v4. To undo, pick the earlier version under Version and press Revert." when the live version rises, or "finished without saving a new version" when the turn ends with none. It is read from the artifact record and the session's turn count, with no polling or timer. Dismiss, a new quick edit or another artifact clears it.useSelectionComposerAnchor.tskeeps the passage the selection box opened on;useArtifactDetailPageComments.tsasks before the chat panel replaces an unsent sidebar comment, and again after the lookup.src/kiro_crew/docs/artifacts.mdand the feature-map row describe the menu.Backwards compatibility
Additive. The More menu gains one item on markdown, text and HTML artifacts viewed live. Other kinds and historical versions show the menu they showed before (pinned by tests that pass on main).
Tests
eslint,tsc -p tsconfig.app.json,i18n:check(RC=0), the language style suites with the base ref (12 files, 126 tests), the lane CI checks and the theme, class, string and restyle lints pass.cd website && npx vitest run src/test/ArtifactDetailPage.editShortcuts.test.tsxManual verification
Real page on loopback with a mocked gateway, markdown artifact, real mouse selection. The chat showed "Shorter · selected passage" and no instruction text; the context write carried source
artifact-quick-editand began "The user's next message is a Quick edit…". The harness then marked the agent's turn running and saved v4.Chat after Shorter, with the working line:












Working:
Saved:
Whole document:
Selected text:
Change tone:
Sibling sweep
Sibling:
website/src/pages/RemoteArtifactDetailPage.tsx-- not affected -- a remote listing has no companion sessionSibling:
website/src/components/ArtifactSendToSession.tsx-- not affected -- it pre-fills a composer the reader sendsPattern harvest
Rule candidate: review-prompt
Pattern: a one-click agent turn sends its instruction as background context and a short visible line, and shows the outcome on the page.
Related Issues
None.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement