Skip to content

feat(tui): ship TUI in default binary - #2195

Merged
henrypark133 merged 2 commits into
stagingfrom
feat/tui-default-feature
Apr 9, 2026
Merged

henrypark133 merged 2 commits into
stagingfrom
feat/tui-default-feature

Conversation

@serrrfirat

Copy link
Copy Markdown
Collaborator

Summary

  • Add tui to default Cargo features so the Ratatui terminal UI ships in standard builds
  • Remove dist = false from ironclaw_tui so cargo-dist includes it in release artifacts

The 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 check with default features — compiles clean
  • cargo check --no-default-features --features postgres,libsql — compiles clean without TUI
  • CI passes

🤖 Generated with Claude Code

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>
@github-actions github-actions Bot added scope: dependencies Dependency updates size: XS < 10 changed lines (excluding docs) risk: medium Business logic, config, or moderate-risk modules contributor: core 20+ merged PRs labels Apr 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Cargo.toml
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>
@github-actions github-actions Bot added size: S 10-49 changed lines and removed size: XS < 10 changed lines (excluding docs) labels Apr 9, 2026
@serrrfirat

Copy link
Copy Markdown
Collaborator Author

Addressed review feedback: arboard and image are now optional deps behind a clipboard feature in ironclaw_tui (defaulted on). Headless/Docker builds that omit the tui feature won't pull in the X11/Wayland dependency chain. When clipboard is disabled, copy-to-clipboard is a no-op and image paste returns None.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 tui feature in the default feature set.
  • Add clipboard as an ironclaw_tui feature (enabled by default) and make arboard/image optional 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.

@henrypark133
henrypark133 merged commit aaeb904 into staging Apr 9, 2026
19 checks passed
@henrypark133
henrypark133 deleted the feat/tui-default-feature branch April 9, 2026 20:20
@ironclaw-ci ironclaw-ci Bot mentioned this pull request Apr 10, 2026
@ironclaw-ci ironclaw-ci Bot mentioned this pull request Apr 18, 2026
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: dependencies Dependency updates size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants