Skip to content

fix: simplify streamed answer presentation - #66

Merged
devhims merged 2 commits into
mainfrom
fix/streaming-answer-presentation
Sep 20, 2026
Merged

devhims merged 2 commits into
mainfrom
fix/streaming-answer-presentation

Conversation

@devhims

@devhims devhims commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Problem / Motivation

Streamed answers were placed inside a separate Draft box with a label and warning border. The extra treatment made the answer look like a second interface instead of text arriving in the normal response.

The response prompt also lacked the project's explicit rule against em dashes and substitute punctuation.

Why it matters

Streaming should change when text appears, not where it appears. Final answers should also follow the same punctuation rules as the rest of the product writing.

What changed

Streamed Markdown now renders in the normal answer area. The Draft label, border, and dedicated container are gone. Incoming snapshots reveal at 110 characters per second, with updates capped near 30 frames per second to avoid reparsing Markdown on every display frame. Reduced-motion users receive each snapshot immediately. The copy action still appears only after the validated answer replaces the stream.

Shared answer guidance now tells the model to end the sentence or use a comma instead of an em dash. It also rejects parentheses and en dashes as substitutes and points to writing-style.md.

Tests

  • Platform TypeScript build passed.
  • 28 unified finalizer tests passed, including a prompt assertion for the punctuation rule.
  • Web TypeScript check passed.
  • 32 web tests passed.
  • Playwright covers partial character reveal, validated-answer replacement, absence of Draft UI, and immediate reduced-motion rendering.

Manual verification

Open the Vercel preview, start an agent run, and confirm streamed text appears as a normal answer without a Draft label or border.

Screenshots / video

Pending the Vercel preview generated by this PR. The browser regression captures streaming-answer.png during CI.

Issue link

no linked issue: requested as follow-up feedback after PR #64 merged.

@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Sep 20, 2026 4:34pm UTC

@devhims

devhims commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Intent: Render streamed agent text in the normal answer area and enforce the project punctuation rule in generated responses.
Not a goal: Change the persisted draft transport, final answer validation, or copy behavior.

@devhims
devhims merged commit 8b595ff into main Sep 20, 2026
6 checks passed
@devhims
devhims deleted the fix/streaming-answer-presentation branch September 20, 2026 16:38

This branch was successfully deployed

1 active deployment
Preview 5155be90 Deployed Sep 20, 2026 by vercel[bot]
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