Skip to content

feat(tui): mention popup quick-open shortcuts for files and directories#16811

Open
Oerum wants to merge 2 commits intoanomalyco:devfrom
Oerum:feat/mention-quick-open-fix
Open

feat(tui): mention popup quick-open shortcuts for files and directories#16811
Oerum wants to merge 2 commits intoanomalyco:devfrom
Oerum:feat/mention-quick-open-fix

Conversation

@Oerum
Copy link

@Oerum Oerum commented Mar 9, 2026

Issue for this PR

Closes #16809

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds the ability to quickly open a highlighted file or directory from the @ mention autocomplete popup into the system's default editor/file manager.

  • Maps Ctrl+X to open the highlighted file in VISUAL/EDITOR
  • Maps Alt+O to open the highlighted directory in the OS file manager
  • Scopes these keybinds exclusively to the mention popup to prevent collisions
  • Adds inline keybind hints to the mention popup footer
  • Provides fallback to OS default opener if no external editor is configured

How did you verify your code works?

  • Manually verified UI rendering and bounding box constraints (ensuring the mention popup stays positioned correctly above the prompt input and gracefully hides the footer tip when there's limited vertical space).
  • Manually verified keybind behaviors trigger the correct OS operations via the open package fallback and VISUAL/EDITOR logic.
  • Added a new unit test for Editor.file and Editor.dir in packages/opencode/test/cli/tui/editor.test.ts which tests the cross-platform command launch and OS-default fallbacks.
  • Verified that bun typecheck and bun test pass successfully locally.

Screenshots / recordings

(No screenshots provided in this PR body, but manual TUI testing confirms layout stability without overlap)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Oerum added 2 commits March 10, 2026 00:10
…editor

Adds the ability to quickly open a highlighted file or directory from the  mention autocomplete popup into the system's default editor/file manager.

- Maps `Ctrl+X` to open the highlighted file in `VISUAL`/`EDITOR`
- Maps `Alt+O` to open the highlighted directory in the OS file manager
- Scopes these keybinds exclusively to the mention popup to prevent collisions
- Adds inline keybind hints to the mention popup footer
- Provides fallback to OS default opener if no external editor is configured
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]: Mention popup quick-open shortcuts for files and directories

1 participant