Repository navigation
improve(ui): simplify command approval cards - #183350
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Preference · Worth it: Yes 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +457, Tests +69. Total +526 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 25, 2026, 2:50 AM ET / 06:50 UTC. |
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]>
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.
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.
…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.
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
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 at43d930b49e5; 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
Desktop · dark
Mobile · light
Mobile · expanded
Modal queue · desktop
Decision states
Context and command content
Additional layouts
Automation approval states
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.