PtySession wraps the ptyc helper: socketpair + Process.start + recvmsg with SCM_RIGHTS for master-fd transfer, a background isolate that loops on blocking read() and posts byte chunks, plus write/resize/ kill/close. close() SIGTERMs the child so the PTY's EOF wakes the reader naturally; SIGKILL + fd close + isolate kill cover the edge where the shell ignores SIGTERM — avoids the known Linux quirk where closing an fd doesn't unblock an in-flight read() on it. Env defaults stamp TERM=xterm-256color, COLORTERM=truecolor, CLICOLOR_FORCE=1 so shells + tmux + Claude emit 24-bit sequences that xterm.dart can render. User env (HOME / USER / SHELL) still inherits via mergePtyEnv(). ffi: 2.1.3 added as a runtime dep — the FFI bindings for socketpair, recvmsg, read/write, and ioctl(TIOCSWINSZ) need an allocator we're not writing by hand. Justified in pubspec + listed in licenses.yaml per D-042. make test-core (ci/test_core.sh) runs the Flutter-free core tests under a 120s hard timeout with setsid + process-group kill, wired ahead of the fast app tests in push-check so a hung PTY test can't wedge a pre-push. Current core suite: 24 tests in ~1s. Co-Authored-By: Claude <noreply@anthropic.com>
clide
A Flutter desktop IDE for Claude Code. Markdown-first content, pql-powered queries, canvas and graph surfaces, a Go sidecar handling PTYs / subprocesses / git / pql. Claude drives the UI through a clide CLI.
Currently pre-v2.0, scaffolding. The north-star design lives in docs/initial-plan.md; architectural decisions are captured in docs/ADRs/. The Python Textual v1.2.0 implementation is archived under legacy/ for reference.
Three surfaces, one tool
app/— Flutter desktop application (Linux / macOS; Windows is a stretch).sidecar/— Go sidecar/CLI, single binary with two modes:clide <subcommand>(one-shot for Claude) andclide --daemon(long-running sidecar for the app). Owns PTYs, subprocesses, file watchers, git, pql invocations.pql— external supporter tool. clide wraps it for every query surface; never re-implements it.
Why the rebuild?
The Python Textual implementation (legacy/) proved the pane model but capped at terminal-only rendering. A short-lived experiment (claudian, April 2026) explored an Obsidian-plugin approach and was abandoned because Obsidian is Electron, and the user's history with terminal-in-Electron ruled that host out.
Flutter desktop resolves both constraints: native Skia rendering avoids Electron's failure modes, xterm.dart gives us a solid terminal surface, and the pane model can be rebuilt natively. The Obsidian ideas worth keeping (canvas, graph) fold in; everything else (vault concept, inline query tables, plugin ecosystem inheritance) doesn't.
Status
No build yet beyond the repo scaffold. Tier 0 acceptance: sidecar daemon runs, Flutter app connects, empty IDE shell appears with placeholders.
License
MIT. See LICENSE.