Skip to content

feat(chat): show Fork as a reply row button whenever it can run at once - #32013

Open
Pearcekieser wants to merge 1 commit into
mainfrom
pearcekieser/fork-reply-action
Open

Pearcekieser wants to merge 1 commit into
mainfrom
pearcekieser/fork-reply-action

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Fork is one click from a finished reply, as a button in the reply's action row next to Copy, whenever the fork can run at once and Tail-only Fork does not ask which way to fork.

On almost every reply, Fork needs two clicks. The row shows Regenerate, Copy and More on the newest reply, and Quote, Copy and More on older ones. "Fork conversation from here" is the eighth item in More. A reply gets the Fork row button only when it has no stable message id (meta.mid) and its whole window is loaded. Every reply written since #8047 has an id, so the row button shows only on old history.

Why it matters

Fork is the only item in More that starts a new chat, and people who split long threads use it many times a day. Each fork costs an extra click and a scan of the menu. Where Fork appears also depends on a storage detail the reader cannot see: in one chat, an old reply shows Fork in the row and a new reply hides it in More.

Not a goal

What changed (motivation → approach → change)

Fork is now a button in the reply's action row on almost every reply, so a fork is one click. Its place depends on two things the reader can see: whether the fork can run now, and whether Tail-only Fork asks for a direction. It no longer depends on whether the row carries a message id. In AssistantMessage.tsx, Fork is a row button whenever the fork point resolves and Tail-only Fork is off. While Tail-only Fork is on, Fork is not in the row, and More lists "Fork with later messages only" and "Fork with earlier messages". A row button there would fork the tail and would sit dimmed on every newest reply, where no later message exists. Copy stays in the row whenever Fork is a row button. Before, a reply with no Quote seat and Share off moved Copy into More, and Fork would have taken its place.

Reply Main This PR
Newest, Tail-only Fork off Regenerate, Copy, More Regenerate, Copy, Fork, More
Older, Tail-only Fork off Quote, Copy, More Fork, Copy, More, with Quote in More
Any reply, Tail-only Fork on both fork entries in More the same, and an index-addressed reply gets the two entries in place of its row button
Fork point not resolved yet Fork in More with its reason the same

The seat order and the four-control newest row are what #16977 already draws for index-addressed replies. This PR applies them to replies with a message id. The newest reply's four controls are one more than the max-two-buttons-per-row ruling on #16960 (seat, Copy, More). That needs a maintainer ruling, recorded with /ai-review override on the head.

history.md documents the placement. The Playwright fork tests click the row button. The fork-menu capture harness takes regen=0 to draw an older reply, and capture-18611-fork-menu.mjs checks the row where it checked the setting-off menu.

Backwards compatibility

Compatible: every fork action is still offered, and no prop, API or server contract changes.

Reader: website/src/pages/chat/AssistantMessage.tsx:data-testid="fork-from-here" -- chat -- with Tail-only Fork off, the More item is now the row button with the same test id; AssistantMessage.test.tsx
Reader: website/src/pages/chat/AssistantMessage.tsx:data-testid="quote-message" -- chat -- on an older reply Fork takes the seat, and Quote stays in More and in the bubble's right-click menu; AssistantMessage.quote.test.tsx
Reader: website/src/pages/chat/page/transcriptRendering.tsx:AssistantMessage -- chat -- the only host that passes fork props; it still passes forkMessageId and forkDirectionChoice; ChatPageMoreCoverage.test.tsx
Reader: website/playwright/fork.spec.ts -- chat -- both fork tests click the row button, changed in this PR
Reader: website/scripts/capture-18611-fork-menu.mjs -- chat -- the setting-off section checks the row, changed in this PR

Tests

  • AssistantMessage.test.tsx: a reply with a message id draws Fork as a row button beside Copy, forwards the id, and More lists no second fork entry. The row button stays live on the newest reply when no choice is offered. It spins and ignores a second click while its fork runs. With no Quote seat and Share off, Copy stays in the row beside the fork button. With the choice offered, the row has no fork button and More lists both entries. An index-addressed reply with the choice sends head with no id.
  • AssistantMessage.quote.test.tsx: an older reply with a message id reads Fork, Copy, More, and Quote is in More. The newest reads Regenerate, Copy, Fork, More. With Tail-only Fork on, the newest reads Regenerate, Copy, More.
  • Nine of these tests fail on main's AssistantMessage.tsx and pass with this change.
  • Determinism: both files ran five times with --sequence.shuffle, seeds 11, 23, 37, 41 and 59. Each run passed 152 of 152.
  • tsc -p tsconfig.app.json passes. The six AssistantMessage* test files and ChatPageMoreCoverage.test.tsx pass, 272 tests. The scoped frontend set passes.

