Skip to content

improve(ui): simplify command approval cards - #183350

Merged
vyctorbrzezowski merged 10 commits into
mainfrom
brzezowski/command-approval-card
Oct 25, 2026
Merged

vyctorbrzezowski merged 10 commits into
mainfrom
brzezowski/command-approval-card

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Command approvals scatter the command, execution context, and decisions across competing rows.

User Impact

Approval cards keep the command and its decisions together, with secondary details on demand and pending requests in a separate section. Agent avatars use the existing identity system, and remote requests show the computer name when available.

Why This Change Was Made

The visual hierarchy makes each decision easier to scan. The action order is Deny, Always allow, then Allow once on desktop and mobile. Controls reuse the existing small, ghost, icon, and keyboard-hint styles. Existing permission duration appears in the Always allow label; technical errors stay accessible in details. Keyboard bindings, approval authorization, execution, retries, and expiration behavior retain their existing owners.

Evidence

  • All 46 focused approval and shared-clock tests and both mock-Gateway approval-flow E2E tests passed for the shared-owner integration. The flow verifies that opening details does not approve, a decision stays pending until confirmed, and the resolved request leaves the queue.
  • Affected typechecks, focused lint, formatting, and whitespace checks passed. The final stylesheet integration also passed the production UI build and targeted stylesheet lint.
  • Independent review found no actionable P0–P2 findings. Six new boundary cases remain: five for node-name lookup isolation/failure and one for popover positioning/focus; overlapping scenarios were consolidated into existing tests.
  • The production asset report flags total CSS gzip at 306,710 bytes against a 306,086-byte ceiling. Other measured build budgets pass.
  • The preceding Chromium overlay run passed 74 checks. WebKit passed 73/74: the remaining outside-button focus assertion also fails with the original Popover and anchor implementations. These unchanged overlay tests were not rerun for the test-only cleanup.

The screenshots render the actual components with synthetic requests. Before is the original PR base 694db69. Representative states were recaptured after the final stylesheet integration at 43d930b49e5; the remaining captures show the unchanged approved layout. Each comparison uses matching data, theme, viewport, paused clock, and 1× scale.

Before and after

Desktop · light

Before After
Desktop · light before Desktop · light after

Desktop · dark

Before After
Desktop · dark before Desktop · dark after

Mobile · light

Before After
Mobile · light before Mobile · light after

Mobile · expanded

Before After
Mobile expanded before Mobile expanded after

Modal queue · desktop

Before After
Modal queue · desktop before Modal queue · desktop after

Decision states

State Current UI
Only one-time approval is available Only one-time approval is available
Decision in progress Decision in progress
Another decision is being recorded Another decision is being recorded
View-only access View-only access
Approval access unavailable after an attempted decision Approval access unavailable after an attempted decision
Offline Offline
Decision could not be confirmed Decision could not be confirmed
Technical error in details Technical error in details
Existing seven-day permission Existing seven-day permission
Less than one minute remaining Less than one minute remaining

Context and command content

State Current UI
Request details Request details
Request from another session Request from another session
Remote computer Remote computer
Long command and executable highlight Long command and executable highlight
Multiline command Multiline command
Optional metadata absent Optional metadata absent

Additional layouts

State Current UI
Inline pending-queue link Inline pending-queue link
Modal queue · dark Modal queue · dark
Modal queue · mobile Modal queue · mobile
Wrapped title · desktop Wrapped title · desktop
Wrapped title · mobile Wrapped title · mobile

Automation approval states

State Current UI
Create a sandbox watcher Create a sandbox watcher
Change a Gateway watcher Change a Gateway watcher

Risk and coverage

This is presentation work; it does not change the Gateway approval contract, stored permissions, or automation execution. Existing watcher warnings remain visible. The separate experimental watcher layout is not included.

Computer names use the existing node catalog with connection/access-scoped lookups; unavailable names fall back to the node identifier. Screenshot data and the preview harness are not part of the product diff.

Diff and validation scope

The test cleanup removes 110 net lines relative to revision 17e7ac1, retaining behavior coverage without assertions that freeze visual layout. The request-content extraction keeps one renderer for command details while preserving the mobile disclosure. Added coverage targets node-name isolation and independent popover positioning; existing approval and keyboard guards remain covered. Two lint warnings are in unchanged lines. The full repository suite is left to CI.

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reorganizes command approval cards around execution context, compact details, trailing decisions, and a pending-action indicator.

Example: Agent main requests pnpm test on gateway in /workspace with allowlist security.

  • Before: The command, host, directory, details disclosure, and decisions occupy separate rows.
  • After: The header identifies main, execution context accompanies the command, metadata opens in a popover, and the selected decision shows progress.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Source review supports the scoped implementation, but the required visual evidence remains unpublished.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes
User problem: Operators must scan separate command, context, metadata, and decision rows when reviewing a command.
Reason: The maintainer-authored direction supports a focused readability improvement while preserving existing approval capabilities.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored draft open: the scoped redesign preserves existing approval routing, and source review found no actionable introduced bug.

