Skip to content

fix(codex): validate MCP approval form fields

MacroscopeApp / Macroscope - UI Consistency failed Aug 24, 2026 in 2m 29s

UI Consistency: 1 issue found

  • apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx: the new provider-supplied appName badge is rendered shrink-0 with no max width or truncation, so a long app/connector/server name can squeeze the flex-1 min-w-0 approval detail toward zero width (most visible in the collapsed mobile panel). Suggested letting it shrink and truncate.

No other findings: ComposerPendingApprovalActions still composes the shared Button primitive with size="micro" / variant="ghost-muted", keeps the destructive and foreground tone mapping per decision, preserves disabled while responding, and the panel keeps its existing aria-label / role="group" semantics plus the focusable scrolling <code> detail.

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.

Scope reviewed (include patterns apps/web/src/**/*.{ts,tsx,css}):

  • apps/web/src/components/chat/ComposerPendingApprovalActions.tsx (option-driven rendering, default option list, per-decision class mapping)
  • apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx (new mcp-elicitation labels, appName badge)
  • apps/web/src/components/chat/ChatComposer.tsx (both desktop and collapsed-mobile call sites now forwarding options)
  • apps/web/src/session-logic.ts (widened PendingApproval.requestKind, appName / options extraction)
  • related tests

Context checks performed outside the diff:

  • apps/web/src/components/ChatView.tsx onRespondToApproval passes the decision through generically, so the new acceptAlways decision reaches the RPC without extra UI plumbing.
  • Grepped for other web consumers of approval decisions and requestKind (MessagesTimeline.logic.ts, session-logic.ts work-log extraction). No other surface renders approval buttons or decision labels, so no second call site needs the new option list; work-log grouping treats mcp-elicitation as other, which is benign.
  • No CSS/Tailwind ownership changes, no global stylesheet edits, no scroll/mask or theme-variant changes in this PR, so emitted-CSS and virtualized-scroll gates do not apply.
  • Behavior change (option-driven rendering and defaulting) is covered by the added focused tests in ComposerPendingApprovalActions.test.tsx and ComposerPendingApprovalPanel.test.tsx.

🔍 Agent activity — 13 tool calls

💭 I'm checking the changed web files—ChatComposer, the pending approval action components and panel, session logic, and their tests—for consistency issues.

1. browse_code — apps/web/src/components/chat/ComposerPendingApprovalActions.tsx

2. browse_code — apps/web/src/components/chat/ComposerPendingApprovalPanel.tsx

💭 I'm checking where ChatComposer is used and whether the options prop flows through correctly, plus considering edge cases like duplicate provider-supplied decisions causing React key collisions. Should also verify empty options arrays are filtered out by session logic, and I want to look at ChatComposer around the two call sites to check appName/detail ordering in the panel.

3. browse_code — apps/web/src/components/chat/ChatComposer.tsx

💭 The Actions component styling is consistent across decision types—decline uses destructive, accept uses foreground, others default to muted. I want to check if "acceptAlways" affects other parts of the web UI that render approval decisions, like activity timeline labels showing resolved decisions.

4. git_tools — acceptForSession

💭 I should also check other places in the web app that handle rendering approvals by requestKind, like timeline items or activity rows, since that type is now a wider union and might need exhaustive handling for "mcp-elicitation". I'll search for "file-change" references in apps/web too.

5. git_tools — file-change|file-read

6. browse_code — apps/web/src/components/chat/MessagesTimeline.logic.ts

7. browse_code — apps/web/src/session-logic.ts

💭 I need to check whether the WorkLogEntry's requestKind type has been updated to include this new "mcp-elicitation" value, since extractWorkLogRequestKind now returns it from requestKindFromRequestType.

8. git_tools — requestKind

💭 I'm checking that mcp-elicitation timeline entries falling back to "other" toolGroupAction is acceptable rather than a UI inconsistency. Then I'm scanning ComposerPendingApprovalPanel's appName span styling against sibling text sizing conventions, and it seems reasonably consistent without major issues. I'm more concerned about derivePendingApprovals lacking dedupe on provider-supplied options, which could produce duplicate decision keys if a malformed payload arrives—minor but worth noting. More importantly, since options always come from describeMcpElicitation with cancel/decline/accept baked in, but isProviderApprovalOption validation could silently drop an option with an empty label, there's a real risk that a decline button could vanish if the label fails TrimmedNonEmptyString validation, leaving the user unable to reject the request. The style mapping from decision to className duplicates across web and mobile, though mobile is out of scope here. Ordering of actions now follows provider-supplied order rather than the previous fixed Cancel-first layout, which seems acceptable. I'm also noting that ComposerPendingApprovalActions is memoized, but since options arrays from derivePendingApprovals are freshly created each derive, this could break memoization—though that's likely handled upstream. Now I'm checking the placement of the appName span relative to the code element within the collapsed mobile layout. The panel spacing and destructive-foreground styling for decline actions remain unchanged. I'm considering whether the "acceptAlways" option gets appropriately prominent styling since it's often the primary affirmative choice, though this seems more of an aesthetic nitpick. I also notice the panel displays both the appName and a detail string mentioning the same app, which duplicates information redundantly. Now I want to check whether there's a second surface elsewhere—like a messages timeline approval row—that also renders these provider options and needs similar handling, so I'm searching for related "Always allow this session" text in the web codebase.

9. git_tools — Always allow|onRespondToApproval|ComposerPendingApprovalActions

💭 I should check ChatView.tsx's onRespondToApproval handler to see if it properly handles decision types and whether "acceptAlways" is actually wired through the mutation path — otherwise the button might just do nothing.

10. browse_code — apps/web/src/components/ChatView.tsx

💭 I'm satisfied the decision passes through generically, and I'm restricting my check scope to apps/web rather than desktop/electron surfaces. I'm also weighing whether the ChatComposer's collapsed-mobile button layout could cause issues with multiple provider options, and considering whether keyboard shortcuts exist for approval actions.

11. git_tools — "decline"|'decline'

💭 I should also check if any web UI displays resolved approval decision labels like "Approved for session" that might need updating to reflect the new "acceptAlways" option—let me grep for "Approved" to find those spots.

12. git_tools — decision

💭 The web changes look consistent overall, using the Button primitive while preserving variants, disabled state, and colors. I notice the appName span's text sizing matches other arbitrary sizes already used locally, though it lacks the truncate class that might be needed given the code element's styling nearby—worth flagging as a potential real finding in ComposerPendingApprovalPanel. Since it's marked shrink-0 without a max-width, an arbitrary provider-supplied app name could overflow or push the adjacent flex-1 code element to zero width in the collapsed mobile panel, which is a legitimate layout risk tied to the changed lines. I'm leaning toward suggesting max-w-[40%] truncate or allowing shrink with min-w-0, though I'm still weighing whether this is significant enough to fail the check versus being a minor false positive. I did notice a possible duplicate-key issue in the approval action buttons since the decision options aren't deduped upstream, but that's speculative given the validated schema, so I'll leave it out and focus the review on the truncation finding alone. I'll go ahead and post the inline comment on the ComposerPendingApproval component now. Now I'm weighing whether this warrants a failing verdict versus a soft note, since it's a real but moderate layout risk from an unbounded provider-supplied string, not just an aesthetic nitpick — I'll lean toward marking it as a failure given the regression potential, though the fallback to serverName limits worst-case severity.

13. modify_pr — One layout finding in the changed web approval panel. Everything else (Button primitive reuse, size="micro" / variant="ghost-muted", disabled handling, destructive/foreground tone mapping, aria labels) stays consistent with the existing contract.


Agent Credits: 93 credits