Repository navigation
feat(chat): put Edit & Resend on the user message row - #29979
Conversation
446c6e5 to
7f0fba1
Compare
7f0fba1 to
9e05ea5
Compare
9e05ea5 to
d7fe257
Compare
|
Rebased onto |
First Principles Review (Opus 5.5, fork) — ✅ human override accepted@buluoray overrode this lane for [FIRST-PRINCIPLES-OVERRIDE] 2a0d979 |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change solves the stated problem, and the four-button row is an override the author already asked a maintainer for. Notes
[DESIGN-REVIEWED] 2a0d979 Description read[DESCRIPTION-READ] 584e3d1adb2939e034ed6b0ce35c17bd48f8dc81e60ddf0742621ada015332ae 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, fork) — ✅ PASSUX-level review of UX-Verdict: PASS The screenshots show every changed control: the row pencil, both trimmed More menus, light and dark, and the 390px touch row. Nobody has done a blind first-time read, because this lane reviews forks in one pass. Notes
[UX-REVIEWED] 2a0d979 Description read[DESCRIPTION-READ] a66ee5e2c9c000b97d72b70dc35833d3fcbde9ee0a16d567f1def95fdb52eef4 That sha256 names everything this verdict read: the PR description, plus the 7 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 (fork) — ✅ human override accepted@buluoray overrode this lane for [OPUS-OVERRIDE] 2a0d979 |
GPT 6.1 Review (fork) — ✅ human override accepted@buluoray overrode this lane for [GPT-OVERRIDE] 2a0d979 |
|
|
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Maintainer decision (buluoray): the The Opus and GPT blocks on that rule are answered by this decision. A code review on the current head follows. |
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
APPROVE at f164251. I found no behaviour defect, no regression for existing users and no false statement in the description. The four-control row is covered by the maintainer's recorded override, so it is not judged again here.
What it does for users: Edit & Resend on your own message is now one click, after Copy on the hover row, and no More menu repeats an action its row already shows, on user messages or older assistant replies.
Head and scope
- The live head is a merge of main (7c364bc) into d7fe257. The PR's own added and removed lines are identical between d7fe257, which the AI lanes reviewed, and this head. Only hunk offsets moved. So the lane verdicts still describe this code.
- HEAD^2..HEAD touches only the nine files listed in the PR: two docs/feature-map lines, the capture script, three website source files and four website test files. The fork changes no workflow and nothing else outside the website. git merge-tree against origin/main exits 0.
Behaviour checked against source
- Edit on the row: website/src/pages/chat/UserMessage.tsx:659 sets editInRow = compactRow && canEditResend && !onReplyInThread. canEdit is supplied by page/transcriptRendering.tsx:358 (not running, not regenerating, not remote-bound), which this PR leaves alone, and by crewWindowRenderers.tsx:76 (canRewind). Where Reply in thread holds the seat, editInRow is false and Edit stays in More (editInMore, :664).
- Pinned stand-in: the row pencil carries data-message-edit, which styles/chat-transcript.css:492 hides under [data-pinned-standin]. editInMore also excludes standIn, so Edit is withheld from both the row and More while the row stands in. That matches main.
- More dedupe: the user More shows Quote only when quoteInMore (Quote not on the row), and Edit only when editInMore. AssistantMessage.tsx drops Quote from More only when quoteRow (:440, so Quote holds the seat). With Regenerate, Fork or Reply in thread in the seat, More still leads with Quote.
- Right-click menus are unchanged. The diff has no hunk in UserMessage menuItems (:671 on) or in AssistantMessage contextItems. The existing test that opens the stand-in's right-click menu still expects Quote, Copy text, Copy link, Pin, and it passes.
- Nothing else left More. moreHasItems now counts quoteInMore and editInMore instead of quoteOffered and canEdit, so a row that only had Quote to add no longer draws an empty More. Copy link, Pin and app actions are unchanged.
- Accessibility: the new button's title and aria-label use the existing catalog key pages.chat.userMessage.edit_resend, the same key as the existing pencil and menu item, so every locale already carries it. DOM and Tab order is seat, Copy, Edit & Resend, More.
Tests run locally (fork CI has not run on this head)
- UserMessage.quote, UserMessage.pinnedStandinActions, AssistantMessage.quote, CrewChatWindow, UserMessage, UserMessage.contentWidth, UserMessage.editSkillPicker, ImeEnterGuardSites, messageActionMenus and userBubbleMobileOverflow: 264 passed and 1 failed of 265.
- The failure is CrewChatWindow "draws a code fence in a peer USER row copy-only too", a 5s timeout. It is inherited: it fails the same way on main 7c364bc, it passes when run alone, and the PR does not touch it.
- Mutations, run one at a time with the file restored after each:
- Dropping !onReplyInThread from editInRow reddens "beside Reply in thread, Reply takes the seat, Copy follows, and Quote and Edit are in More".
- Dropping canEditResend from editInRow reddens "a message that cannot be edited keeps Quote + Copy + More, and More does not list Quote again".
- Reverting the user More Quote to quoteOffered reddens three tests, including "More then lists only what the row does not show".
- Removing !quoteRow in AssistantMessage reddens "seats Quote, keeps Copy right after it, and folds Link, Pin and Raw into More without a second Quote".
- Removing data-message-edit from the row pencil reddens "also leaves out the row pencil of the Quote-offering row".
Source or screenshot only
- The 390px touch screenshot shows Quote, Copy, pencil, More and the time on one line, with no overflow. I did not render it myself.
- The capture script assertions were read, not run.
- Typecheck and eslint were not run.
Lane findings other than the row-count rule
- Design (PASS) asked for a decision record once the override was granted. That still holds: this head adds no docs/decisions entry. Follow-up: record the ruling there, and point the "product ruling" code comment at UserMessage.tsx:647 to it.
- UX (PASS) noted that no screenshot shows the crew window row. That still holds. Its behaviour is covered: CrewChatWindow's openEdit now clicks the row button and every rewind test passes through it. Follow-up: add a crew-window hover still.
CI on this head: 5 success, 1 skipped, 0 failure in check-runs. The PR Readiness status is failure, waiting on the fork workflow run and the lane overrides. Auto-merge is off and no human review is on the PR yet.
|
/ai-review override fable f164251 owner-decision: buluoray accepted the max-two-buttons-per-row override for the editable user-message row (four controls) in #29979 (comment). This record covers that rule only. |
Human judgment recorded@buluoray recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: @Skymore this head (a5cf875) now conflicts with main, so GitHub cannot merge it. Could you rebase onto current main and push? Where it stands otherwise: the approval is in place, and the |
On a user message that can be edited, the row reads Quote + Copy + Edit & Resend + More: Edit follows Copy, one more control over max-two-buttons-per-row by product ruling, the same shape as a reply's seat + Copy + Fork. On user messages and assistant replies alike, More lists only what the row does not show, so Quote no longer appears twice. The right-click menu keeps the full list.
a5cf875 to
2a0d979
Compare
|
Rebased onto current main, still one commit ( The only conflict was @buluoray override commands for this head, for after the Opus/GPT BLOCKs post: |
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Approve at 2a0d979. The rebase reset my approval; this re-approves the same change on the new head.
Checked: I compared this head's patch with the one I approved at a5cf875. The code and test changes are identical line for line. The only difference is in docs/feature-map/README.md: main reworded the "Quote a message" row, and this head applies the same edit to the new wording.
What it does for users: on their own message, Edit & Resend is one click on the hover row instead of two, and More lists only what the row does not already show.
The four-control row is the exception I accepted as maintainer in #29979 (comment). I have approved the fork workflow runs on this head. When the Opus and GPT lanes post their max-two-buttons-per-row finding here, I will re-record the override for both.
|
/ai-review override fable 2a0d979 owner-decision: buluoray accepted the max-two-buttons-per-row override for the editable user-message row (four controls) in #29979 (comment). This record covers that rule only. |
|
/ai-review override gpt 2a0d979 owner-decision: buluoray accepted the max-two-buttons-per-row override for the editable user-message row (four controls) in #29979 (comment). This record covers that rule only. |
Human judgment recorded@buluoray recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override first-principles 2a0d979 max-two-buttons-per-row: buluoray accepted the max-two-buttons-per-row override for the editable user-message row (four controls) in #29979 (comment), so the maintainer ruling the code comment cites exists. This record covers that rule only. |
Human judgment recorded@buluoray recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
AI-review override not recorded: |
|
/ai-review override first-principles 2a0d979 owner-decision: buluoray accepted the max-two-buttons-per-row override for the editable user-message row (four controls) in #29979 (comment), so the maintainer ruling the code comment cites exists. This record covers that rule only. |
Human judgment recorded@buluoray recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
Goal: On the main chat, Edit & Resend is one click away on your own message, and no message's hover strip shows the same action twice.
Hovering one of your own messages shows Quote, Copy and More. Edit & Resend, the action people reach for most on their own message, sits inside More. More also lists Quote message again, right under the Quote button the row already shows. Older assistant replies have the same duplicate.
Why it matters
Editing and resending a prompt is a routine step when a reply goes the wrong way. Today it costs an extra click and a menu scan every time, and the repeated Quote makes both menus look broken.
Not a goal
What changed (motivation → approach → change)
Edit & Resend joins the row of an editable user message, after Copy; Quote keeps its seat. More stops listing what the row already shows, on user messages and assistant replies.
Override requested:
max-two-buttons-per-row. The editable user-message row goes from three controls to four. The rule (website/AUTOSDE.yaml, blocking) grandfathers this row at three, for Copy (#16977), and forbids a fourth, so this needs a maintainer ruling. Why both stay on the row: Edit & Resend is the action people use most on their own message, and Quote is how a later message answers this one (#14968: reply-to-message, in the main chat and in crewmate DMs), so neither should sit one menu deep. Taking Quote's seat for Edit was tried and rejected for that reason. The shape already exists on main: the newest reply in a loaded window reads Regenerate, Copy, Fork, More. The 390px touch row still fits without sideways scroll (screenshot below).More now lists only what the row does not show, the rule it already followed for Copy. This overrides a decision from #14968, recorded in a comment this diff deletes in both components: More listed Quote even when Quote held the seat, so that More and the right-click menu agreed. The right-click menu is a separate surface with no row beside it, so it keeps the full list.
The row pencil carries the same
data-message-edithook as the existing pencil, so it is hidden while the row stands in for the pinned prompt banner. Docs: the Rewind and Quote rows indocs/feature-map/README.mdname the new path.website/scripts/capture-quote-message.mjsasserts the new user row and More lists.Backwards compatibility
Compatible: no API, prop or stored data changes; every action is still reachable from the row, More or the right-click menu.
Reader: website/src/test/CrewChatWindow.test.tsx:openEdit -- crew page -- the crew window's rewind tests open the editor from the row button;
retries a second refused rewind from ITS rowpassesReader: website/src/pages/chat/UserMessage.tsx:menuItems -- chat -- right-click menu unchanged;
opens on right-click with Quote first, then the row actionspassesReader: website/src/pages/chat/AssistantMessage.tsx:contextItems -- chat -- right-click menu unchanged;
opens on right-click: Quote first, then both copy formats, Copy link, PinpassesReader: website/scripts/capture-quote-message.mjs:10-user-more -- chat -- asserts the new row and More lists
Reader: docs/feature-map/README.md:Rewind -- chat -- path updated to the row pencil
Tests
UserMessage.quote.test.tsx: an editable message shows Quote + Copy + Edit & Resend + More, and Quote, Copy and the pencil all work from the row; More lists Copy link and Pin only; a non-editable message keeps Quote + Copy + More and More drops Quote; Quote alone with nothing else shows no More; an editable bare carried quote reads Copy + Edit & Resend + More; with Reply in thread, Quote and Edit stay in More; the pinned stand-in withholds Edit from both menus.AssistantMessage.quote.test.tsx: with Quote in the seat, More is Copy as rich text, Copy link, Pin, Raw; Quote tests fire from the row button; with Regenerate or Reply in thread in the seat, More still leads with Quote.UserMessage.pinnedStandinActions.test.tsx: the row pencil isdisplay: nonewhile the row is the pinned stand-in.CrewChatWindow.test.tsx: helpers open Edit from the row button; every crew-window rewind test runs through it.--sequence.shuffleand fresh seeds, 148/148 each time.AssistantMessageplus the user-message and crew-window files (74 files, 1430 tests), the frontend related set fromscripts/run_scoped_tests.py,npm run typecheck, eslint on the changed files, the flake-pattern ratchet, and the backend tests that reference changed files.Manual verification
Real Chromium against
website/capture/quote-message.html(realUserMessageandAssistantMessage), built once fromorigin/mainand once from this branch: dark, light, and a 390px touch viewport. Checked the row labels, both More lists, that the pencil opens the inline editor, and no page errors. Both right-click menus were checked unchanged.Screenshots / video
Before (origin/main) on the left, this PR on the right.
Your message: hover row, then More open.
An older assistant reply with More open: the second Quote is gone, the row keeps its Quote button.
Light theme and 390px touch (your message)
Reaching the editor, side by side: More → Edit & Resend before, the row pencil after Copy.
edit-resend-before-after.webm
Related Issues
Closes #29471
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)