Skip to content

feat: HIL レビュー画面を追加する - #1116

Draft
owk-owk130 wants to merge 10 commits into
feat/hil-2-source-approvalfrom
feat/hil-3-review-ui
Draft

feat: HIL レビュー画面を追加する#1116
owk-owk130 wants to merge 10 commits into
feat/hil-2-source-approvalfrom
feat/hil-3-review-ui

Conversation

@owk-owk130

@owk-owk130 owk-owk130 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

概要

ナレッジ HIL 基盤(計画: .brain/plans/knowledge-hil-foundation.md)の PR 3。Issue #1079 / #1080 のコード部分。
「答えられなかった・評価が悪かった回答」を管理画面で根拠ごと確認し、3 択で判断できるようにする。

変更内容

server

  • review_decisions テーブル + migration 0030(一覧クエリ用に llm_usage(thread_id, turn_index, agent)message_feedback(message_id) の index も追加)
  • GET /admin/review: 要確認一覧。retrieval trace を answer_run 単位に集約し、3 シグナル(bad 評価 / ナレッジ検索 0 件 / Web フォールバック)で抽出。LLM 分類はしない
  • GET /admin/review/{answerRunId}: 質問・回答(memory から復元、voice は決定的 messageId を再構築)・検索の根拠(query / hits / score)・ユーザー評価・判断履歴
  • POST /admin/review/{answerRunId}/decision: 問題なし / 誤り / 情報源不足 を記録。bad 評価があれば解決済みにする
  • 権限は requireRole("admin")(feedback 管理と同じ)

web

  • ダッシュボードに「回答レビュー」タブ(watch グループ、admin 以上)
  • 一覧: シグナルバッジ・検索クエリ・判断状態、未判断/判断済み/すべて フィルタ、無限スクロール
  • 詳細モーダル: 会話・根拠 chunk・評価・判断履歴・判断ボタン + メモ

その他

  • .gitignorereview/ をルート直下限定に修正(web の feature dir components/review/ が ignore されていた)

既知の制約

🤖 Generated with Claude Code

https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP

@owk-owk130 owk-owk130 changed the title feat/hil 3 review ui feat: HIL レビュー画面を追加する Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for server

Status Category Percentage Covered / Total
🟢 Lines 98.09% (🎯 97%) 3664 / 3735
🟢 Statements 97.53% (🎯 96%) 3843 / 3940
🟢 Functions 98.27% (🎯 97%) 684 / 696
🟢 Branches 89.61% (🎯 87%) 1528 / 1705
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
server/src/db/schema.ts 100% 100% 100% 100%
server/src/lib/principal.ts 100% 100% 100% 100%
server/src/repository/review-repository.ts 78.26% 85.71% 66.66% 77.27%
server/src/routes/admin/review.ts 100% 75% 100% 100%
server/src/services/review.ts 100% 92.85% 100% 100%
server/src/services/voice/conversation.ts 97.29% 91.17% 100% 100%
Generated in workflow #2109 for commit a4c24de by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for shared

Status Category Percentage Covered / Total
🟢 Lines 99.19% (🎯 98%) 245 / 247
🟢 Statements 80.86% (🎯 80%) 262 / 324
🟢 Functions 100% (🎯 98%) 83 / 83
🟢 Branches 63.88% (🎯 62%) 115 / 180
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
shared/src/api/types.ts 100% 100% 100% 100%
shared/src/api/repository/review-repository.ts 78.57% 76.92% 100% 100%
Generated in workflow #2109 for commit a4c24de by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for web

Status Category Percentage Covered / Total
🟢 Lines 97.5% (🎯 96%) 1720 / 1764
🟢 Statements 96.36% (🎯 95%) 1831 / 1900
🟢 Functions 96.23% (🎯 95%) 742 / 771
🟢 Branches 89.68% (🎯 88%) 1182 / 1318
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
web/src/app/dashboard/components/ReviewPanel.tsx 100% 85.18% 100% 100%
web/src/app/dashboard/components/review/ReviewDetailModal.tsx 100% 81.25% 100% 100%
web/src/app/dashboard/components/review/helpers.ts 100% 100% 100% 100%
web/src/app/dashboard/hooks/keys.ts 93.33% 100% 92.85% 93.33%
web/src/app/dashboard/hooks/useReview.ts 93.75% 85.71% 100% 100%
web/src/lib/api/repository.ts 100% 100% 100% 100%
Generated in workflow #2109 for commit a4c24de by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for widget

Status Category Percentage Covered / Total
🟢 Lines 99.62% (🎯 98%) 265 / 266
🟢 Statements 97.94% (🎯 96%) 286 / 292
🟢 Functions 98.11% (🎯 98%) 52 / 53
🟢 Branches 93.28% (🎯 92%) 139 / 149
File CoverageNo changed files found.
Generated in workflow #2109 for commit a4c24de by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant