Native Windows port: Direct2D/DirectWrite rendering over ConPTY#28
Open
ucsandman wants to merge 2 commits into
Open
Native Windows port: Direct2D/DirectWrite rendering over ConPTY#28ucsandman wants to merge 2 commits into
ucsandman wants to merge 2 commits into
Conversation
Adds a 4-crate Rust workspace under rust/ implementing Zentty as a native Windows app (no Electron, no web views): - zentty-core: platform-agnostic logic (worklanes, panes, layout, command palette, themes, task runner, agent IPC protocol, session restore) - zentty-terminal: screen model, selection, search, clipboard, clean-copy - zentty-pty: ConPTY pseudo-console sessions with exit detection - zentty-win: Win32 shell — DXGI flip-model swapchain + ID2D1DeviceContext rendering, DirectWrite text with grayscale AA and ellipsis-trimmed chrome, per-monitor DPI scaling, dark immersive title bar, sidebar with agent status pills, pane splits with focus ring, command palette and global search overlays, built-in themes (default dark / gruvbox / dracula), full keyboard mapping, window-title + bell integration, device-loss recovery with WARP fallback, shell-exit pane auto-close Packaging: multi-resolution icon embedded via winresource, GUI subsystem with MessageBox fatal-error fallback, portable zip + per-user install/uninstall scripts (Start-menu shortcut, no admin), documented cargo-wix MSI route. README gains a Windows section with build/run/test/ install steps and the keyboard map; AGENTS.md documents the rust/ gates. Gates: cargo build --release, clippy -D warnings, 549 tests — all green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Clicking a non-focused pane or a sidebar row (worklane header or pane row) now moves focus there, Windows Terminal-style: the focusing click is swallowed and never starts a selection. Pane and sidebar-row ids are threaded into the render model; the renderer records per-pane and per-sidebar-row hit rects at draw time so hit-testing matches the geometry actually drawn at any DPI. Also adds opt-in WM_KEYDOWN/WM_CHAR input tracing via ZENTTY_DEBUG_INPUT_LOG=<file> (logs vk + modifier state + effect discriminant only, never key payloads) to diagnose shortcut issues that only reproduce on real keyboards. +9 tests (hit-rect lookup, focus-by-id session paths). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a complete native Windows port of Zentty as a self-contained Rust workspace under
rust/— no Electron, no web views. It brings the core Zentty experience to Windows: worklanes, panes with splits, a sidebar with live agent-status pills, the command palette, global search, and theming.Nothing outside
rust/is touched except: a "Windows" section in the README, a short "Windows port" note in AGENTS.md, and two.gitignoreentries (rust/target/,rust/dist/). The macOS app is unaffected.Architecture
Four crates, with the platform-agnostic logic kept separate so it stays reusable:
zentty-corezentty-terminalzentty-ptyzentty-winID2D1DeviceContextrendering, DirectWrite text, all UI chromeNotable Windows-specific engineering:
ID2D1HwndRenderTargetnever composites under DWM), grayscale text AA, per-monitor DPI scaling of fonts and chrome, device-loss recovery (D2DERR_RECREATE_TARGET, device-removed, resize failures) with HARDWARE→WARP fallback.winresource, GUI subsystem with a MessageBox fatal-error fallback,rust/scripts/package-windows.ps1produces a portable zip with per-user install/uninstall scripts (Start-menu shortcut, no admin); the cargo-wix MSI route is documented in the README.Testing
From
rust/on Windows (Rust MSVC toolchain + Windows 10/11 SDK):All green at time of submission: 549 tests passing, clippy clean with
-D warnings. The suite covers the logic crates plus the Win32 shell (input encoding, layout/metrics, agent-IPC named-pipe transport, ConPTY exit detection, desktop session behavior).Run it:
.\target\release\zentty-win-desktop.exe—Ctrl+Shift+Popens the palette,Ctrl+Dsplits. Full keyboard map is in the README's Windows section.Known limitations
🤖 Generated with Claude Code