← Back to Pull requests

feat(viewer): integrate a shared SVG icon set #1367

Closed
unknown closed this pull request without merging on Sep 17, 2026 10:48 UTC
View on GitHub
unknown unknown commented on Sep 17, 2026 09:19 UTC
Author

Summary

Integrates a shared SVG icon set into the read-only viewer and applies it where the mockups
show real icons. Keeps the viewer read-only and CSP-safe; no antd runtime and no remote
iconfont are introduced.

Changes

  • Add six Ant Design Icons (MIT) SVGs under internal/viewer/static/icons/

  • (chevron-left, chevron-right, chevron-down, search, settings, file), normalized to
    fill="currentColor" so a single asset adapts to light and dark. MIT attribution lives in
    internal/viewer/static/icons/NOTICE.
  • This branch is the single home for the viewer's shared icon set. Per-screen redesign PRs

  • consume icons via {{icon "name"}} and should not source icons independently; icons not yet
    used here (chevron-) ship for that upcoming work.
  • Embed them via //go:embed and add a CSP-safe icon template helper that inlines the SVG

  • (no <script>, no external font/CDN), guarded by a name-allowlist regex so the lookup can
    never escape static/icons/.
  • Apply the set: a magnifier in the repositories search box; the settings glyph on

  • tool-call headers, replacing the inline unicode gear (&#9881;); and the file glyph in the
    Files Reviewed list, replacing a hardcoded grey ::before data-URI that did not follow the
    dark theme.
  • Align the header brand logo to the design: replace the hardcoded bright-green

  • rounded-square brand-icon with the design's monochrome aperture mark as an inline
    SVG (static/icons/logo.svg, currentColor), so it follows the text color in light
    and dark instead of a fixed green tile. logo.svg is the project's own brand mark
    (Apache-2.0), not an Ant Design icon.
  • The chevron- icons ship as part of the shared set for the upcoming per-screen work

  • (back navigation, pagination); the accordion disclosure chevrons remain CSS-drawn for now.

    Notes

  • Read-only route contract and the CSP/security headers are unchanged.

  • Icons inherit text color via currentColor, so they follow the theme automatically.
  • Testing

  • make check — passed

  • make test — passed

  • open-code-review (ocr) self-review — 0 findings
  • AI disclosure

    Implemented using the Claude Opus 4.8 model; the change was reviewed with open-code-review
    (ocr).

    Closes #1321.

    Diff: 281 lines (+210 / -71) across 3 files Reviewer: Bangkah Review duration: 88m
    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 · 281 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.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1367"
    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: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    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: 15.7% · Safe to merge
    15.7%