Skip to content

fixed tui streaming#177

Merged
bmdavis419 merged 1 commit intomainfrom
davis/tui-render-fixes
Feb 9, 2026
Merged

fixed tui streaming#177
bmdavis419 merged 1 commit intomainfrom
davis/tui-render-fixes

Conversation

@bmdavis419
Copy link
Collaborator

@bmdavis419 bmdavis419 commented Feb 9, 2026

Greptile Overview

Greptile Summary

Fixed TUI streaming by replacing custom Shiki-based markdown renderer with OpenTUI's native markdown component and upgrading to @opentui 0.1.77. The core streaming issue was resolved by properly using the ReadableStream reader API with explicit lock management in stream.ts. Additionally, improved web app performance by implementing thread preloading on sidebar hover/focus.

Key changes:

  • Replaced 359-line custom markdown renderer with OpenTUI's built-in markdown support
  • Fixed SSE stream reader to use explicit getReader() with proper lock release
  • Refactored message rendering to use Index instead of For for better reactivity during streaming
  • Added tree-sitter parser configuration for 8 languages (JSON, HTML, CSS, Python, Rust, Go, YAML, Bash)
  • Implemented thread preloading with 2-minute cache TTL in web app
  • Added delayed loading spinner (200ms) for better perceived performance

Note: 2.0-final-launch-commands.md is a plan file committed to the repository.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are well-structured refactors that improve streaming functionality by leveraging native OpenTUI capabilities. The streaming fix properly handles ReadableStream API with lock management, the markdown rendering migration simplifies the codebase significantly (-359 lines), and the web performance improvements use standard caching patterns. No breaking changes or security concerns detected.
  • No files require special attention

Important Files Changed

Filename Overview
2.0-final-launch-commands.md Added planning document describing CLI commands for 2.0 launch
apps/cli/src/client/stream.ts Fixed SSE stream parsing by using explicit reader with proper lock management
apps/cli/src/tui/components/markdown-text.tsx Replaced custom shiki-based renderer with OpenTUI's native markdown component for streaming support
apps/cli/src/tui/components/messages.tsx Refactored to use Index instead of For for better reactivity, fixed streaming state tracking by chunk ID
apps/web/src/lib/components/Sidebar.svelte Added thread preloading on hover/focus to improve navigation performance
apps/web/src/routes/app/chat/[id]/+page.svelte Integrated thread preload store and added delayed loading spinner (200ms) for better UX

@bmdavis419 bmdavis419 changed the title tui is much better now fixed tui streaming Feb 9, 2026
@bmdavis419 bmdavis419 marked this pull request as ready for review February 9, 2026 02:42
Copy link
Collaborator Author

bmdavis419 commented Feb 9, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@bmdavis419 bmdavis419 mentioned this pull request Feb 9, 2026
Copy link
Collaborator Author

bmdavis419 commented Feb 9, 2026

Merge activity

  • Feb 9, 11:29 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 9, 11:30 PM UTC: @bmdavis419 merged this pull request with Graphite.

@bmdavis419 bmdavis419 merged commit 0f13111 into main Feb 9, 2026
3 of 5 checks passed
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