Repository navigation
Conversation
|
Closing and reopening right after opening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS While a fork runs, the only sign is a bare spinner on a dimmed entry, and the blind reader could not tell if it was busy, blocked or broken. Watch
Suggestions
[UX-REVIEWED] cc3e451 Description read[DESCRIPTION-READ] 9f27d9c7aad48c36ec09ca17a643e1926d9fa69f22a42aabc8124944b5c03b21 That sha256 names everything this verdict read: the PR description, plus the 9 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: |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the previous reply's "Fork with later messages only" becomes clickable once a newer message arrives. [DESIGN-REVIEWED] cc3e451 Description read[DESCRIPTION-READ] 57030d31b2c33a37fb299be5732134cf5c565e7c030442a078b2a326264f6fcc 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 Check that holding "Fork with later messages only" on the newest reply only happens in the case where What this change shipsInventory (8 items) — 6 justifiedIntent: let someone who keeps Tail-only Fork on take a full-history fork from the message menu without changing the setting first (#18611). ADDITION.
[FIRST-PRINCIPLES-REVIEWED] cc3e451 Description read[DESCRIPTION-READ] fe179a58ed9ced0b844350ee965dbbc7b548ac87faf5f7dc2c4561743d1446b8 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
c0929a4 to
ce82d5b
Compare
|
Round 2 on
|
|
span=539a7b63e79f
|
|
span=a0772d1dad4d
|
|
span=113ddf77d26a
|
|
span=81ce4ba27a52
|
|
span=b5ff891338a0
|
|
span=cd9f31b6db2d
|
|
span=cfad3be4759b
|
|
span=23762c65cab0
|
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
ce82d5b to
291f5ce
Compare
|
Round 3 on
|
|
span=52b6736aee5d
|
|
span=be92a370b7c4
|
|
|
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
…rk is on The message menu forked in the direction of one global setting, so a user who wants both kinds of fork in a day had to flip Tail-only Fork in Settings before each one (#18611). While the setting is on, the plain "Fork conversation from here" entry forks the tail, so the menu now also lists "Fork with earlier messages". It sends direction head itself instead of reading the setting. With the setting off the plain entry already forks with history, so the menu is unchanged. While both entries are listed the plain one reads "Fork with later messages only", which names what the new chat holds: the messages after this one, not this message. Both entries draw the fork icon. Each carries a short line under its label that opens "Starts a new chat with", says which messages the new chat holds, and says that the current chat is left as it was. On the newest message nothing follows, and the server refuses a tail fork there (no_messages_after_fork_point), so the transcript renderer passes forkNothingAfter and the entry is held with "No messages after this one yet." in place of its line; "Fork with earlier messages" still forks. The menu is capped at the viewport width (and 20rem) and keeps 8 px from the screen edges, so both lines wrap at 390 and 320 px instead of running past the edge. Only the entry that was chosen shows the spinner while its fork runs, in its icon's place so its label keeps its column; the other one dims and ignores clicks. The new entry lays out its two rows on an element inside the item, not on the menu item itself. The catalog key fork_with_history keeps its older name. Its value, the new fork_later_messages_only, the two *_hint keys and fork_no_later_messages are in all 13 catalogs, Bengali and Hindi in the register their style guides require. useForkSession (pages/useChatPageSlotSwitches.ts) takes an optional explicit direction in handleFork and returns forkDirectionChoice, which comes from the query handleFork already reads; ChatPage hands it to the transcript renderer, which passes it to AssistantMessage. An absent prop leaves the menu as it was. Add the capture page and script that render the menu states in Chromium at 760, 390 and 320 px, and the stills they produce.
74ef91f to
cc3e451
Compare
|
span=8f43560ebdab
|
|
span=119bb156ff5b
|
|
span=00ecf9fe4a89
|
|
span=0db562180cbf
|
|
|
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
|
HOLD at cc3e451. The fix for our earlier request is in: each fork entry now shows its own spinner (AssistantMessage.tsx L163 and L613). This head still has AI findings with no reply:
|
|
Closing without merging, to keep my open PRs to the ones close to landing. The Oct 17 hold on this head (cc3e451) still has three open items: the UX concerns about the busy and held entries, the Design question of whether an older reply's "Fork with later messages only" re-enables once a newer message arrives, and matching the hold to where The direction entries aren't on main as of 2e50054, and #18611 stays open. I've deleted the branch; it can be restored from this page at cc3e451. |
Problem / Motivation
Goal: Let a user who keeps Tail-only Fork on take a full-history fork from the message menu at the moment they fork, instead of flipping the global setting first.
"Fork conversation from here" follows one global setting, Tail-only Fork (
tail_fork_enabled). Off, the fork copies the transcript up to the chosen message. On, it keeps only the messages after that point. The setting applies to every session at once, so a user who wants a full-history fork for one piece of work and a tail-only fork to split a thread out of a long session has to open Settings before each fork, and a toggle left in the wrong position silently changes what the next fork produces (#18611).Why it matters
Both modes are in daily use by the same person, for different jobs, so the setting is flipped repeatedly and the wrong-mode fork is easy to produce without noticing. The fork request already carries a direction on the wire; only the menu keeps the user from choosing it.
Not a goal
src/kiro_crew/dashboard/chat_fork.pystill answers atailrequest with a head-fork while Tail-only Fork is off, and this PR leaves that gate as it is.SessionGridView.tsxanduseSessionActions.ts. They fork with no fork point (api.forkChatSlot(slot)), so a tail does not apply.forkRowinAssistantMessage.tsx: a fork point with no message id the server can resolve). It sits in a row capped at two controls and opens no menu, so there is no place for a second choice; with Tail-only Fork on it still forks the tail, as it does onmain. Offering history there means a new control on that row, which is a layout decision for a surface this change does not touch.What changed (motivation → approach → change)
Symptom. One setting decides the direction of every fork (
handleForkinuseForkSession,website/src/pages/useChatPageSlotSwitches.ts, readtail_fork_enabledand picked'tail'or'head'), and the message menu offered one fork entry.Approach. One entry beside the plain one, "Fork with earlier messages", shown while Tail-only Fork is on. In that state the plain entry forks the tail (
explicitDirection ?? (resolvedCfg?.tail_fork_enabled ? 'tail' : 'head')inhandleFork), so the fork the menu lacked is the one with history, and the entry namesheaditself instead of reading the setting. With the setting off the plain entry already forks with history, so a second entry would repeat it and the menu stays as it is today.Telling the pair apart. While both entries are listed the plain entry forks only the messages after the clicked one, so it reads "Fork with later messages only", which names what the new chat holds, beside "Fork with earlier messages". Both draw the
GitForkicon, and the labels carry the difference. With the setting off, or before the fork point resolves (the plain entry then only pages earlier history), the plain entry keeps "Fork conversation from here". Under its label each of the two entries carries one line saying what the new chat holds and that this chat is left as it was ("Starts a new chat with this message and the ones before it. This chat is not changed." and "Starts a new chat with only the messages after this one, not this message. This chat is not changed.", so each says which messages the new chat holds and whether the clicked one is among them); the menu's "Copy as rich text" entry already has a line of this kind (copy_as_rich_text_hint). On the newest message nothing follows and the server refuses a tail fork (chat_fork.py,no_messages_after_fork_point), so there "Fork with later messages only" is held and its line reads "No messages after this one yet."; "Fork with earlier messages" still forks. The menu is capped at the viewport width and at 20rem and keeps 8 px from the screen edges, so both lines wrap at 390 and 320 px instead of running past the edge. While a fork runs both entries are dimmed and held, and in the one that started it the spinner takes the icon's place, so its label keeps its column.One premise to correct. The issue says the backend already takes the direction per request. That holds on the wire, but
chat_fork.py:378downgrades atailrequest toheadwhiledashboard.tail_fork_enabledis false, the default, anddocs/system-specs/modules/history.mddocuments that fallback as the contract. A "Fork tail only" entry could only repeat the plain entry (setting on) or fork with history under a tail label (setting off), so none is shipped, and the direction a menu entry can name is typed'head'.Changed since earlier revisions. The first revision also added "Fork tail only"; review showed it repeated the plain entry in the only state it was shown, so it is removed with its
fork_tail_onlykey and tests (the "Not a goal" bullet that says "the two entries" now means the one that remains). The second revision left the plain entry reading "Fork conversation from here" with the same icon as "Fork with earlier messages", and a first-time reader could not tell which one drops earlier messages. The paragraph above is the fix. The branch is now one commit on the currentmain; the review rounds' fixes (the spinner on the chosen entry, both entries dimmed while a fork runs, the mirrored wording) are folded into it. A later round renamed the added entry from "Fork with history" to "Fork with earlier messages", so the two entries read as one choice. The latest round adds the line under each entry and keeps the icon beside the in-flight spinner, both from the UX review. This round renames the plain entry from "Fork without earlier messages" to "Fork with later messages only", because the old name implied that only earlier messages were left out while the clicked message is left out too; it gives both entries the fork icon, puts the spinner in the icon's place, and holds the plain entry on the newest message.Change.
website/src/pages/chat/AssistantMessage.tsx: aforkDirectionChoiceprop and oneDropdownMenuItem(fork-with-history) in the More menu's fork block.runForkActiontakes an optional direction; the plain entry still callsonFork(i)oronFork(i, mid), and only this entry adds a third argument,'head'. The entry appears once the fork point resolves and is held, and dimmed, while a fork runs.plainForkLabelpicks the plain entry's label, and each entry gets a description line (fork-hint,fork-with-history-hint, tied to its entry byaria-describedby). AforkNothingAfterprop holds the plain entry while it forks the tail and no message follows, with "No messages after this one yet." as its line. Both entries drawGitFork, and in each the spinner takes the icon's place while its fork runs, as the lone plain entry already did. The More menu carriesmax-w-[min(20rem,calc(100vw_-_1rem))]andcollisionPadding={8}, and the second entry lays out its two rows on an innerspanit owns, not on the item, which keeps the file at its restyle-ratchet baseline.website/src/pages/useChatPageSlotSwitches.ts: inuseForkSession,handleForktakes an optionalexplicitDirection('head'), and the hook also returnsforkDirectionChoice, which isforkCfg?.tail_fork_enabled === true, from the queryhandleForkalready uses. Absent or false, nothing changes, asshareEnabledfails closed.mainmovedhandleForkout ofChatPage.tsxinto this hook, so the change lives here.website/src/pages/ChatPage.tsx: readsforkDirectionChoicefromuseForkSessionand passes it touseTranscriptRendering.website/src/pages/chat/page/transcriptRendering.tsx: the transcript row render handsforkDirectionChoicetoAssistantMessage(added to the hook's options and its dependency list), andforkNothingAfterwhen the row is the last user or assistant message, the same roles the server counts;handleFork's option type gains the optional third argument.mainmoved the row render out ofChatPage.tsxinto this file, so the pass-through lives here. The option is optional, so existing callers and test fixtures need no change.pages.chat.assistantMessage.fork_with_history,fork_later_messages_only, the description linesfork_with_history_hintandfork_later_messages_only_hint, and the newest-message linefork_no_later_messagesinen.manual.json(where this menu's other hand-written labels live,copy_as_rich_text_hintamong them), the 11 translated catalogs anden-XA.jsonvianpm run i18n:pseudo, and a translator note for each new key inen.context.json;fork_conversation_from_hereis untouched. The two labels in Bengali and Hindi use the informal imperative their style guides require (style/bn.mdsection 5,style/hi.mdsection 4); the description lines there are statements, not commands.docs/system-specs/modules/history.md: one sentence at the tail-fork gate.website/scripts/capture-18611-fork-menu.mjsand its pagewebsite/capture/fork-menu.{html,tsx}: the real-browser capture behind the stills below, at 760, 390 and 320 px.Rejected.
main.Tests added.
AssistantMessage.test.tsx,fork with history entry: the direction each entry sends; the label, order and icon of each entry; the plain label with the choice off and before the fork point resolves; no entry without the prop, before the fork point resolves, or on a row that keeps its fork as the row button; both entries held and dimmed, with their description lines, while a fork runs; the description line under each entry and thearia-describedbythat ties it to the entry; no description line with the choice off or before the fork point resolves; both entries drawing the fork icon, and the spinner taking the icon's place in the entry whose fork runs; the plain entry held on the newest message with its "No messages after this one yet." line while "Fork with earlier messages" still forks, and the lone plain entry not held there; andkeeps the menu inside a 320 or 390 px viewport and lets both description lines wrap(the menu's width cap, and no ancestor of a description line that forces one row).ChatPageMoreCoverage.test.tsx:handleForkwith a namedheadand with the plain entry, for both values of the setting;forkDirectionChoicefor both;forkNothingAftertrue on the newest reply and false on a reply with a later message.ChatPage.handleFork.test.tsx: its mirror ofhandleFork's direction expression gainsexplicitDirectionand one case where a namedheadwins. It tests its own copy, so it cannot fail on the olduseChatPageSlotSwitches.ts; theChatPageMoreCoverage.test.tsxcases can.bnStyle.test.tsandhiStyle.test.ts([changed-values]) read the values this branch writes; no new test.Backwards compatibility
Compatible: nothing that works today stops working. The new prop is optional and absent means no change, the plain entry calls
onForkwith the same arguments as before, andhandleFork's new third parameter is optional. The catalog keys are additions in every catalog.Reader: while Tail-only Fork is on and "Fork with earlier messages" is listed, the plain entry reads "Fork with later messages only" instead of "Fork conversation from here". Its action is unchanged, except that on the newest message, where the server refuses a tail fork, it is held with a line saying no messages follow yet; with the setting off its label and its action are unchanged. While the second entry is listed, both entries also carry a short description line, and in the entry that starts a fork the spinner takes the icon's place. With the setting off too, the plain entry now dims, besides showing its spinner, while its own fork runs; on
mainit was dimmed only while the fork point was unresolved.Removes nothing: no entry, key, prop, route or request field is removed or hidden.
Tests
In short: the menu gains "Fork with earlier messages" while Tail-only Fork is on, the plain entry then reads "Fork with later messages only", each entry carries a line saying what the new chat holds, and the new tests fail on the old source and pass on this one: 210 of 210 in each of three runs of the three touched files.
Red on the previous revision's source, this revision's tests: with only
AssistantMessage.tsxput back,AssistantMessage.test.tsxfails 6 of 125 (the label, both fork icons, the held entry on the newest message, the spinner in the icon's place for each entry, and the renamed line key); with onlytranscriptRendering.tsxput back, the two newforkNothingAftercases inChatPageMoreCoverage.test.tsxfail. The earlier measurements below were taken on earlier revisions.Red on the base source, measured on an earlier revision, before the 320 and 390 px test was added (
AssistantMessage.tsx,useChatPageSlotSwitches.ts,ChatPage.tsxandtranscriptRendering.tsxput back to the merge base, tests as in this PR), three runs ofAssistantMessage.test.tsxandChatPageMoreCoverage.test.tsx: 10 failed, 177 passed of 187 in each, the same ten every time. The failures are the assertions this change adds:Unable to find an element by: [data-testid="fork-with-history"](4),Unable to find an element by: [data-testid="fork-with-history-hint"](1),expect(received).toBeInTheDocument()for the plain entry's icon beside its spinner (1),forkDirectionChoiceundefined where false is expected (2) or true is expected (1), andforkChatSlotcalled with the setting's direction where the entry namedhead(1). The other 177 pass on both sides: they pin the plain entry, the row-button fork and the Share menu, and the cell where the setting is off and the entry namesheadcoincides with what the old handler picks.Red on an earlier revision's source (only
AssistantMessage.tsxput back), three runs ofAssistantMessage.test.tsx: 3 failed, 119 passed of 122 in each. The three were that revision's: the history entry has nosvg.lucide-historywhile its fork runs and the plain entry nosvg.lucide-git-forkbeside its spinner (bothexpect(received).toBeInTheDocument()), andUnable to find an element by: [data-testid="fork-with-history-hint"]. The tests that pin the unchanged cases (no line with the choice off or before the fork point resolves, and the lone plain entry still swapping its icon for the spinner) pass on both sides, as they should.Green with this change, three runs of the three touched test files: 210 of 210 each. On an earlier revision
vitest relatedover the four changed source files (AssistantMessage.tsx,useChatPageSlotSwitches.ts,ChatPage.tsx,transcriptRendering.tsx) ran 456 test files and 6460 tests, all passing, and the 69 test files that renderAssistantMessageor touch the fork path, includingwebsite/integration/ForkSession.integration.test.tsx, passed together (1246 tests). On this revision the locale style tests undersrc/i18n/style(12 files, 121 tests), including the Bengali and Hindi register gatesbnStyle.test.tsandhiStyle.test.ts, pass withorigin/mainasI18N_BASE_REF.Measured on an earlier revision, before this round changed the icons and where the spinner sits: twenty-three one-line breaks of the shipped code each fail one to three of the tests that pin the broken line (
AssistantMessage.test.tsxfor the entry,ChatPageMoreCoverage.test.tsxfor the handler and the pass-through). Against the labels, icons, dimming and description lines: the plain label never switching (1 test), the label ignoring the fork point (1), the label always switched (3, including the existing unavailable-item test), the history entry reusing the fork icon (2), the held entry never dimmed (1) and always dimmed (1), the plain entry's description line dropped (2), shown on the lone entry (2) or not dimmed with its entry (1), the history entry's description line reading the wrong key (1) or lacking itsaria-describedby(1), the History icon swapped for the spinner again (1), and the plain entry's icon not kept beside its spinner while both entries are listed (1) or kept when it is alone (1). Against the entry and handler: the entry sending no direction (2), the fork-point guard dropped (2), theforkDirectionChoiceprop ignored (3), the entry not held while a fork runs (2), theforkItemsInMenuguard dropped so that a row that keeps its fork as the row button would list the entry in its Share menu (1), the handler ignoring a named direction (1), an absent setting read as on (1), the transcript renderer not passing the prop (3) andChatPage.tsxnot handing it to the renderer (3). A twenty-fourth, droppingforkDirectionChoicefrom the transcript renderer's dependency list, passes every test (187 of 187) and is caught byeslint --max-warnings 0(react-hooks/exhaustive-deps, a warning that fails the gate), with the unmutated file passing as the control.tsc -p tsconfig.app.json,eslint --max-warnings 0on the touched source, test and capture-script files,npm run lint:restyle-ratchet(every file matches the baseline,restyle-baseline.jsonunchanged),npm run lint:phantom-classes,npm run lint:theme-colors,npm run lint:i18nandnpm run i18n:checkall exit 0 on this revision.jscpd .,scripts/docs-lint.sh, andscripts/check_comment_history.pyandscripts/check_brand_name.pywith their base ref set to the merge base were last run on an earlier revision, all exit 0.Manual verification
Run in Chromium, not against a live gateway:
website/scripts/capture-18611-fork-menu.mjsrenders the realAssistantMessagewith the props the transcript renderer (website/src/pages/chat/page/transcriptRendering.tsx) passes for a reply whose fork point resolved on the server (forkIndex,forkMessageId), withonForkrecording its calls andfetchfor/api/answered with empty fixtures. It asserts, with real pointer clicks at the item's centre (first checking withelementFromPointthat the item is what the pointer lands on):onFork(1, 'm2', 'head')and the plain entry callsonFork(1, 'm2').aria-disabled="true"and render, with their lines, at half opacity; a click on either starts no second fork; in "Fork with earlier messages" the spinner takes the icon's place, the labels stay in one column, and the plain entry shows no spinner.forkNothingAfteras the transcript renderer passes it there): "Fork with later messages only" carriesaria-disabled="true", is dimmed, reads "No messages after this one yet." under its label and starts no fork when clicked; "Fork with earlier messages" is not held.Not exercised: the gateway's reply to the head fork, which is the existing
chat_fork.pypath and is unchanged. The dashboard still has to be driven against a gateway with Tail-only Fork on and then off to see the menu end to end.Screenshots / video
The More menu of an assistant reply, rendered in Chromium by the real
AssistantMessagewith the props the transcript renderer passes.Tail-only Fork on. The plain entry forks the tail and says the new chat holds only the later messages; "Fork with earlier messages" says it keeps them. Both draw the fork icon. Under each label a line says what the new chat holds and that this chat is not changed.
Tail-only Fork off, the default. The menu is unchanged: the plain entry only, with its short label.
A fork in flight. A fork started from "Fork with earlier messages" is pending and the menu is open again. In that entry the spinner takes the icon's place, so both labels stay in one column, and both entries and their lines are dimmed. Both ignore clicks, so a second click starts no second fork.
The newest message. Nothing follows it, so "Fork with later messages only" is held and its line says so; "Fork with earlier messages" still forks.
Narrow screens. The same menu in a 390 px and a 320 px wide viewport: it stays inside the screen, keeps 8 px from both edges, and both description lines wrap.
A first-time reader's questions. Can they tell the two entries apart? The labels name what each new chat holds, earlier messages or later messages only, and the line under each says whether the clicked message is in it. Does the plain label say what it does in this state? With the setting on it names what the new chat holds, and on the newest message, where there is nothing to hold, it is held with that reason; with the setting off the plain entry forks with history, so its short label is true there. Does the menu say what a fork does to the chat they are in? With the setting on, the line under each entry says the new chat is a copy and this chat is not changed. A number beside other numbers? There is none. A failure state? A failed fork still goes through the existing
showActionErrorpath, which this change leaves as it is.Related Issues
Part of #18611
With Tail-only Fork turned on once, the menu offers both directions per fork: the plain entry forks the tail and "Fork with earlier messages" forks with history. A per-fork tail choice while the setting is off needs the server to honour an explicit tail request, which changes the gate documented in
docs/system-specs/modules/history.md, so the issue stays open for that decision.Pattern harvest
Not generalizable: a new menu capability, not a defect fix; the one general point, that a UI control must not offer a choice the server silently overrides, is specific to this gate.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.