Skip to content

fix(tui): surface clipboard write failures#32526

Closed
wgu9 wants to merge 1 commit into
anomalyco:devfrom
wgu9:clipboard-errors
Closed

fix(tui): surface clipboard write failures#32526
wgu9 wants to merge 1 commit into
anomalyco:devfrom
wgu9:clipboard-errors

Conversation

@wgu9

@wgu9 wgu9 commented Jun 16, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #24713
Related #7048
Related #4754

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • Stops swallowing failures from native clipboard commands and clipboardy.write.
  • Preserves the existing clipboard backend selection in one helper, but lets write failures reject so TUI callers show their existing failure/error toast instead of a false "Copied" success.
  • Adds regression tests for native clipboard and clipboardy write failures.

How did you verify your code works?

  • bun test test/clipboard.test.ts from packages/tui
  • bun typecheck from packages/tui
  • bunx oxlint packages/tui/src/clipboard.ts packages/tui/test/clipboard.test.ts
  • git diff --check
  • pre-push bun turbo typecheck

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found related PRs that address similar clipboard issues:

Related PRs:

  1. fix(tui): prevent false clipboard copy success on Linux #31252 - fix(tui): prevent false clipboard copy success on Linux

    • Directly related: addresses clipboard copy success/failure on Linux, similar goal of preventing false success messages
  2. fix(opencode): report clipboard copy failures #27861 - fix(opencode): report clipboard copy failures

    • Related: addresses clipboard copy failure reporting, part of the same family of clipboard error handling improvements

These are not exact duplicates (the current PR #32526 is distinct), but they're closely related work on clipboard failure handling. The current PR appears to be a more comprehensive solution that surfaces clipboard write failures across both native clipboard commands and clipboardy, while the earlier PRs focused on specific platform issues (Linux) or specific modules (opencode vs tui).

@wgu9

wgu9 commented Jun 16, 2026

Copy link
Copy Markdown
Author

Closing this to avoid duplicating #31252. That PR already targets the current packages/tui clipboard owner and covers the false-success path with a broader result/error contract. Thanks for the related-PR pointer.

@wgu9 wgu9 closed this Jun 16, 2026
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.

Copy shows copied popup but clipboard remains unchanged on Linux terminal

1 participant