Expand description
diffler binary internals, exposed as a library so the integration tests can drive the full app (event pump + MCP server) headlessly. The public surface is the binary’s: nothing here is a stable API.
Modules§
- app
- Application state and event handling.
App::handledoes no terminal IO, so we can unit-test the whole shell;ui::drawrenders the state. - ci
- CI and PR review across forges. Adapters implement
ForgeProviderovergh/glab/curlthrough theCommandRunnerseam and never touch the terminal. - clipboard
- System clipboard with no native build deps, so the static musl binaries stay clean: OSC52, which terminals forward over ssh and tmux, plus a pipe to the platform clipboard CLI for terminals that ignore OSC52.
- config
- Layered TOML configuration: defaults → global file → project file → CLI.
- editor
- $EDITOR integration. The main loop owns the terminal, so
Appqueues anEditorRequestand gets the outcome back inApp::editor_finished. - event
- Terminal events and a periodic tick on one channel. Every decision lives in
App::handle, which is what the tests drive. - graph
- A navigable orthogonal node-graph component for ratatui. It does no IO: the
host builds a
Model, pushes it into aGraphView, renders it, and handles theGraphActions it returns. - keymap
- Key bindings: neogit-style defaults per screen, overridable from
[keys.*]config sections, with multi-key sequence resolution. - mcp
- Embedded MCP server: agents read review comments, answer them in place,
and long-poll for the human’s feedback. Tool handlers never touch the
review directly: every call is sent through the app event channel as an
McpRequestand answered byApp::handle_mcpon the main loop, so the app stays the single owner of all state (no locks). - proc
- Child processes diffler shells out to, kept away from the terminal.
- search
- Vim-style
/search over a pane’s(row index, text)rows: plain substring with smartcase, case-insensitive unless the query has an uppercase letter. - text
- Text shaping shared across the UI and the graph engine, both of which truncate author-controlled strings into fixed terminal-column budgets.
- theme
- Color themes.
github-darkis the default;ui.themeselects a built-in, each pairing its palette with a matching syntax-highlight theme. - transient
- Magit-style transient menus: a prefix key opens a menu whose keys are all leaves. The model is plain data so resolution and the which-key layout stay unit-testable; the app owns the live state and timer.
- tree
- Sidebar rows and the directory-trie flattening behind them, with no rendering or app state so the navigation math stays unit-testable.
- ui
- Rendering.
drawreads review state fromAppand computes none; it takes&mut Appfor scroll offsets and the diff view’s highlight cache. - watch
- Debounced filesystem events on the repo become
AppEvent::RepoChanged. - workspace
- Project tabs: each tab is a whole
Appover its own repository. The workspace routes input to the tab on screen, worker answers to the tab that asked, and agent calls to the tab they name.