Skip to content

feat(tui): console copy-to-clipboard via opentui - #5658

Merged
rekram1-node merged 5 commits into
anomalyco:devfrom
edlsh:feat/console-click-to-copy
Dec 24, 2025
Merged

rekram1-node merged 5 commits into
anomalyco:devfrom
edlsh:feat/console-click-to-copy

Conversation

@edlsh

@edlsh edlsh commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Closes #4885

Supersedes #5239 — uses opentui's new onCopySelection callback from sst/opentui#411.

Changes

  • Updated @opentui/core and @opentui/solid to 0.1.61
  • Wired renderer.console.onCopySelection callback for clipboard integration
  • Removed manual MouseParser implementation (now handled by opentui)

Features (from opentui)

  • Mouse selection: Click and drag to select text in console
  • [Copy] button: Clickable button in console title bar
  • Keyboard shortcut: Ctrl+Shift+C to copy selection
  • OSC52 support: Works in tmux and terminals supporting OSC52

Context: #4885 (comment)

edlsh and others added 4 commits December 16, 2025 20:13
The click-to-copy feature would fail when console was visible but
unfocused because the state tracker assumed toggle() was a simple
on/off, but opentui's toggle() has 3 states:

- hidden → show+focus
- visible+focused → hide
- visible+unfocused → focus (stays visible!)

When user toggled an unfocused console, the old code would flip
consoleOpen to false even though the console remained visible,
breaking the click detection.

Now tracks both visible AND focused state to match opentui's
actual behavior, ensuring click-to-copy works reliably.

Closes #4885
- Update @opentui/core and @opentui/solid to 0.1.61
- Replace manual click-to-copy with opentui's onCopySelection callback
- Remove MouseParser and console state tracking (now handled by opentui)
- Simplify toggle console command

Depends on anomalyco/opentui#411 (merged)
@rekram1-node
rekram1-node merged commit e8ac0b6 into anomalyco:dev Dec 24, 2025
2 checks passed
rekram1-node added a commit that referenced this pull request Dec 27, 2025
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
androidand pushed a commit to androidand/opencode-skein that referenced this pull request Sep 19, 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.

[FEATURE]: Copy console text on click

2 participants