Skip to content

Animate chat text with pretext reveal#1027

Draft
ryokun6 wants to merge 2 commits intomainfrom
cursor/pretext-chat-optimization-b6df
Draft

Animate chat text with pretext reveal#1027
ryokun6 wants to merge 2 commits intomainfrom
cursor/pretext-chat-optimization-b6df

Conversation

@ryokun6
Copy link
Copy Markdown
Owner

@ryokun6 ryokun6 commented Mar 30, 2026

Summary

  • add @chenglou/pretext-driven line layout and reveal timing for assistant chat text so the text animation no longer depends on per-token framer-motion spans
  • keep the markdown tokenization cache/coalescing so assistant text can still render rich inline formatting efficiently while revealing via pretext-derived character/line progress
  • retain the rest of the chat UI structure and fallback rendering, while replacing the assistant text hot path with a plain React reveal based on precomputed layout information

Testing

  • bun test tests/test-chat-markdown.test.ts tests/test-chat-text-layout.test.ts
  • bun run build
  • browser validation of the Chats UI on a fresh client confirmed the app loads and the Chats app opens; manual generation of new assistant replies was blocked by the local anonymous rate limit on the existing API server, so runtime validation focused on build/test correctness and UI load behavior
Open in Web Open in Cursor 

@ryos-deploy
Copy link
Copy Markdown

ryos-deploy bot commented Mar 30, 2026

The preview deployment for ryos-dev is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-03-31 04:17:47 CET

Co-authored-by: Ryo Lu <me@ryo.lu>
@cursor cursor bot changed the title Optimize chat text animation with pretext heuristics Animate chat text with pretext reveal Mar 31, 2026
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.

2 participants