Skip to content

Ratatui migration#36

Merged
rs545837 merged 12 commits into
mainfrom
ratatui-migration
May 27, 2026
Merged

Ratatui migration#36
rs545837 merged 12 commits into
mainfrom
ratatui-migration

Conversation

@Palanikannan1437

Copy link
Copy Markdown
Contributor

Right now a freaking pane takes 60-80mbs each, with 6+ sessions and 5+ windows each, it's insane

this pr gets each pane to roughly take 1.5-2mb in memory ;)

Palanikannan1437 and others added 6 commits April 27, 2026 20:48
Adds docs/ratatui-migration/ with a complete spec for porting apps/tui
(Bun + OpenTUI + Solid) to apps/tui-rs (Rust + Ratatui), targeting an
~85-90% per-process RAM reduction (80 MB → ~10-15 MB) with byte-for-byte
visual parity.

17 ordered docs covering:
- Phased plan + success criteria (01)
- Lightweight crate stack with web-research justification (02)
- Architecture comparison + WS protocol -> serde mapping (03-04)
- State management, layout, components, input handling (05-09)
- Mux integration, config, themes, server bootstrap (10-13)
- Edge cases, testing strategy, distribution, feasibility matrix (14-17)

Reference snapshots (35x56 panes, Catppuccin Mocha):
- 3x .ansi truecolor captures + .txt + .meta + 1 PNG ground truth
- Decoded SGR palette mapped to ThemePalette tokens
- Hardcoded layout invariants for byte-exact reproduction
- Tmux grouped sessions expose the same physical windows and panes under multiple session names, which made Rust sidebar toggles spawn duplicate sidebars into one window.
- Deduplicate sidebar window and pane discovery by physical tmux ids while preserving the active linked-session identity for spawn context.
Comment on lines +8 to +17
KeyModifiers as CrosstermKeyModifiers, MouseButton as CrosstermMouseButton,
MouseEventKind as CrosstermMouseEventKind,
};
use crossterm::execute;
use crossterm::terminal::{
self, Clear, ClearType, EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode,
enable_raw_mode,
};
use futures_util::StreamExt;
use opensessions_sidebar_protocol::{

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this about

Add all remaining user-facing features to reach full parity with the
TypeScript reference sidebar:

- Metadata display: status/progress/logs in detail panel with tone icons
- 20 theme palettes: port all 18 missing themes from themes.ts
- Modal infrastructure: overlay system with key dispatch interception
- Theme picker: searchable list with live preview (t key)
- Kill confirmation: red-bordered confirm modal before killing sessions
- Local links: render session local_links in detail panel
- Session card metadata: optional status+progress summary row
- Port display: port hints on branch row (⌁port or ⌁port+N)
- Dynamic detail panel height: Left/Right keys resize, min 4
- Drag-to-resize: mouse drag on separator to resize detail panel
rs545837 and others added 5 commits May 23, 2026 17:59
l opens lazydiff in a new tmux window, L opens it in a new terminal
window. Launches in the focused session's working directory.
Delete all TypeScript source and test files for the TUI, server, and
runtime packages. The Rust replacements (tui-rs, server-rs, runtime-rs)
are feature-complete with 210 passing tests.

- Remove apps/tui/src/, apps/server/src/, packages/runtime/src+test/
- Rewrite start.sh: launch Rust binary directly, error if not built
- Rewrite server-common.sh: single port base (22000), no bun/TS fallback
- Rewrite zellij-toggle.sh: use Rust server binary
- Clean package.json: remove bun workspaces, turbo scripts, TS devDeps
- Remove OPENSESSIONS_RUST opt-in flag (Rust is now the default)
…dedupe

Dedupe Rust sidebars for tmux grouped sessions
Remove TypeScript TUI, server, runtime, and mux packages that are
fully replaced by their Rust counterparts. Update README to reflect
cargo-based build, Rust repo layout, and ratatui stack. Clean up
bun references from opensessions.tmux.
@rs545837 rs545837 merged commit c02523a into main May 27, 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.

3 participants