Repository navigation
improve(ui): show exec policy by host and agent, edited in place - #191382
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 changes before merge. What this changesThis PR groups execution policies by host and agent, with expandable editors, inline allowlists, save feedback, and local retry controls. Example: Inspect the Ops agent’s Gateway policy at a 390px viewport.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-authored PR open: the UI improvement is useful, but its CSS growth fails the asset budget and the editing guide still describes the removed picker. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Devices page projects Gateway policy snapshots and configuration into editable controls; existing owners send hash-checked approval writes and autosave node bindings. flowchart TD
A[Devices page] --> B[Host selector]
B --> C[Approval read owner]
C --> D[Agent policy rows]
D --> E[Approval save owner]
E --> F[Gateway policy RPC]
A --> G[Config binding owner]
Technical reviewBest possible solution: Keep the existing policy owners and disclosure design, reduce CSS within the existing budget, and update the editing instructions. Do we have a high-confidence way to reproduce the issue? The screenshots establish the presentation problem and improvement; GitHub annotations directly establish the CSS budget failure without running target code. Is this the best way to solve the issue? Reusing the existing disclosure and policy owners is a coherent solution; the smaller complete change retains these controls while meeting the asset budget and keeping documentation accurate. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 99e521412641. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +224, Tests +147. Total +371 across 21 files. Added test files: 0. View PR surface stats
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 November 2, 2026, 1:41 PM ET / 18:41 UTC. |
55a2822 to
0b1de53
Compare
…nclaw#191382) Edit execution policy by host and agent while preserving approval ownership, target-switch confirmation, and save/retry feedback. Keep bindings on autosave without a redundant Save action. Validation: 26 focused tests, 4 execution-approval E2Es, and UI typecheck passed. The obsolete mock baseline is already removed in integrated main. Prior CSS-only budget failures are authorized; full CI may remain pending under the batch policy.
What Problem This Solves
Exec approvals asks you to pick a target, then maybe a node, then a scope, before it shows anything, and only ever shows one scope. To learn what an agent may run you had to select each agent in turn. The allowlist sat in a separate section under a Save it didn't sit beside, every pattern was printed twice, and Remove was red on every row. A failed load appeared at the top of the page, next to nothing. After a target switch the section read "Load exec approvals to edit allowlists." as if that were a setting. On a phone, Save dropped to its own line above the group.
Exec node binding repeated what each select already said: "agent · uses default (any)" beside "Use default". With no eligible node it showed a disabled select per agent, and a failed read replaced the section with a raw
Error: ….User Impact
Read-only users no longer see an empty Exec approvals section that repeated the page's browsing-only notice. Host-native policies stay read-only, without the duplicate "Native" and rule count.
Why This Change Was Made
The data is a small table of scope by setting with inheritance, stored per host, so a list of scopes that states their difference replaces the picker that hid it. Exec approvals keeps an explicit Save because it writes a separate file against a hash and an edit spans several fields. Its confirmation stays in its own row because the shared save status reports config autosaves, and this file doesn't go through them.
The row is the disclosure from the Devices rows, reused. The agent picker and its avatars are gone from this section, since every agent is now on screen.
Landing order: #191329, then #191356, then this. It is stacked on #191329, so the base is that branch. #191356 removes the same binding Save, and this change matches its action owner, so any conflict there is mechanical. #191354 makes the binding outcome visible on phones and doesn't overlap this Save.
Evidence
Mock Gateway responses, Absolutely light, a draft open on the Ops agent with Security set to Deny.
Closed rows, then a failed load:
42 patterns at 390, with a long path wrapping and Save in reach:
CRT keeps square corners and its own primary:
Also checked at 1440 and 390: no nodes, rejected save, Saved and host-native policy. At 1440: a failed config read. No horizontal overflow. Pattern fields grow through
field-sizing: content, and Playwright WebKit renders them and the sticky Save the same at 390; a browser without it scrolls the line instead. The new browser tests cover the discard prompt with auto-load, saving an allowlist edit with the row staying open, and retrying a failed load.Checks run locally: oxfmt, stylelint, oxlint,
pnpm tsgo:ui,pnpm ui:i18n:verify, unit tests inui/src/pages/devices, and the exec approvals, device binding, Settings reload, device alias and platform browser tests.