Repository: dlvhdr/gh-dash (2026-03-25T03:47:35Z)

Issue:
[BUG] No longer can paste in inputbox
**Describe the bug**
The comment `inputbox` of `prview` and `issueview` no longer receive pasted text.

**To Reproduce**
Steps to reproduce the behavior:

1. Build from main (or the Bubble Tea v2 commit also has the bug)
2. Open gh-dash in a project with issues/prs
3. Press `c` to open the comment input box
4. Copy `this should paste into gh-dash` (or any other text) and paste into the inputbox with `ctrl+shift+c`
5. Observe the text does not paste

**Expected behavior**
`this should paste into gh-dash` should show in the input box after pasting

**Screenshots**
<video src="https://github.com/user-attachments/assets/0d116064-71ba-4d85-8bd0-fd6f7c0eae8b">Unable to load video</video>

**Desktop (please complete the following information):**

- OS: Linux and Mac
- Terminal Emulator: Ghostty
- Using tmux? No



Discussion:
I looked into this a bit and so far it seems the likely cause is just that bubbletea v2 is handling paste differently – in a way that’s not backward-compatible. Anyway, I’ll make time to look more.
OK, I’ve got a fix for this. The `Update()` method needs to have a bubbletea `PasteMsg` case. I just need to write some tests to go along with that fix. But in the meantime, you can try it:

```diff
diff --git a/internal/tui/components/prview/prview.go b/internal/tui/components/prview/prview.go
index 7117e0f..b64948f 100644
--- a/internal/tui/components/prview/prview.go
+++ b/internal/tui/components/prview/prview.go
@@ -80,6 +80,12 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
 	)
 
 	switch msg := msg.(type) {
+	case tea.PasteMsg:
+		if m.IsTextInputBoxFocused() {
+			m.inputBox, taCmd = m.inputBox.Update(msg)
+			cmds = append(cmds, taCmd)
+		}
+
 	case tea.KeyMsg:
 		if m.isCommenting {
 			switch msg.String() {
```



Patch:
diff --git a/internal/tui/components/detailedit/controller.go b/internal/tui/components/detailedit/controller.go
index d86fec51..a47b7a41 100644
--- a/internal/tui/components/detailedit/controller.go
+++ b/internal/tui/components/detailedit/controller.go
@@ -201,6 +201,14 @@ func (c Controller) Update(msg tea.Msg) (Controller, tea.Cmd, *Submit, bool) {
 	)
 
 	switch msg := msg.(type) {
+	case tea.PasteMsg:
+		if c.Active() {
+			c.inputBox, taCmd = c.inputBox.Update(msg)
+			cmds = append(cmds, taCmd)
+			return c, tea.Batch(cmds...), nil, true
+		}
+		return c, nil, nil, false
+
 	case RepoLabelsFetchedMsg:
 		c.repoLabels = msg.Labels
 		c.ac.SetSuggestions(labelSuggestions(msg.Labels))


Test patch:
diff --git a/internal/tui/components/detailedit/controller_test.go b/internal/tui/components/detailedit/controller_test.go
index cafc2b70..a826d26d 100644
--- a/internal/tui/components/detailedit/controller_test.go
+++ b/internal/tui/components/detailedit/controller_test.go
@@ -338,3 +338,56 @@ func TestUnassignModeDoesNotUseAutocomplete(t *testing.T) {
 
 	require.False(t, c.usesAutocomplete())
 }
+
+func TestPasteInCommentMode(t *testing.T) {
+	data.ClearUserCache()
+	c := newTestController(t)
+	c, _ = c.Enter(EnterOptions{
+		Mode:                             ModeComment,
+		Prompt:                           "comment",
+		Source:                           dataautocomplete.UserMentionSource{},
+		Repo:                             testRepo(),
+		SuggestionKind:                   SuggestionUsers,
+		EnterFetch:                       FetchNone,
+		ConfirmDiscardOnCancel:           true,
+		HideAutocompleteWhenContextEmpty: true,
+	})
+
+	msg := tea.PasteMsg{Content: "pasted text"}
+	c, _, _, handled := c.Update(msg)
+
+	require.True(t, handled)
+	require.Contains(t, c.inputBox.Value(), "pasted text",
+		"pasted text should appear in the inputbox")
+}
+
+func TestPasteInAssignMode(t *testing.T) {
+	data.ClearUserCache()
+	c := newTestController(t)
+	c, _ = c.Enter(EnterOptions{
+		Mode:                             ModeAssign,
+		Prompt:                           "assign",
+		Source:                           dataautocomplete.WhitespaceSource{},
+		Repo:                             testRepo(),
+		SuggestionKind:                   SuggestionUsers,
+		EnterFetch:                       FetchNone,
+		HideAutocompleteWhenContextEmpty: false,
+	})
+
+	msg := tea.PasteMsg{Content: "alice bob"}
+	c, _, _, handled := c.Update(msg)
+
+	require.True(t, handled)
+	require.Contains(t, c.inputBox.Value(), "alice bob",
+		"pasted text should appear in the inputbox during assignment")
+}
+
+func TestPasteIgnoredWhenInactive(t *testing.T) {
+	c := newTestController(t)
+
+	msg := tea.PasteMsg{Content: "should not appear"}
+	_, _, _, handled := c.Update(msg)
+
+	require.False(t, handled,
+		"paste should not be handled when controller is inactive")
+}