Skip to content

Conversation

@LeonMueller-OneAndOnly
Copy link

@LeonMueller-OneAndOnly LeonMueller-OneAndOnly commented Jan 12, 2026

What does this PR do?

Fixes ux issue, where prompt gets auto submitted when switching sessions / conversations via the keyboard

How did you verify your code works?

Tested it manually after straight forward fix.

Fixes

#8019

A screen recording of the issue is attached to make it easy to understand what was undesired and is now fixed.

undesired-behaviour.mp4

To ensure no other functionalities are negatively impacted, I have checked where the component is used in the codebase. For all functions I am familiar with the return-key binding still works as someone expects. For transparency, here is the full reference list:

✅ := controlled, everything works fine
[?] not familiar enough with opencode to know where to find it, since all other occurrences were fine i assume those are too.

✅ packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx
3, 10: import { DialogSelect } from "@tui/ui/dialog-select"
21, 6: <DialogSelect

✅ packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx
2, 10: import { DialogSelect, type DialogSelectOption, type DialogSelectRef } from "@tui/ui/dialog-select"
118, 6: <DialogSelect

✅packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx
5, 10: import { DialogSelect, type DialogSelectRef, type DialogSelectOption } from "@tui/ui/dialog-select"
76, 6: <DialogSelect

✅ packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx
5, 10: import { DialogSelect, type DialogSelectRef } from "@tui/ui/dialog-select"
207, 6: <DialogSelect

✅packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx
4, 10: import { DialogSelect } from "@tui/ui/dialog-select"
54, 20: <DialogSelect
97, 11: return

✅ packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx
2, 10: import { DialogSelect } from "@tui/ui/dialog-select"
74, 6: <DialogSelect

[?] packages/opencode/src/cli/cmd/tui/component/dialog-stash.tsx
2, 10: import { DialogSelect } from "@tui/ui/dialog-select"
55, 6: <DialogSelect

[?] packages/opencode/src/cli/cmd/tui/component/dialog-tag.tsx
2, 10: import { DialogSelect } from "@tui/ui/dialog-select"
35, 6: <DialogSelect

✅ packages/opencode/src/cli/cmd/tui/component/dialog-theme-list.tsx
1, 10: import { DialogSelect, type DialogSelectRef } from "../ui/dialog-select"
24, 6: <DialogSelect

[?] packages/opencode/src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx
3, 10: import { DialogSelect, type DialogSelectOption } from "@tui/ui/dialog-select"
63, 11: return <DialogSelect onMove={(option) => props.onMove(option.value)} title="Fork from message" options={options()} />

[?] packages/opencode/src/cli/cmd/tui/routes/session/dialog-message.tsx
3, 10: import { DialogSelect } from "@tui/ui/dialog-select"
20, 6: <DialogSelect

[?] packages/opencode/src/cli/cmd/tui/routes/session/dialog-subagent.tsx
1, 10: import { DialogSelect } from "@tui/ui/dialog-select"
8, 6: <DialogSelect

[?] packages/opencode/src/cli/cmd/tui/routes/session/dialog-timeline.tsx
3, 10: import { DialogSelect, type DialogSelectOption } from "@tui/ui/dialog-select"
46, 11: return <DialogSelect onMove={(option) => props.onMove(option.value)} title="Timeline" options={options()} />

@github-actions
Copy link
Contributor

Hey! Your PR title [TUI] UX-fix: dont submit prompt when switching session anymore doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

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

No duplicate PRs found

@LeonMueller-OneAndOnly LeonMueller-OneAndOnly changed the title [TUI] UX-fix: dont submit prompt when switching session anymore feat(TUI): dont submit prompt when switching sessions Jan 12, 2026
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@LeonMueller-OneAndOnly LeonMueller-OneAndOnly changed the title feat(TUI): dont submit prompt when switching sessions fix(TUI): dont submit prompt when switching sessions Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant