feat(tui): ship TUI in default binary - #2195
Conversation
Add `tui` to default Cargo features so the Ratatui terminal UI is included in standard builds. The TUI only activates when explicitly configured at runtime (`config.channels.tui`), so server deployments are unaffected — the deps compile in but nothing initializes. Also remove `dist = false` from ironclaw_tui so cargo-dist includes it in release artifacts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the main Cargo.toml to include the tui feature in the default features, and removes the [package.metadata.dist] section from crates/ironclaw_tui/Cargo.toml. The reviewer noted that making tui a default feature introduces a dependency (arboard) that requires X11/Wayland development headers on Linux, which could lead to build failures in minimal environments like Docker or CI. The reviewer suggests considering making the TUI feature optional or making arboard an optional dependency within ironclaw_tui to ensure portability for default builds, given the project's target deployment environments.
arboard requires X11/Wayland dev headers on Linux, breaking builds in minimal Docker images and headless CI runners. Move arboard and image behind an opt-in `clipboard` feature (defaulted on) so headless builds can exclude them while desktop builds keep full clipboard support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Addressed review feedback: |
There was a problem hiding this comment.
Pull request overview
This PR makes IronClaw’s Ratatui-based TUI ship in standard builds by enabling the tui feature by default, and it introduces a clipboard feature in ironclaw_tui to optionally compile clipboard/image support.
Changes:
- Enable the workspace/root crate’s
tuifeature in the default feature set. - Add
clipboardas anironclaw_tuifeature (enabled by default) and makearboard/imageoptional deps behind it. - Gate clipboard-related functions/tests in the TUI app code behind
cfg(feature = "clipboard").
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Cargo.toml |
Adds tui to default features so the TUI is included in standard builds. |
crates/ironclaw_tui/Cargo.toml |
Introduces clipboard feature and makes arboard/image optional behind it. |
crates/ironclaw_tui/src/app.rs |
Adds cfg(feature="clipboard") gating with non-clipboard fallbacks for clipboard text/image helpers and related tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* feat(tui): ship TUI in default binary Add `tui` to default Cargo features so the Ratatui terminal UI is included in standard builds. The TUI only activates when explicitly configured at runtime (`config.channels.tui`), so server deployments are unaffected — the deps compile in but nothing initializes. Also remove `dist = false` from ironclaw_tui so cargo-dist includes it in release artifacts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tui): make arboard/clipboard optional to support headless builds arboard requires X11/Wayland dev headers on Linux, breaking builds in minimal Docker images and headless CI runners. Move arboard and image behind an opt-in `clipboard` feature (defaulted on) so headless builds can exclude them while desktop builds keep full clipboard support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
tuito default Cargo features so the Ratatui terminal UI ships in standard buildsdist = falsefromironclaw_tuiso cargo-dist includes it in release artifactsThe TUI only activates when explicitly configured at runtime (
config.channels.tui.is_some()), so server/Docker deployments are completely unaffected — the deps compile in but nothing initializes. The dependency footprint is light (ratatui, crossterm, tui-textarea, pulldown-cmark, arboard, image/png).Server builds that want to exclude it can still use
--no-default-features --features postgres,libsql.Test plan
cargo checkwith default features — compiles cleancargo check --no-default-features --features postgres,libsql— compiles clean without TUI🤖 Generated with Claude Code