Manual verification

I built website/capture/fork-menu.html with the repo's vite config and ran capture-18611-fork-menu.mjs in Chromium. The page renders the real AssistantMessage with dummy data. All 107 checks pass. They include the row order in each state, a hit-tested click on the row button that calls onFork(1, 'm2'), no fork entry in More with the setting off, and the setting-on menu at 320 and 390 px.

Screenshots / video

Newest reply, Tail-only Fork off. Main, then this PR:

Newest reply on main: Regenerate, Copy, More

Newest reply with this PR: Regenerate, Copy, Fork, More

Older reply, and Tail-only Fork on

Older reply on main, then this PR. Fork takes the seat and Quote moves to More:

Older reply on main: Quote, Copy, More

Older reply with this PR: Fork, Copy, More

Newest reply with Tail-only Fork on, unchanged by this PR:

Newest reply with Tail-only Fork on: Regenerate, Copy, More

Related Issues

Fixes #32012

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

@Pearcekieser
Pearcekieser marked this pull request as ready for review November 7, 2026 03:03
@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners November 7, 2026 03:03
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of d8c178fed914535581081b2b7ec65d69804c8de2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the screenshots were downloaded, the change is a reversible placement change in one component, and Fork's place now follows things the reader can see rather than whether a reply has meta.mid.

Notes

[DESIGN-REVIEWED] d8c178f

Description read

[DESCRIPTION-READ] 5c2de32522a7dc3b26dc02ca74dc1ee60d63bc08b689c749d71a61309e924942

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 Nov 7, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d8c178fed914535581081b2b7ec65d69804c8de2 — 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 does not.

First-Principles-Verdict: PASS

Nothing blocks. Fork's place now depends on whether the fork can run and on the Tail-only Fork setting, not on whether the reply has a message id, so the cause is fixed. The one weak point is Quote losing its row seat on every older reply.

Notes

  • Item 3 — unjustified move: the description names a harm for Fork only ("Fork needs two clicks"). It names nobody who was failing with Quote in the row seat, yet ships "Fork, Copy, More, with Quote in More" on every older reply. Every user who learned to quote from the row now has to relearn where it is. Whether this counts as replacing a user-facing capability (lens 9) is a judgement call, not a reading, so it is a note and not a blocker.

What this change ships

Inventory (8 items) — 7 justified

Intent: fork a long thread from any finished reply in one click. This is an ADDITION (a placement change).

  1. Fork is a row button beside Copy on replies that have a message id, with Tail-only Fork off — justified
  2. More no longer lists Fork when it is a row button — justified
  3. Older replies: Fork takes the first seat, Quote moves into More — unjustified move, no one named who was failing
  4. The newest reply's row grows to Regenerate, Copy, Fork, More — justified
  5. Index-addressed replies with Tail-only Fork on: the row button is gone, both direction entries are in More — justified
  6. Copy no longer moves into More when Fork is a row button (no Quote, Share off) — justified
  7. history.md describes the new placement — justified
  8. The capture harness gets regen=0; the E2E tests and capture checks click the row button — justified

[FIRST-PRINCIPLES-REVIEWED] d8c178f

Description read

[DESCRIPTION-READ] b2c2c957fcbc9526c006071c7389c7c43bf55fffb408580846b1c8587ad16011

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 Nov 7, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🔴 BLOCK

UX-level review of d8c178fed914535581081b2b7ec65d69804c8de2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: BLOCK

The new Fork row button is an unlabelled branch glyph that a first-time reader could not identify and would not click. That button is the whole point of this PR.

Blockers

Fork row button is not understood and the reader would not use it
Trigger: a user hovers any finished reply with Tail-only Fork off. Fork now sits in the row on almost every reply (forkRow = !!onFork && !forkItemsInMenu).
Outcome: the button shows only <GitFork size={14} />, and its meaning is in title={forkLabel}, which appears only on hover. A cold reader cannot tell what it does. The blind reader said of shot-02: "maybe it starts a new copy of the conversation from this point, or shares it -> no idea -> no. I can't tell whether it shares something outside the app or changes my chat, and there is no label." The fear of sharing outside the app keeps people off the one-click path the PR exists to add. The same icon also takes the first seat on older replies (shot-04), where users have learned to find Quote.
Severity: every reply × the primary action × every visit.
Fix: make the action readable without hovering. Either pair the icon with a short visible label such as "Fork" (at least in the seat position), or add a screenshot showing the tooltip "Fork conversation from here" and get a blind read that understands it.

