Files
gpuix/examples
Tommy D. Rossi eae33e8a56 feat: render apps inside the terminal with terminal: true
`render(<App />, { terminal: true })` or `GPUIX_TERMINAL=1` runs the same
GpuixView on gpui_terminal, a GPUI platform in the Zed fork that paints with
the kitty graphics protocol. No native window opens.

```
macOS                                   Linux
renderer.init ─► init_macos             renderer.init ─► init_threaded
  EmbeddedPlatform::Terminal              gpuix-ui thread
  TerminalPlatform::new_embedded()        gpui_terminal::application().run()
  tick() ─► pump_events()
```

- renderer.rs: `terminal_requested()` reads the option and the env var;
  macOS swaps MacPlatform for TerminalPlatform inside the embedded path, so
  tick() and the frame wake hook are unchanged. No per-method branches
- input.rs: `init_terminal` unbinds ctrl-c in text field contexts so it
  reaches the platform and quits
- `isTerminal()` exported from @gpuix/native, @gpuix/react and @gpuix/solid
  as a plain function (not a hook); browser.mjs returns false
- examples/chat.tsx, mail.tsx drop the traffic-light gap in a terminal
- AGENTS.md: terminal mode swaps the platform; no hooks for non-reactive values
- README: "Run in a terminal" section and the `terminal` option row. The same
  README hunk also carries a note on `windowBackground: "blurred"` tinting
- docs/terminal-renderer.md: architecture, traps, research notes
- zed submodule: gpuix-terminal commits (gpui_terminal crate, embedded mode,
  SIGWINCH-only forwarding)
- changeset (minor for native, react, solid)

Discord: https://discord.com/channels/1422625037164351591/1562055543466496043
Session: ses_ea7105a47ffeNLpB02sEyo5t9g
2026-10-20 13:55:40 +02:00
..