SIGN IN SIGN UP

refactor(tui): extract presentation layer into jcode-tui crate (Phase C)

Move the terminal UI (`tui`) and offline replay export (`video_export`) out
of the monolithic root `jcode` crate into a new `jcode-tui` crate that compiles
as its own rustc unit. jcode-tui builds on the application core: it re-exports
`jcode-app-core` (which re-exports `jcode-base`) via `pub use jcode_app_core::*`,
so every existing `crate::<module>` path (e.g. `crate::config`, `crate::server`,
`crate::tui`) keeps resolving unchanged. The root crate now re-exports the whole
stack via `pub use jcode_tui::*` and retains only the cli + entrypoint layer.

The dependency DAG is strictly downward (cli -> tui -> app-core -> base) with no
back-edges, so tui only ever referenced app-core's public surface; the move
produced zero new cross-boundary visibility errors. Only three direct extern
deps had to be added to jcode-tui (hex, url, jcode-selfdev-types) for paths the
moved code referenced by crate name.

Effect on per-rustc peak memory (selfdev, single-job, VmHWM):
  root jcode lib  1.267 -> 0.664 GiB  (thin cli shell)
  jcode-tui                    1.280 GiB  (the former heavy part of root)
  jcode-app-core               1.176 GiB
  jcode-base                   1.126 GiB
Root is now a small unit that recompiles fast for cli-only iteration; the four
big units are balanced at ~1.1-1.3 GiB vs the original 3.18 GiB monolith.

Features (jemalloc/jemalloc-prof/embeddings/pdf/mmdr-size-api/dev-bins) are
forwarded root -> jcode-tui -> jcode-app-core -> jcode-base.
J
jeremy committed
85c967357a5657de762c76cbf411ae89a220cf5c
Parent: f649dae