Repository navigation
test(stories): add sample conversations for the chat stories - #117
Conversation
Add deterministic samples built only from the conversation contract: a short chat, a 300-message history, a tool storm with a batch, a failure and every approval outcome, generated images, a thread and a failed send. playTurn reveals a message's parts over time for streaming stories. Images are inline SVG, timestamps are fixed, and nothing reads the clock or Math.random.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Stacked on #116: only this pull request's own changes were checked. Notes:
|
426edca to
1f29a63
Compare
1f29a63 to
05fc47b
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Automated multi-agent review: independent review + second-agent validation of every flag; only confirmed items listed. Everything below is minor and verified by running the helper.
- minor
stories/chat/samples/play-turn.ts:49-60— a queued call (status: "pending", no approval record) replays as running first, then regresses to pending:toolStagesonly short-circuitsapproval-requestedandrunning, so bare queued traces fall through to the synthetic-running branch (verified repro). Addpart.status === "pending"to the no-stage branch plus a regression test asserting a queued call never showsrunningbefore its final frame. - minor
stories/chat/samples/play-turn.ts:100—turnFramescan emit a duplicate no-op frame after a tool batch whose last call contributes no stage (finalrunning/approval-requestedwith no record makesstarted[last]equal the settled form; verified). Fix: skip a frame whose parts equal the previous frame's, or stop the batch loop one short.
The sample replay gave a queued call (pending, no approval record) a synthetic running frame, so it ran and then went back to pending. It is now shown queued from the start, like a waiting or running call. A tool batch also emitted one frame per call, so a call with no earlier form produced a frame identical to the one before it. The batch now finishes only the calls that change, one at a time, and leaves the rest in their final form, so every frame differs from the previous one.
05fc47b to
42b5877
Compare
|
Thanks for the review. Both points are fixed. 1. A queued call replayed as running first, then went back to pending (minor)
2. A tool batch could produce a duplicate frame (minor)
Commit: |
42b5877 to
9796dc0
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Approve
Adds sample conversations and a play-turn helper for the chat stories.
Findings
No findings.
475d220 to
d6f1c71
Compare
The Samples table caption said Frames counts the steps a streaming story plays for the last message, but no story replays a sample's last message. It now says the column is how many steps turnFrames gives for that message.
d6f1c71 to
8eb4d54
Compare
Round 3 fixesA fresh review pass over the stack turned up the points below; each is fixed in a new commit at the end of this branch, and the stack is rebased onto it.
|
8eb4d54 to
7873d58
Compare
Add deterministic samples built only from the conversation contract: a short chat, a 300-message history, a tool storm with a batch, a failure and every approval outcome, generated images, a thread and a failed send. playTurn reveals a message's parts over time for streaming stories. Images are inline SVG, timestamps are fixed, and nothing reads the clock or Math.random.
Stacked on #116: review only this commit. Part of #94.
Notes for review
bun test stories/chat/samples;bun run testonly covers src/.Verification
bun run typecheckandbun run linton its own (the stack is checked commit by commit).bun run check,bun run build,bun run dep-guard,bun run contrast-testandbun run test:e2e(Playwright specs and the Storybook axe sweep in light and dark) pass.Closes #96