Notes

  • On older replies, Fork displaces Quote from the first seat, so what the first button does now changes by state. The reader said: "Because of this I can't predict what the first button will do." Consider adding Fork after Copy and leaving Quote's seat as it is.
  • Shots 01 and 05 looked identical to the reader. If the difference is the Tail-only Fork setting, add a caption or show the More menu open in that state.

[UX-REVIEWED] d8c178f

Description read

[DESCRIPTION-READ] 157c7e3bce44b128eca7412ff8b1f7e99da4213e3d3f997f762aeb5b54689715

That sha256 names everything this verdict read: the PR description, plus the 8 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 Nov 7, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — 🔴 changes requested (blocking)

GPT 6.1 found at least one blocking issue that must be resolved before merging d8c178fed914535581081b2b7ec65d69804c8de2. Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging.

This comment is updated in place on each push.

BLOCKING -- website/src/pages/chat/AssistantMessage.tsx:452 -- Inline Fork grows the grandfathered newest-reply action row

const forkRow = !!onFork && !forkItemsInMenu
Trigger: A finished newest reply with meta.mid in an active local chat, with Tail-only Fork off, reaches AssistantMessage through transcriptRendering.tsx with Regenerate, Quote and Fork offered.
Outcome: The same horizontal group grows from Regenerate, Copy, More to Regenerate, Copy, Fork, More; the blocking rule explicitly forbids growing a grandfathered three-control row.
Anchor: max-two-buttons-per-row
Fix: Move an existing row action into More when promoting Fork so the row does not grow.

[BLOCK-MERGE] d8c178f
[GPT-REVIEWED] d8c178f

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

MEDIUM harm (the rule's row cap, not a functional defect). Confirmed at website/src/pages/chat/AssistantMessage.tsx:452-454 and :832-835: when Quote is offered and both Regenerate and Fork draw, the row renders Regenerate (:832), Copy (:834), Fork (:835) and More. That puts a fourth control on a row that already had three. max-two-buttons-per-row carries blocking: true in .review-base-rules/website-AUTOSDE.yaml:372, so the rule's flag decides this, not a cost weighing.

[ADJUDICATION] d8c178fed914535581081b2b7ec65d69804c8de2 total=1 uphold=1 downgrade=0
UPHOLD F1 website/src/pages/chat/AssistantMessage.tsx:452 reason=autosde-blocking-rule
[GPT-ADJUDICATED] d8c178fed914535581081b2b7ec65d69804c8de2

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d8c178fed914535581081b2b7ec65d69804c8de2 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — 🔴 changes requested (blocking)

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

This PR adds a fourth button to the newest assistant reply's action row in the main chat, a row the base branch already grandfathers at three controls.

BLOCKING — website/src/pages/chat/AssistantMessage.tsx:452
const forkItemsInMenu = forkIndex === undefined || forkWithHistory / const forkRow = !!onFork && !forkItemsInMenu (rendered by {quoteOffered && regenButton && forkButton} at :835)
Trigger: main chat with the default dashboard.tail_fork_enabled=false, on the newest reply that has meta.mid. transcriptRendering.tsx:416-417 passes forkMessageId, onRegenerate and onQuoteMessage. forkWithHistory is false, so forkRow is now true where on base the !!forkMessageId check kept fork in More.
Outcome: the row grows from Regenerate, Copy, More (3) to Regenerate, Copy, Fork, More (4). The PR's own test at AssistantMessage.quote.test.tsx:57 pins that row. On a remote-bound slot (no Quote, no Regenerate), Fork is added next to Copy, Copy link, Pin, Raw and More, so a row already over the cap grows again.
Anchor: max-two-buttons-per-row
Fix: when the row already holds Regenerate, or Quote is not offered, keep a message-id fork in More. Let Fork take the seat only when Regenerate does not (regenButton ?? forkButton), and drop the {quoteOffered && regenButton && forkButton} addition for message-id rows. Or move another control into More so the row's count does not rise.

[BLOCK-MERGE] d8c178f
[OPUS-REVIEWED] d8c178f

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable d8c178fed914535581081b2b7ec65d69804c8de2 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 7, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Stale-PR cleanup check: held for a maintainer. The linked issue #32012 is labeled parked, so this waits until a maintainer unparks it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show Fork as a reply row button whenever it can run at once

2 participants