feat(arenabench): transcript as its own searchable page + dedupe streamed text - #1884
Open
macanderson wants to merge 2 commits into
Open
feat(arenabench): transcript as its own searchable page + dedupe streamed text#1884macanderson wants to merge 2 commits into
macanderson wants to merge 2 commits into
Conversation
added 2 commits
August 6, 2026 04:09
Stella's event stream carries both text_delta fragments (field: text) and one consolidated text event per message (field: delta) — the names are crossed on the wire. TranscriptReader appended both into the same run, so every response rendered twice: once assembled from fragments, once whole, usually split around the step_usage line that closed the run in between. The consolidated event now REPLACES its fragment run under the same seq (clients keyed by seq replace in place), found via a pending_text pointer that outlives the run-closing step_usage. A stream with no fragments still renders one entry per consolidated event.
The transcript drawer becomes /transcript?match=&task=&seat= — a URL you can bookmark, reload, and send. New reading tools the drawer had no room for: kind filters (responses / thinking / tools / results / usage / stages) and case-insensitive full-text search with highlighting across every entry; an active search bypasses replay pacing, because a search answers over the whole transcript. Rendering follows the Command Deck's transcript grammar: stages are section rules (the label is the stage), reasoning is dim, italic and collapsed to a preview with its line count, tool names take the accent while bodies stay plain, and long results fold at twelve lines. The task table's transcript button is now a link; the drawer is deleted. server._static learns the exporter's naming (<route>.html, index.html in a directory) so the new route resolves without touching the URL shape.
Contributor
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Reviewer's GuideFixes duplicated transcript text by making consolidated Sequence diagram for deduping streamed transcript text in TranscriptReadersequenceDiagram
participant Stream as StellaEventStream
participant Reader as TranscriptReader
participant State as TranscriptState
participant Bodies as TranscriptReader_bodies
Stream->>Reader: entry(kind="text_delta", event)
Reader->>Reader: bucket = "text"
Reader->>Reader: fragment = event.get("delta") or event.get("text")
alt no open text seq
Reader->>Reader: seq = _next_seq(State)
Reader->>State: open_entries["text"] = seq
Reader->>State: pending_text = seq
else existing text seq
Reader->>State: seq = open_entries["text"]
end
Reader->>Bodies: bodies[(path_key, seq)] += fragment
Stream->>Reader: entry(kind="text", event)
Reader->>Reader: full = event.get("delta") or event.get("text")
alt existing open text or pending_text
Reader->>State: seq = open_entries["text"] or pending_text
else no existing seq
Reader->>Reader: seq = _next_seq(State)
end
Reader->>State: open_entries.clear()
Reader->>State: pending_text = None
Reader->>Bodies: bodies[(path_key, seq)] = full
Reader-->>Stream: entry(seq, "text", "response", full)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two halves of one user-facing outcome — the transcript surface:
1. Every response rendered twice (bug). Stella's event stream carries both
text_deltafragments (payload field:text) and one consolidatedtextevent per message (payload field:delta) — the names are crossed on the wire.TranscriptReadercoalesced both into the same run, so each message appeared once assembled from fragments and once whole, usually split around thestep_usageline that closed the run between them. The consolidated event now replaces its fragment run under the same seq (clients keyed by seq replace in place), located via apending_textpointer that deliberately outlives the run-closingstep_usage. Witnesses intests/test_telemetry.py::TestTranscript— all three fail on main (doubled body / two seqs per message / concatenated lone messages), pass here.2. The transcript is now its own page (feature).
/transcript?match=…&task=…&seat=…replaces the fly-out drawer: a URL you can bookmark, reload, and send, with the reading tools a drawer had no room for —<mark>highlighting and an entry count; an active search bypasses replay pacing (a search answers over the whole transcript, never behind a timer)Rendering follows the Command Deck's transcript grammar (
crates/stella-tui/src/render/entry.rsis the exemplar): stages are section rules (the label is the stage), reasoning is dim italic collapsed to a preview with its line count, the label is coloured and the value is read (tool names take the accent, bodies stay plain), long results fold at twelve lines.server._staticlearns the exporter's file naming (<route>.html,index.htmlunder a directory) so the clean route resolves; the path-containment check still runs first.Verification
uv run pytest— whole suite green (4 Docker-dependent skips).tsc --noEmitclean;next buildexports/,/transcript,/_not-found.origin/main'stelemetry.py: the three new tests fail there with the exact doubled-text shapes reported from matchba6464fca798.Residue
Summary by Sourcery
Deduplicate streamed transcript text events and promote transcripts from a drawer to a dedicated, bookmarkable page with search and filtering.
Bug Fixes:
Enhancements:
Tests: