Skip to content

fix(ui): support clipboard paste in filter and command inputs - #202

Merged
yimsk merged 2 commits into
clawscli:mainfrom
nick4eva:add-ability-to-paste-search-string-from-clipboard
Jul 24, 2026
Merged

fix(ui): support clipboard paste in filter and command inputs#202
yimsk merged 2 commits into
clawscli:mainfrom
nick4eva:add-ability-to-paste-search-string-from-clipboard

Conversation

@nick4eva

Copy link
Copy Markdown
Contributor

Filter views only routed tea.KeyPressMsg to their textinput, so bracketed paste (Ctrl+Shift+V, tmux paste) was dropped and the textinput's built-in Ctrl+V never received its clipboard-read result.

Forward paste and other textinput-bound messages to the focused filter input in the resource browser, service browser, log view, tag search view and multi selector, and accept tea.PasteMsg in command mode.

Closes #201

Filter views only routed tea.KeyPressMsg to their textinput, so
bracketed paste (Ctrl+Shift+V, tmux paste) was dropped and the
textinput's built-in Ctrl+V never received its clipboard-read result.

Forward paste and other textinput-bound messages to the focused filter
input in the resource browser, service browser, log view, tag search
view and multi selector, and accept tea.PasteMsg in command mode.

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

Thanks for adding paste support and the accompanying tests. Overall, this looks like a good change.

Two things stood out while reviewing it:

  1. The clipboard result from Ctrl+V does not return to the command input in command mode.
  2. Mouse-wheel scrolling stops working in LogView while the filter is active.

Could you please take a look at these two cases?

Comment thread internal/app/app.go
Comment thread internal/view/log_view.go
Address review feedback on clawscli#202:

- Ctrl+V in command mode never inserted text because bubbles returns
  the clipboard read as an unexported message type. Add clipboard.Paste,
  which reads the clipboard and re-enters as a public tea.PasteMsg, and
  intercept ctrl+v in CommandInput before delegating to the textinput.
- Mouse-wheel scrolling stopped working in LogView while the filter was
  active; mouse messages now bypass the filter fallback to the viewport.
@nick4eva

Copy link
Copy Markdown
Contributor Author

Thanks for feedback.
I've added fixes.

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

LGTM, thanks!

@yimsk
yimsk merged commit 8761774 into clawscli:main Jul 24, 2026
3 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 11, 2026
This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github:clawscli/claws](https://github.com/clawscli/claws) | tools | minor | `0.17.0` → `0.18.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>clawscli/claws (github:clawscli/claws)</summary>

### [`v0.18.0`](https://github.com/clawscli/claws/releases/tag/v0.18.0)

[Compare Source](clawscli/claws@v0.17.0...v0.18.0)

#### Changelog

- [`1a134b0`](clawscli/claws@1a134b0) Add self package to flake.nix, nix fixes, fmt
- [`09b5b18`](clawscli/claws@09b5b18) Merge branch 'main' into dependabot/github\_actions/actions/setup-go-7
- [`c04cca1`](clawscli/claws@c04cca1) Merge branch 'main' into kai/nixupdates
- [`9e954ae`](clawscli/claws@9e954ae) Merge pull request [#&#8203;200](clawscli/claws#200) from clawscli/dependabot/github\_actions/actions/checkout-7
- [`8761774`](clawscli/claws@8761774) Merge pull request [#&#8203;202](clawscli/claws#202) from nick4eva/add-ability-to-paste-search-string-from-clipboard
- [`a035f89`](clawscli/claws@a035f89) Merge pull request [#&#8203;203](clawscli/claws#203) from KaiSforza/kai/nixupdates
- [`7a0a8ea`](clawscli/claws@7a0a8ea) Merge pull request [#&#8203;204](clawscli/claws#204) from clawscli/dependabot/github\_actions/actions/setup-go-7
- [`7edd29f`](clawscli/claws@7edd29f) ci: bump actions/checkout from 6 to 7
- [`a3dab3f`](clawscli/claws@a3dab3f) ci: bump actions/setup-go from 6 to 7
- [`c569b46`](clawscli/claws@c569b46) fix(ui): return clipboard paste to command input and keep log scroll
- [`5e97066`](clawscli/claws@5e97066) fix(ui): support clipboard paste in filter and command inputs

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODguMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
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.

Can't paste from clipboard into the search filter

2 participants