Skip to content

feat(desktop): expand the full command inline from the approval bar - #44864

Merged
teknium1 merged 2 commits into
NousResearch:mainfrom
xxxigm:feat/desktop-inline-approval-command
Jun 13, 2026
Merged

feat(desktop): expand the full command inline from the approval bar#44864
teknium1 merged 2 commits into
NousResearch:mainfrom
xxxigm:feat/desktop-inline-approval-command

Conversation

@xxxigm

@xxxigm xxxigm commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the Ink/TUI fix that wrapped long approval commands — the native desktop approval bar (apps/desktop/src/components/assistant-ui/tool-approval.tsx) was untouched and still hides the command.

The bar deliberately omits the command (comment: "the row already shows the command, so the strip deliberately doesn't repeat it"), but:

  • the pending tool row only renders one truncated line of view.title, and
  • a pending row can't be expanded (no result yet → no expandable content),

so the full command was only reachable by opening the "Always allow…" dropdown → reading the modal → cancelling → clicking Run. As a reporter put it, "4-5 clicks every time an approval shows."

This adds a "Command" toggle to the approval bar that reveals the full request.command inline (reusing the Always-allow dialog's <pre> styling), default-collapsed. Approving a long command becomes "expand, Run" (2 clicks). The toggle is gated on a non-empty command, so approvals without a command string are visually unchanged.

  • Commit 1: the inline expander + one i18n key (command) across en/zh/zh-hant/ja + types.
  • Commit 2: a test asserting the command is hidden until toggled, then shown in full.

Test plan

  • npx vitest run --environment jsdom src/components/assistant-ui/tool-approval.test.tsx (6 passed)
  • npm run typecheck (clean)
  • eslint on touched files (no new warnings; the one warning is pre-existing on the respond callback)
  • Manual: long terminal command shows truncated in the row; click Command → full text in a scrollable block; click Run.

Infographic

Desktop approval command expander

xxxigm added 2 commits June 12, 2026 18:31
The native desktop approval bar deliberately omits the command because the
pending tool row "already shows it" — but that row only renders a single
truncated line, and a pending row can't be expanded (it has no result yet). So
the full command was only reachable by opening the "Always allow" dropdown,
reading the modal, cancelling, then clicking Run — 4-5 clicks just to see what
you're approving.

Add a "Command" toggle to the approval bar that reveals the full
`request.command` inline (reusing the dialog's pre styling), default collapsed.
Approving a long command is now "expand, Run". Gated on a non-empty command so
zero-command approvals are unaffected.
Asserts the full command is absent until the Command toggle is clicked, then
rendered in full — guarding the long-command reveal path.
@xxxigm
xxxigm force-pushed the feat/desktop-inline-approval-command branch from 9e125af to ed99792 Compare June 12, 2026 11:33
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 12, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good UX improvement. Adds a Command toggle button in the tool approval bar to reveal the full command inline instead of truncated. Avoids modal dance for simple command inspection. Test coverage added. No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants