← Back to Pull requests

feat: upgrade Spotlight agent selector & live step-trace AgentPlan UI (#399) #423

Closed
unknown closed this pull request without merging on Dec 01, 2026 12:32 UTC
View on GitHub
unknown unknown commented on Dec 01, 2026 11:40 UTC
Author

Closes #399
Part of #394

Summary


  • Inline agent profile selector in AgentSpotlightBar (src/components/AgentSpotlightBar.jsx):

  • - Adds a compact <select id="agent-spotlight-select"> bound to enabled agent profiles from useAgentConfig right after the query input so the #340 focus trap continues landing focus on the input first.
    - Preserves Escape stopPropagation(), scrim dismissal, focus restoration, and deferred 150ms exit (cutting immediately on both prefers-reduced-motion and data-ui-motion="reduce", with timer cleanup on unmount).
    - Adds an inline role="alert" provider-readiness notice inside Spotlight when the chosen profile's effective provider is not ready, while Cmd/Ctrl+K continues opening Spotlight whenever any enabled profile is configured (anyAgentConfigured).
  • Live step traces, replies, and independent filter clearing in AgentPlan (src/components/AgentPlan.jsx + src/utils/agentSteps.js):

  • - Renders in-flight aria-live="polite" agent progress ({agent} · {step}…) with a Stop button wired to useAgentEngine.cancel().
    - Renders plain-text (dir="auto", never HTML injection) replies/error summaries with dismiss controls, collapsible step traces showing localized canonical tool labels and outcome badges (Done, Staged for review, Skipped, Denied, Error), and legacy active filter projections with an independent Clear agent filter button.
  • Design tokens, Storybook, docs & tests:

  • - Updated src/index.css with --ui-* tokens and logical RTL properties (padding-inline-start, margin-inline-start, text-align: start) while keeping src/index.css.test.js coarse-pointer ordering intact.
    - Added stories (AgentPlan.stories.jsx, updated AgentSpotlightBar.stories.jsx), updated DESIGN.md, added .changeset/spotlight-agent-ui.md, and added tests (src/utils/agentSteps.test.js, src/components/AgentPlan.test.jsx, src/components/AgentSpotlightBar.test.jsx, src/components/DialogEscape.test.jsx, src/components/BookmarkApp.shell.test.jsx).

    Verification


  • npm run ci passed cleanly locally (132 test files / 1657 tests, ESLint --max-warnings=0, Prettier, Chrome build + chunk laziness check, Storybook build).

  • Pre-push security/a11y/focus-trap review completed via Claude Sonnet with follow-up polish applied before signing.
  • <!-- agent-bot-write: ghw_256cfce24e1773f6 session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->

    Diff: 319 lines (+239 / -80) across 3 files Reviewer: qwts Review duration: 51m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 319 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.345
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #423"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.4% (MEDIUM) · Higher = larger blast radius
    40.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.0% · Safe to merge
    16.0%