Skip to content

fix(clipboard): paste from other apps again on the desktop - #1419

Open
fchinu wants to merge 1 commit into
storytold:mainfrom
fchinu:fix/os-clipboard
Open

fchinu wants to merge 1 commit into
storytold:mainfrom
fchinu:fix/os-clipboard

Conversation

@fchinu

@fchinu fchinu commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On main, text copied in another program doesn't paste into the desktop app with Ctrl+V or Edit ▸ Paste. Copy and paste within DeckCraft still works. This is a regression from the egui 0.37 migration (#1350). The v0.11.1 release predates #1350, so released builds are not affected.

Cause

In the egui fork that #1350 moved to, eframe's access to the OS clipboard is the opt-in clipboard feature (it enables egui-winit/clipboard and egui-winit/clipboard-image). apps/deckcraft turns off eframe's default features and lists its own, and clipboard wasn't among them.

Without that feature, egui-winit uses a clipboard simulated inside the process. A Ctrl+V therefore only ever delivers what DeckCraft itself copied. cargo tree -e features -i egui-winit on main shows no clipboard feature enabled.

Change

  • apps/deckcraft/Cargo.toml: add "clipboard" to the eframe features.
  • Cargo.lock: adds smithay-clipboard and its Wayland dependencies, which egui-winit's clipboard pulls in.

No code changes. The web app (apps/deckcraft-web) is untouched.

Related

Testing

  • cargo build --release --locked -p deckcraft, cargo clippy --locked -p deckcraft --all-targets -D warnings, cargo fmt --check and cargo test -p deckcraft (44 tests)all pass.
  • cargo tree -e features -i egui-winit now lists egui-winit feature "clipboard".
  • Not yet checked by hand: pasting text from another app into a built binary. I couldn't drive the real clipboard and keyboard in the environment this was made in. A reviewer on Linux, Windows or macOS can check it by copying text in another app and pressing Ctrl+V in a text box.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Clipboard support is now enabled, allowing the app to interact with clipboard content.

Since the egui 0.37 migration (storytold#1350), eframe's OS clipboard is the
opt-in `clipboard` feature. The desktop app turns eframe's default
features off and did not list it, so egui-winit fell back to a clipboard
simulated inside the app: copy and paste within DeckCraft still worked,
but text copied in any other program never arrived on Ctrl+V.

Enable `clipboard` on the desktop app's eframe (it also turns on
egui-winit's `clipboard-image`). Cargo.lock gains smithay-clipboard and
its Wayland dependencies.

The v0.11.1 release predates storytold#1350 and is not affected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between aaf6c1c and f08c9c5.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 1
  • apps/deckcraft/Cargo.toml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The eframe dependency now enables its clipboard feature. Its other enabled features remain unchanged.

Changes: Clipboard support

Layer / File(s) Summary
Enable clipboard feature
apps/deckcraft/Cargo.toml
The eframe dependency enables the clipboard feature. Its other enabled features remain unchanged.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • storytold/deckcraft#1350: This PR migrated DeckCraft from egui 0.36 to 0.37 while retaining disabled default features. This change enables eframe’s clipboard feature following a reported desktop paste regression.

Suggested reviewers: alexanderalber, dylanmtaylor

Merge Risk: Minimal · up to f08c9

The change enables the intended desktop clipboard support without an identified correctness or availability risk.

Architecture risk: Low · up to f08c9

The change affects 1 system.

Changed systems: apps/deckcraft

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — apps/deckcraft (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/deckcraft/Cargo.toml: Added the clipboard feature to the eframe dependency; the other enabled features remain unchanged.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: restoring desktop paste from other applications by enabling clipboard support.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Harrison-Booth

Copy link
Copy Markdown
Contributor

Review notes (read the diff, checked the feature wiring; I did not run a paste).

  • In the pinned egui fork (rev 6d518fc, in the local cargo git checkout) eframe's clipboard feature is ["egui-winit/clipboard", "egui-winit/clipboard-image"] with the doc "If disabled a clipboard will be simulated", which matches the PR's cause.
  • With the PR's Cargo.toml, cargo tree --locked -e features -i egui-winit -p deckcraft on Linux lists egui-winit feature "clipboard" and "clipboard-image"; the Cargo.lock change is consistent with --locked.

Not checked: actual paste of text from another app on Linux, Windows or macOS (needs an interactive session; WSLg's compositor is not representative anyway), and the build of the app binary here.

@gpgpublickey

Copy link
Copy Markdown

Critical bug, merge asap pls

@gpgpublickey

Copy link
Copy Markdown

This is critical, clipboard the most used feature in any toolkit, how is possible this is still not merge?

@gpgpublickey

Copy link
Copy Markdown

@echelon can you pls approve this? deckcraft is almost thrash without copy and paste

@FredApps FredApps 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.

ReviewerA — source-read COMMENT (not an approval)

I read the manifest hunk: the eframe clipboard feature is enabled for the desktop app so pasting from other applications works again. A feature flag on an existing dependency is a small change; the feature pulls in arboard and its platform dependencies, so check the lockfile (the new transitive dependencies' licences and the Wayland build) and that the CI builds on Linux with and without X11. I can't test paste between applications here.

I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.

Status: waiting_author.

This branch has not been deployed

No deployments
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.

4 participants