Skip to content

feat(app): add composer add menu with draft-preserving commands#35711

Merged
Brendonovich merged 2 commits into
devfrom
composer-add-menu
Jul 9, 2026
Merged

feat(app): add composer add menu with draft-preserving commands#35711
Brendonovich merged 2 commits into
devfrom
composer-add-menu

Conversation

@usrnk1

@usrnk1 usrnk1 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

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

What does this PR do?

Adds an "add" menu to the desktop composer's plus button, matching the Q3 2026 design. The button now opens a menu with four entries that reuse existing flows rather than introducing new command logic:

  • Images and files — runs the existing attachment picker (mod+u).
  • Commands — opens the slash-command flow.
  • Context — opens the @ context flow.
  • Shell command — switches the composer into shell mode (!).

The Commands entry preserves the composer draft. With an empty composer it behaves exactly like typing /: it inserts / and filters inline. With existing content (text, attachments, or context) it opens a dedicated command search field so the draft is not destroyed — built-in commands run against the preserved draft, and custom commands prefix the draft as their arguments (e.g. hello becomes /translate hello).

The English UI strings were added and translated across all 17 supported non-English locales, following the per-locale glossaries.

How did you verify your code works?

  • bun typecheck (workspace-wide via the push hook) — green.
  • bun test prompt-input unit + browser suites (57 tests) — green.
  • bun run build — succeeds.
  • Manually exercised the menu: empty vs. populated composer command flows, context, shell, keyboard navigation, and Escape restoring focus.

Screenshots / recordings

Screenshot.2026-07-07.at.13.29.03.mp4

Checklist

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

usrnk1 added 2 commits July 7, 2026 13:31
Convert the composer plus button into a menu offering Images and files,
Commands, Context, and Shell command. Each entry reuses the existing
attachment, slash, at, and shell flows.

When Commands is opened with an empty composer it inserts / and filters
inline as before. With an existing draft it opens a dedicated command
search field so the draft is preserved: built-in commands run against it
and custom commands prefix it as arguments.
@usrnk1 usrnk1 marked this pull request as ready for review July 8, 2026 18:30
@usrnk1 usrnk1 requested review from Brendonovich and Hona as code owners July 8, 2026 18:30
@Brendonovich Brendonovich merged commit 3cd9ee5 into dev Jul 9, 2026
13 checks passed
@Brendonovich Brendonovich deleted the composer-add-menu branch July 9, 2026 05:39
anduimagui pushed a commit to anduimagui/opencode that referenced this pull request Jul 9, 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.

2 participants