← Back to Pull requests

fix: STで検出した不具合の修正(最初の回答の遅延ほか)とST用テスト #17

Open
unknown opened this pull request with 228 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 29, 2026 04:53 UTC
Author

関連仕様

  • docs/st-plan.md(v1.0 承認済み)— ST の実施

  • PRD R-1(応答 100ms 以内)、非機能(コントラスト 4.5:1、キーボード操作)、docs/screens.md S-2・S-6
  • Closes #11, Closes #12, Closes #13, Closes #14
    (#15・#16 は S4 の改善のため UAT で判断)

    変更内容

    ST で検出した不具合の修正


    | Issue | 重大度 | 内容 | 修正 |
    | --- | --- | --- | --- |
    | #11 | S2 | Windows の Chrome で、最初の回答の表示が約0.3秒止まる(R-1 違反)。原因は「☆」の描画時のシステムフォント代替探索 | 星をすべて SVG(src/components/ui/StarIcon.tsx)に置き換え。実ブラウザで最初の回答 310ms → 5ms。音声ボタンは再生されるまで音声エンジンに触れないよう変更(予防) |
    | #12 | S3 | WebKit で、表示直後に入力した検索語が絞り込みに反映されない(ハイドレーション前の入力) | 動き出した時点で入力欄の値を取り込む |
    | #13 | S3 | 問題表示直後のキー入力の取りこぼし | キー入力リスナーを useLayoutEffect(描画前)で登録 |
    | #14 | S3 | ダークモードの読み込み中の文字のコントラスト不足 | text-zinc-600 dark:text-zinc-400 |

  • 「★のみ」ボタンのアクセシブル名を「重要表現のみ」に(星を SVG にしたため)

  • 空の案内文の「☆」を「星のボタン」に
  • ST 用テスト(tests/st/)


  • playwright.st.config.ts:既定で本番 URL に対して実行。Chromium(Pixel 7/PC)・WebKit(iPhone 15/iPhone SE)。Firefox はこの開発環境のサンドボックスで起動できないため ST_FIREFOX=1 のときのみ

  • npm run test:st(本体)、npm run test:st:perf(R-1 計測を直列実行)

  • ケース:機能 14/R-1〜R-3/画面遷移と状態/非機能(axe-core・コントラスト・キーボード・表示崩れ・転送量・秘密情報・noindex)/異常系/データ

  • tests/st/lighthouse.mjs:Lighthouse 計測結果の集計

  • devDependencies:@axe-core/playwright、lighthouse

  • docs/st-plan.md を v1.0(承認済み)に
  • テスト方法

  • npm run check(ユニット 53件)・npm run build(全ルート Static)

  • 修正版(ローカル本番ビルド)に対して ST を実行:140件成功(残っていた失敗はテスト側のタイミングで、修正済み)

  • #11:実ブラウザ(GPU あり)で修正前後を計測(最初の回答 310ms×3回 → 5〜79ms)

  • #12・#13:WebKit で修正前の失敗を確認、修正後に成功

  • 表示確認:320/1280px、ライト/ダークで主要画面のスクリーンショットを確認(はみ出し・重なりなし)

  • マージ後:本番に対して ST を最終実施し、結果報告書(docs/st-report.md)を作成
  • スクリーンショット

    なし(見た目の変更は星の描画方法のみ。SVG で同じ形・色)

    チェックリスト

  • 仕様(docs/ または PRD)と実装が一致している

  • 用語コンテンツの変更は content/ ブランチで、意味・例文・和訳をオーナーが確認した(該当なし)

  • Vercelプレビューで動作を確認した(プレビュー生成後)
  • 🤖 Generated with Claude Code

    Diff: 228 lines (+171 / -57) across 2 files Reviewer: claude[bot] Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.37) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 228 lines diff across 2 files
    0.37
    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%
    42%
    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.325
    Real PR Conversation Timeline
    1 comments
    "Review active on #17"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 37.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 21.1% · Safe to merge
    21.1%