Priority: P3
Reviewed head: 74a4ee3147183bda6a9fb84c57b062ab1aa3a864

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Publish inspectable before/after captures of the redesigned inline, modal, and mobile cards, including expanded details and pending/error states.
Agent review details

How this fits together

The Control UI renders queued Gateway approval requests in inline and modal cards; operator decisions return through the existing approval owner and resolution RPC.

flowchart LR
  A[Gateway approval events] --> B[Approval queue owner]
  B --> C[Inline and modal cards]
  C --> D[Shared details popover]
  C --> E[Decision presentation]
  E --> B
  B --> F[Approval resolution RPC]
Loading

Technical review

Best possible solution:

Retain the compact presentation using the existing approval and popover owners, with complete request information and eligible decisions preserved.

Do we have a high-confidence way to reproduce the issue?

This is a presentation improvement rather than a reported runtime defect; the before/after structure is verifiable from the pinned sources, but no application run was performed.

Is this the best way to solve the issue?

The change reuses existing decision authority, mobile disclosure, and popover lifecycle; extracting request content avoids a competing implementation and keeps the redesign scoped.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5d973f1079e4.

Provenance checked

  • Command context and metadata disclosure changes intended behavior with a stated reason (feat(ui): surface approvals passively and redesign the approval card #124767: Keep Host and CWD visible while placing lower-value metadata behind a disclosure and surfacing approvals passively.)
  • Mobile disclosure and decision order keeps the original intent (58dcfc0: Provide compact mobile approvals with complete expandable request information, retained disclosure state, and eligible decisions.)
  • Pending decision ownership and retirement keeps the original intent (e10d507: Present admitted decisions through a shared Solid action without transferring authorization or write ownership to the renderer.)
  • Modal completion actions keeps the original intent (1adb204: Keep decision controls after request details and pending requests using the shared native modal action row.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +457, Tests +69. Total +526 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 717 260 +457
Tests 3 79 10 +69
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 796 270 +526

Review metrics

Metric Value Why it matters
Production versus test LOC Production +717/-260; tests +79/-10 Production growth primarily supplies the new layout styles and extracted request-content renderer; the added tests protect pending feedback and popover interaction.

Labels

Label changes:

  • add P3: This is approval-card presentation polish without an established broken authorization or execution workflow.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is approval-card presentation polish without an established broken authorization or execution workflow.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach the existing before/after visual evidence so the redesigned cards can be inspected.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 25, 2026, 2:50 AM ET / 06:50 UTC.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 25, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 25, 2026 15:53
@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 25, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 5bf26f6 into main Oct 25, 2026
81 of 85 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/command-approval-card branch October 25, 2026 19:16
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
Reorganize command approval cards around agent identity, command context, on-demand details, and trailing decisions. Preserve existing approval authorization and execution behavior.

Co-authored-by: Vyctor H. Brzezowski <[email protected]>
steipete added a commit that referenced this pull request Oct 27, 2026
main.runtime.ts injects kbd.css document-wide right after mounting the app.
The approval card (#183350) and keyboard shortcuts dialog also imported it as
a bundler stylesheet, so the build emitted a separate lazy kbd.css chunk that
only re-applied rules already on the page. Drop both imports and note the
single owner in the UI guide.

Total CSS gzip falls 308,098 -> 307,743 B (-355 B) with one fewer stylesheet;
startup and route boot CSS are unchanged. Computed-style parity against
current main covers the approval cards, the shortcuts dialog, sidebar keycap
badges and menu shortcut badges, including after the kbd chunk has loaded.
steipete added a commit that referenced this pull request Oct 27, 2026
main.runtime.ts injects kbd.css document-wide right after mounting the app.
The approval card (#183350) and keyboard shortcuts dialog also imported it as
a bundler stylesheet, so the build emitted a separate lazy kbd.css chunk that
only re-applied rules already on the page. Drop both imports and note the
single owner in the UI guide.

Total CSS gzip falls 308,098 -> 307,743 B (-355 B) with one fewer stylesheet;
startup and route boot CSS are unchanged. Computed-style parity against
current main covers the approval cards, the shortcuts dialog, sidebar keycap
badges and menu shortcut badges, including after the kbd chunk has loaded.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…w#183867)

main.runtime.ts injects kbd.css document-wide right after mounting the app.
The approval card (openclaw#183350) and keyboard shortcuts dialog also imported it as
a bundler stylesheet, so the build emitted a separate lazy kbd.css chunk that
only re-applied rules already on the page. Drop both imports and note the
single owner in the UI guide.

Total CSS gzip falls 308,098 -> 307,743 B (-355 B) with one fewer stylesheet;
startup and route boot CSS are unchanged. Computed-style parity against
current main covers the approval cards, the shortcuts dialog, sidebar keycap
badges and menu shortcut badges, including after the kbd chunk has loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant