← Back to Pull requests

feat(preview): T3's work log presentation of the preview's tools (W47) #330

Open
unknown opened this pull request with 262 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 28, 2026 20:01 UTC
Author

What

T3's work-log presentation of the preview's tools (preview.md#deferred, "Used browser N times"). Decisions in docs/plans/preview.md, "The preview's tools in the work log (W47)":

  • D1681 — a new client capability chat.tools@1 (ChatTools.describe(command, presentation), a disposable, provided by jhin.chat). A tool call is a described command's when its name is the command's MCP tool behind the node's jhin server under any agent's prefix (Claude mcp__jhin__preview_click, Codex jhin.preview_click, OpenCode jhin_preview_click). Its row reads as T3's: "Clicking in the preview browser" / "Clicked …" / "Failed to click …" / "Declined to click …", with the group's icon. jhin.preview-panel describes the browser tools with T3's labels, jhin.device-panel the device tools, jhin.html-render-view html.preview and html.render. No plugin knows another: the chat only knows the capability (rules 3, 4, 7).

  • D1682 — a group's calls are one part of the summary, as T3's summarizeT3ToolCalls: "Used browser 2 times and used device controls 1 time", "Tried to use browser 2 times" when none completed, "Previewed 1 HTML page", "Rendered 2 HTML pages". A summary of one group alone shows that group's icon.
  • The fake agent gets /mcp <tool> … (a trailing ! fails the call) for the e2e.

    Evidence

    !work log

    $ vp test run apps/web/test/timeline.test.ts
     Test Files  1 passed (1)
          Tests  25 passed (25)
    
    $ npx playwright test tests/preview.spec.ts -g "D1681"
    [1/1] [chromium] › tests/preview.spec.ts:90:1 › D1681–D1682: the work log names the agent's browser and device tools as T3 does
      1 passed (10.2s)
    
    $ vp run --filter @jhin/agent-fake typecheck && vp run --filter @jhin/client-api typecheck && vp run --filter @jhin/web typecheck
    (exit 0)
    
    $ vp check <changed files>
    Found 0 errors and 6 warnings in 73 files   (warnings are existing ones in composer.tsx)
    

    🤖 Generated with Claude Code

    Diff: 262 lines (+196 / -66) across 3 files Reviewer: claude[bot] Review duration: 8m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 262 lines diff across 3 files
    0.44
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.333
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #330"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 44.3% (MEDIUM) · Higher = larger blast radius
    44.3%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 23.6% · Safe to merge
    23.6%
    Repository