Repository navigation
feat(ui): approval UX overhaul β inline cards, fair queue, shortcuts, badges - #110989
Conversation
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7451f4975a
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| queue.find( | ||
| (entry) => | ||
| normalizeSessionKeyForUiComparison(entry.request.sessionKey) === normalizedSessionKey, |
There was a problem hiding this comment.
Match approval session aliases before choosing presentation
Use the UI's session-equivalence rules here rather than raw normalized equality. Route and persisted state can still identify the default conversation as main, while gateway approval events carry agent:main:main; areUiSessionKeysEquivalent() explicitly treats those as the same session. In that common alias case this check fails, so the approval remains modal instead of rendering inline, and the identical exact-match logic in sessionHasPendingApproval() also omits its session badge.
Useful? React with πΒ / π.
|
Codex review: needs real behavior proof before merge. Reviewed July 19, 2026, 4:14 AM ET / 08:14 UTC. Summary PR surface: Source +558, Tests +571. Total +1129 across 27 files. Reproducibility: yes. from source with high confidence: make an approval match the active session while the dashboard hides its chat dock or the responsive layout hides the chat surface; the branch suppresses that approval from the modal despite the inline card being unreachable. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Use one visibility-aware presentation decision so an approval is suppressed from the modal only while its inline card is actually reachable, then provide redacted live Control UI proof covering request arrival, a decision, and resolution. Do we have a high-confidence way to reproduce the issue? Yes, from source with high confidence: make an approval match the active session while the dashboard hides its chat dock or the responsive layout hides the chat surface; the branch suppresses that approval from the modal despite the inline card being unreachable. Is this the best way to solve the issue? No: the current active-session-only selection is not the safest solution because it conflates session matching with visible presentation. A single visibility-aware decision shared by inline rendering and modal filtering is narrower and preserves a reachable fallback. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 59124313f44a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +558, Tests +571. Total +1129 across 27 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (6 earlier review cycles)
|
e9c8ec0 to
f13bec9
Compare
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f13bec96c5
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .chat-inline-approval { | ||
| box-sizing: border-box; | ||
| flex: 0 0 auto; | ||
| width: calc(100% - 36px - 2 * clamp(6px, 1vw, 12px)); | ||
| max-width: var(--chat-thread-max-width); | ||
| margin: 8px auto; | ||
| } |
There was a problem hiding this comment.
Keep inline approval actions within the pane
On short panes or mobile viewports, where ui/src/styles/components.css stacks all approval buttons vertically, a long command plus the metadata rows can make this non-shrinking wrapper taller than the available chat area. Neither this wrapper nor the inline card has a height limit or overflow scrolling, while .chat-main clips overflow, so the decision buttons can be pushed below the visible pane and become unreachable. Constrain the inline surface to the available height and give it an internal scroll region.
Useful? React with πΒ / π.
f13bec9 to
3e68cbf
Compare
fb62998 to
d510033
Compare
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d51003339e
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| queue.find( | ||
| (entry) => | ||
| normalizeSessionKeyForUiComparison(entry.request.sessionKey) === normalizedSessionKey, |
There was a problem hiding this comment.
Pin the inline approval until it leaves the queue
When an older-created request for the active session arrives after an inline card is already displayed, enqueueExecApprovalPrompt() re-sorts the queue and this lookup immediately replaces the visible card with the late arrival. Since the action buttons remain in the same position, a user clicking the card they were reading can authorize the newly substituted command instead; the modal avoids this exact hazard by pinning selectedApprovalId, but the inline surface has no equivalent state.
Useful? React with πΒ / π.
| onSelect: (approvalId) => { | ||
| this.selectedApprovalId = approvalId; | ||
| }, |
There was a problem hiding this comment.
Reset scroll positions when selecting another approval
When a user scrolls a long command or the modal stack and then selects another queued request, this handler only changes the selected ID. Lit reuses the existing .exec-approval-command and .exec-approval-modal-stack elements, so their scrollTop values survive and the newly selected command can open midway through its text or with the card header off-screen, allowing a decision without the user seeing the start of the command. Reset both scroll containers or replace/key the card when selection changes.
Useful? React with πΒ / π.
d510033 to
fb1bebf
Compare
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb1bebf784
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (event.key === "Enter") { | ||
| return event.shiftKey ? "allow-always" : "allow-once"; |
There was a problem hiding this comment.
Delay modal shortcuts after focus is stolen
When an approval for another session opens while a user is composing, the modal steals focus and immediately treats Ctrl/Cmd+Enter as allow-once. That chord is also the chat send shortcut (ui/src/pages/chat/components/chat-composer.ts:2402), so a user already pressing it can authorize a newly appeared command before seeing it. Add a short arming delay after the active approval/modal changes or use a chord that does not overlap composer actions.
Useful? React with πΒ / π.
| ${props.inlineApproval && props.onApprovalDecision | ||
| ? html`<div class="chat-inline-approval"> | ||
| ${renderExecApprovalCard({ | ||
| approval: props.inlineApproval, | ||
| busy: props.approvalBusy === true, | ||
| error: props.approvalErrors?.get(props.inlineApproval.id) ?? null, | ||
| nowMs: props.approvalNowMs ?? Date.now(), | ||
| variant: "inline", | ||
| onDecision: props.onApprovalDecision, | ||
| })} |
There was a problem hiding this comment.
Wire shortcuts to the inline approval surface
For an approval matching the active chat, this branch renders only renderExecApprovalCard(), while the keyboard handler is attached exclusively to the suppressed modal in ui/src/components/exec-approval.ts:370-374. Consequently Ctrl/Cmd+Enter, Ctrl/Cmd+Shift+Enter, and Ctrl/Cmd+D do nothing for the approval users most commonly see unless they first reopen the global modal from the sidebar, defeating the advertised keyboard path.
Useful? React with πΒ / π.
2dc6209 to
fddd2ec
Compare
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fddd2ec285
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const inlineApproval = | ||
| activeRoute === "chat" | ||
| ? findInlineApproval(overlaySnapshot.approvalQueue, this.activeSessionKey) |
There was a problem hiding this comment.
Keep approvals modal when the chat surface is hidden
When the active session is showing a dashboard with its chat dock hidden (ui/src/styles/chat/board.css:106) or a mobile detail sidebar (ui/src/styles/chat/sidebar.css:1563), this still classifies its approval as inline. The shell consequently passes that ID as inlineApprovalId, so modalApprovalQueue() filters it out, while the only card is rendered inside the hidden chat DOM. The time-limited request is therefore invisible until the user manually reopens chat; only suppress the modal when the inline surface is actually visible.
Useful? React with πΒ / π.
0118969 to
33a643f
Compare
β¦oped errors on enqueue
β¦learing to the settled request
β¦ card, badge fallback, quiet countdown
5d70fbb to
b222007
Compare
|
Merged via squash.
|
β¦ badges (openclaw#110989) * feat(ui): overhaul approval experience * fix(ui): guard approval shortcuts against key auto-repeat and keep scoped errors on enqueue * fix(ui): arm approval shortcuts after focus settles and scope error clearing to the settled request * fix(ui): approval hardening β modifier-chord shortcuts, pinned active card, badge fallback, quiet countdown * fix(ui): scope approval errors per request * style(ui): format approval queue test * fix(ui): tolerate missing approval overlays * perf(ui): lazy-load approval modal controls * fix(ui): satisfy approval lazy-load guards * style(ui): satisfy approval card lint
β¦ badges (openclaw#110989) * feat(ui): overhaul approval experience * fix(ui): guard approval shortcuts against key auto-repeat and keep scoped errors on enqueue * fix(ui): arm approval shortcuts after focus settles and scope error clearing to the settled request * fix(ui): approval hardening β modifier-chord shortcuts, pinned active card, badge fallback, quiet countdown * fix(ui): scope approval errors per request * style(ui): format approval queue test * fix(ui): tolerate missing approval overlays * perf(ui): lazy-load approval modal controls * fix(ui): satisfy approval lazy-load guards * style(ui): satisfy approval card lint




What Problem This Solves
Pending exec/plugin approvals are easy to miss and slow to act on: the global modal shows only the newest request (starving older ones toward their 30-minute expiry), there is no in-conversation approval surface, no per-agent/per-session indicators, no expiry visibility, and no keyboard path.
Why This Change Was Made
Fleet operators supervising multiple agents need approvals to be scannable and fast to decide without losing safety. Queue becomes oldest-first with a selectable list; the active chat session renders its approval inline between transcript and composer (suppressed from the modal); Ctrl/Cmd chord shortcuts (Ctrl/Cmd+Enter allow once, +Shift always, +D deny) with auto-repeat guards; live mm:ss expiry countdown; per-agent count pills and per-session warning badges in the sidebar. Errors are scoped per approval id so one request's failure never hides another's. The displayed card is pinned so late-arriving requests cannot swap the command under the user's cursor.
User Impact
Approvals surface where the user is working, oldest requests stop starving, fleet state is visible per agent/session, and keyboard users get a safe fast path. No gateway or protocol changes; UI-only.
Evidence