Skip to content

feat: enable paste support in all interactive wizard UIs#172

Merged
raphi011 merged 6 commits into
mainfrom
wt-cd-paste
Apr 8, 2026
Merged

feat: enable paste support in all interactive wizard UIs#172
raphi011 merged 6 commits into
mainfrom
wt-cd-paste

Conversation

@raphi011

@raphi011 raphi011 commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Pasting text into interactive wizard UIs (e.g., wt cd -i) was silently dropped because the Step.Update() interface only accepted tea.KeyPressMsg, while BubbleTea v2 sends pasted text as tea.PasteMsg.

Widens the Step.Update() interface from tea.KeyPressMsg to tea.Msg and forwards tea.PasteMsg through the wizard framework and all direct flows to the underlying textinput.Model components which already handle paste natively.

Breaking Changes

  • None

Test Coverage

  • Unit tests added: 10 (FilterableListStep paste: 5, TextInputStep paste: 2, Wizard paste: 2, cdListModel paste: 1)
  • Integration tests added: 0

🤖 Generated with Claude Code

raphi011 and others added 5 commits April 8, 2026 15:08
Allow paste and other message types to reach step implementations.
Updates mockStep in wizard_test.go to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Type-asserts to tea.KeyPressMsg internally; non-key messages return
StepContinue. Updates updateStep test helper signature to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Forward tea.PasteMsg to underlying textinput.Model so bracketed paste
inserts text directly. Adds tests for paste insert and append.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Handle tea.PasteMsg by filtering pasted content through RuneFilter,
auto-focusing the filter input if list was focused, and forwarding to
textinput. Adds tests for paste with filter focused/unfocused,
RuneFilter stripping, and empty-paste edge cases.

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

codecov Bot commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.57009% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/ui/wizard/flows/cd.go 16.66% 20 Missing ⚠️
internal/ui/wizard/steps/text_input.go 92.30% 2 Missing and 1 partial ⚠️
internal/ui/wizard/steps/filterable_list.go 96.87% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raphi011
raphi011 merged commit a52a392 into main Apr 8, 2026
1 of 2 checks passed
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.

1 participant