Skip to content

fix(platform): snap an arena send to the top of each column - #3473

Merged
larryro merged 1 commit into
mainfrom
fix/arena-send-snap
Sep 23, 2026
Merged

larryro merged 1 commit into
mainfrom
fix/arena-send-snap

Conversation

@larryro

@larryro larryro commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Problem

In Arena Mode a send never scrolled. The new prompt stayed wherever the column happened to be, the reply streamed below the fold, and you had to drag each column's scrollbar to read it.

Root cause

ArenaColumn rendered MessageThread without scrollIntentRef and without isGenerating:

  • No intent: use-chat-scroll only snaps on a send intent, so the columns never scrolled.
  • Generating always false, no pending row: the response slack stayed at 0px, so even a snap could not lift the prompt to the top.
  • No optimistic rows: the arena send drew nothing until the turn opened server-side. The reducer then drew the streaming row under the previous reply, and the prompt popped in above it once the messages refetch landed.

This regressed in the 0.5 rewrite (#2857). The old split view had its own pending bubble and scrolled when a new user message arrived.

Fix

  • chat-surface.tsx: the arena branch of handleSend records the fanned-out round ({ text, sentAt, threadId }) until startTurn resolves, with either outcome. The round is passed down only while it belongs to the pair on screen. The verdict bar counts it as in flight, so the one-sided hint does not flash over the thinking shell before the generation row exists.
  • arena-column.tsx: each column turns the round into its own optimistic send: createPendingSend, with the baseline taken from the rows on screen when it was sent. It goes through useThreadView, so it gets the same overlay and adoption as a normal send. The column arms its own send-snap intent in the same render. It passes isGenerating (generation live, or overlay not yet consumed) and the intent to MessageThread.
  • arena-split-view.tsx: passes the round to both columns.

No new strings. The docs don't describe scroll behaviour.

Tests

  • New arena-column.browser.test.tsx (real Chromium), fails on main and passes on this branch:
    • a sent round shows at once and glides to the column's top inset;
    • the real rows take the bubble over in place: one copy, same DOM node.
  • Chat UI suite 473/473; chat browser suites 24/24; tsc, oxlint --type-aware, oxfmt, knip, lint:manual, check-guide all pass.
  • Manual box CHAT-F43 and an automation.md row.

Live check (dev stack, partial)

In a fresh arena pair, both columns showed the prompt and thinking shell right away, and the real rows adopted the pending-* keys. Column B's model failed on the dev stack, so the verdict stayed unavailable with the one-sided hint, which is the intended behaviour. The multi-round scroll check was left for manual testing.

An arena send never scrolled: the columns rendered the transcript
without the send-snap intent or the generating flag, so the scroll
machine had nothing to act on and the response slack stayed at zero.
The reply streamed below the fold, and nothing showed at all until the
turn opened server-side, where the streaming row appeared under the
previous reply before the prompt popped in above it.

The surface now records the fanned-out round until the pair's turn
resolves. Each column turns it into its own optimistic send (bubble and
thinking shell, adopted in place by the real rows) and arms its
send-snap with it, so the prompt glides to the top with the reply
streaming beneath it, as in a normal chat. The verdict bar counts the
round as in flight, so the one-sided hint does not flash over the
thinking shell.

Adds a real-Chromium test for the arena column and manual box CHAT-F43.
@larryro
larryro merged commit d5a6b1c into main Sep 23, 2026
50 checks passed
@larryro
larryro deleted the fix/arena-send-snap branch September 23, 2026 16:46
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.

1 participant