Skip to content

feat(chat): streaming rewrite + cacheplane parser migration (0.0.14)#186

Merged
blove merged 11 commits into
mainfrom
claude/chat-streaming-rewrite
May 2, 2026
Merged

feat(chat): streaming rewrite + cacheplane parser migration (0.0.14)#186
blove merged 11 commits into
mainfrom
claude/chat-streaming-rewrite

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 2, 2026

What

Phase 2 of the chat pipeline redesign (spec: docs/superpowers/specs/2026-05-02-chat-pipeline-redesign-design.md).

  • Migrate @ngaf/chat to consume @cacheplane/partial-json@^0.1.1 (replacing @ngaf/partial-json)
  • Mark @ngaf/partial-json deprecated at 0.0.2
  • Delete the bespoke append-only markdown renderer (~200 LOC)
  • Rewrite chat-streaming-md as a ~30 LOC RAF-batched full-reparse component
  • Rekey ChatComponent classifier cache by message id + janitor effect
  • Add localStorage-gated trace harness (NGAF_CHAT_STREAM_TRACE=1)
  • Diagnose the long-output streaming regression (Findings appendix)

Why

The old append-only renderer's delta math (content.slice(lastContent.length)) silently froze when content shrank or reordered. RAF-batched full reparse is simpler, idempotent, and eliminates that bug class. Sharing the partial-JSON parser across projects gives both a stricter tokenizer + identity preservation + finish() semantics.

Versions

  • @ngaf/chat: 0.0.13 → 0.0.14
  • @ngaf/partial-json: frozen at 0.0.2 (deprecated)
  • @cacheplane/partial-json: external dep at ^0.1.1 (published earlier today)

Testing

  • nx test chat: 316 tests pass (including 4 new streaming-markdown.component specs and 5 new trace specs)
  • nx test langgraph: passes
  • Live smoke: 800-word streaming response renders end-to-end. msgCount=2, no DOM teardown, content delivered correctly.

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 2, 2026 6:44pm

Request Review

@blove blove merged commit 9da6ba9 into main May 2, 2026
14 checks passed
@blove blove deleted the claude/chat-streaming-rewrite branch May 7, 2026 16:30
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