| name | gpui-rust-console |
| version | 0.2.0 |
| description | Build and extend pd-console — Port Daddy's GPU-native macOS operator console (GPUI 0.2.x, Zed's Rust UI). Covers the render-agnostic Block/Pane(Surface) contract, the two-thread reqwest↔smol refresh pipeline, Taffy flexbox layout, uniform_list virtual scroll, focus + keyboard nav, the OKLCH theme and ICS maritime flag badges, GPUI's missing text-input, and the real feature-gated cargo/CI gate. Use when adding panes, visual polish, or debugging GPUI rendering/layout/focus in core/pd-console. NOT for the TypeScript daemon, generic Rust toolchain/borrow-checker help (use rust-with-claude-code), or non-pd GPUI apps with a different theme/architecture.
|
| author | port-daddy |
| license | Apache-2.0 |
| tags | ["gpui","rust","ui","native","macos","console","oklch","maritime","port-daddy"] |
| metadata | {"category":"Native UI & Rendering","argument-hint":"[task: add-pane|layout|scroll|theme|maritime|text-input|verify]","pairs-with":["rust-with-claude-code","daemon-development","git-best-practices"]} |
gpui-rust-console
Authoritative skill for core/pd-console (crate pd-console v0.2.0, ADR-0046): a
GPU-native standalone macOS operator console built on GPUI 0.2.2, plus a headless ratatui
REPL that renders the same panes. The defining idea: a pane emits render-agnostic
Blocks; two renderers paint them. One pane, two faces — which is why every pane is
unit-tested on cheap Linux runners while the Metal window builds only on macOS.
When to Use
✅ Use for:
- Adding or extending a pane/surface in
core/pd-console/
- GPUI layout (Taffy flexbox), scroll (
uniform_list/list), focus, keyboard nav
- The OKLCH theme (
theme.rs) and ICS maritime flag badges (maritime.rs)
- Debugging the reqwest↔smol two-thread refresh pipeline or
cx.notify() storms
- Designing text input where GPUI ships no widget (the
pd tube cockpit)
- Getting the feature-gated
cargo/CI gate right
❌ NOT for:
- The TypeScript daemon, routes, or
agent.rs HTTP wiring beyond consuming it
- Generic Rust (borrow checker, async, FFI, testing idioms) →
rust-with-claude-code
- A non-pd GPUI app — the theme, the 17-pane model, and the daemon contract are specific
- Generic macOS app packaging / notarization →
rust-app-distribution
The Model in One Diagram
flowchart TD
D["DaemonClient (reqwest)"] -->|"GET /route per pane"| PR
subgraph PR["Producer: std::thread + current-thread tokio (2s loop)"]
R["pane.refresh(&client).await"] --> V["pane.view() → Vec<Block>"]
end
PR -->|"std::sync::mpsc: Vec<(nav_idx, Vec<Block>)>"| CO
subgraph CO["Consumer: GPUI foreground (smol, main thread, 500ms)"]
U["window.update → view.update_panes"] --> N["cx.notify()"]
end
N --> PAINT["ConsoleView::render: Block → GPUI element (Tone resolved to OKLCH)"]
CO -.->|"control_tx: ControlMsg::InterruptLane"| PR
reqwest needs tokio; GPUI runs smol; they cannot share an executor. The producer owns
the daemon + all 17 panes and mpscs Blocks to the consumer; control flows back on a
second channel. Use channels, never Arc<Mutex<State>> (it blocks the renderer — the #1
GPUI perf bug). Full detail: .