Skip to content

Add system clipboard integration behind clipboard feature#110

Merged
ryanoneill merged 2 commits intomainfrom
feature/clipboard-integration
Mar 2, 2026
Merged

Add system clipboard integration behind clipboard feature#110
ryanoneill merged 2 commits intomainfrom
feature/clipboard-integration

Conversation

@ryanoneill
Copy link
Owner

Summary

  • Add arboard = { version = "3", optional = true } dependency and clipboard feature flag
  • Add clipboard to the full feature array
  • Add system_clipboard_set() and system_clipboard_get() helpers to InputField and TextArea (behind #[cfg(feature = "clipboard")])
  • Copy/cut now writes to both internal and system clipboard
  • Paste prefers system clipboard, falls back to internal clipboard
  • Errors silently ignored for headless environments (CI, SSH, containers)
  • Update clipboard-related tests with #[cfg] gates for feature-dependent behavior

Test plan

  • cargo test — all tests pass
  • cargo clippy -- -D warnings — clean
  • cargo check --no-default-features — compiles (clipboard not included)
  • cargo test --doc — pass
  • cargo build --examples — compiles

🤖 Generated with Claude Code

ryanoneill and others added 2 commits March 1, 2026 20:41
InputField and TextArea now read from/write to the system clipboard via
arboard when the clipboard feature is enabled. Copy/cut writes to both
internal and system clipboards; paste prefers system clipboard, falling
back to internal. Errors are silently ignored for headless environments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 59.09091% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.56%. Comparing base (41832db) to head (b407eea).

Files with missing lines Patch % Lines
src/component/text_area/mod.rs 36.36% 7 Missing ⚠️
src/component/input_field/mod.rs 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   92.65%   92.56%   -0.09%     
==========================================
  Files          99       99              
  Lines        9491     9513      +22     
==========================================
+ Hits         8794     8806      +12     
- Misses        697      707      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ryanoneill ryanoneill merged commit f593789 into main Mar 2, 2026
9 of 13 checks passed
@ryanoneill ryanoneill deleted the feature/clipboard-integration branch March 2, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants