Skip to content

fix(desktop): remove command text from approval rule buttons, fixing layout breakage#3700

Merged
esengine merged 1 commit into
esengine:main-v2from
CVEngineer66:fix/approval-ui-layout
Jun 9, 2026
Merged

fix(desktop): remove command text from approval rule buttons, fixing layout breakage#3700
esengine merged 1 commit into
esengine:main-v2from
CVEngineer66:fix/approval-ui-layout

Conversation

@CVEngineer66

@CVEngineer66 CVEngineer66 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Bug

The "Allow for session" and "Always allow" buttons in the approval modal display the full bash command as inline code (e.g. Bash(cd "xxx" && npm run build --target production --env staging...)). When the command is long, the button content overflows and breaks the card layout. The same root cause also triggers issue #3646 where option text pushes the card to fill the entire screen.

Fix

The command is already visible in the card header meta area (bash · cd "xxx" && npm run...) and the expandable Details section. Showing it again inside the action buttons is redundant.

Removed:

  • RuleActionLabel component (the <span><code> wrapper around the rule text)
  • approvalSessionRule, approvalPersistentRule, truncateSubject helper functions
  • isFileMutationTool function (no longer referenced)
  • Unused CSS classes: .approval-rule-label, .approval-rule-label code, .prompt-action:has(.approval-rule-label)

Files

File Δ Change
ApprovalModal.tsx -43 Remove RuleActionLabel, rule helpers, and <code> from action button labels
styles.css -17 Remove .approval-rule-label and related selectors

Fixes #3677, fixes #3646

… layout breakage

The 'Allow for session' and 'Always allow' buttons in the approval modal
displayed the full bash command as inline code (e.g. Bash(cd ...)), which
stretched the button elements and broke the card layout.

The command is already visible in the card header meta area and the
expandable Details section, so showing it again inside the action buttons
is redundant. Removed the RuleActionLabel component, the rule-formatting
helpers (approvalSessionRule, approvalPersistentRule, truncateSubject),
and the unused CSS classes.

Fixes esengine#3677
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 9, 2026
@esengine esengine merged commit dae5757 into esengine:main-v2 Jun 9, 2026
15 of 16 checks passed

@SivanCola SivanCola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved. The PR is a focused and useful desktop UI fix: it removes the repeated command/rule text from approval action buttons, which addresses the long-command layout breakage while keeping the actual approval behavior unchanged.

I helped with the compile/lint follow-up by identifying that the failing lint job is the known staticcheck nil-check issue already fixed on current main-v2, and I reran CI to verify the rest of the PR jobs. I could not update the contributor fork directly because GitHub denied writes to the head repository, so the remaining stale lint failure should clear after the branch is synced with current main-v2.

The main contribution here is the author's UI fix; my part was only helping investigate and follow up on the compile/lint status.

SuMuxi66 pushed a commit to SuMuxi66/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
… layout breakage (esengine#3700)

The 'Allow for session' and 'Always allow' buttons in the approval modal
displayed the full bash command as inline code (e.g. Bash(cd ...)), which
stretched the button elements and broke the card layout.

The command is already visible in the card header meta area and the
expandable Details section, so showing it again inside the action buttons
is redundant. Removed the RuleActionLabel component, the rule-formatting
helpers (approvalSessionRule, approvalPersistentRule, truncateSubject),
and the unused CSS classes.

Fixes esengine#3677

Co-authored-by: wufengfan <wufengfan@wufengfandeMacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 桌面端的工具调用UI排版错乱 [Bug]: 桌面版1.4.0当选项内字数过多时,选项框会占满整个屏幕

3 participants