Repository navigation
feat(copilot): 实战会话复盘接入长期画像 - #93
Merged
Merged
Conversation
The realtime connection persisted every turn with an upsert, so a record deleted while the socket was still open (or just before it closed) was recreated with its full conversation. Create the record on start only and update it afterwards; skip the redundant write on close after an explicit stop. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01N4Qh8MvcZhaUic4Q8gpez9
The review endpoint always answered "pending", and the session list only knew whether a review was linked. A deleted review therefore showed "check status" while the click silently generated a new one, and the client re-implemented the server's two-minute activity window. Sessions now expose the server-computed in_progress flag and a review_status (pending, done, error, or missing when the linked review was deleted); the review endpoint returns the real status. The history card links finished reviews, retries failed ones from their saved snapshot, and labels regeneration of a deleted review explicitly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01N4Qh8MvcZhaUic4Q8gpez9
- Track a reviewing Copilot session opened from history as copilot_review instead of falling back to drill_review. - Show the session history below the preparation results so it no longer pushes the analysis down. - Tell the user that a sentence still being recognized when the interview ends is not saved, since realtime ASR drops transcripts after stop. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01N4Qh8MvcZhaUic4Q8gpez9
Rewrite the new section for users of the desktop app: what the session history offers, when a review can be generated, what it changes in the profile and what deletion keeps. Endpoint, status-code and column details stay in the generated OpenAPI. Drop the committed screenshots and verification log; they belong in the pull request description. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01N4Qh8MvcZhaUic4Q8gpez9
stanGSA
marked this pull request as ready for review
October 19, 2026 15:06
Use reviewed Copilot sessions from the imported database instead of retaining legacy realtime counts. Preserve independent non-Copilot history from local and archived profiles, and merge the final profile in one update. Cover full archive imports, repeated imports, reviewed sessions, local legacy counts, and profile-only archives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机
Copilot 实时会话会持久化完整的双路对话(HR 与本人分开、带时间戳),但用户无法查看、单独删除或复盘这些记录,长期画像也拿不到任何真实面试数据。画像页早已为 Copilot 预留了统计卡,在新部署上却一直为空。本 PR 补上「实时会话 → 手动复盘 → 写回画像」这条路径。
行为变化
in_progress和review_status(pending/done/error/missing)。失败的复盘按原对话快照重新生成;原复盘在历史记录中被删除后,会明确提示「重新生成」。copilot会话模式:历史记录可按「Copilot 实战」筛选和重试,复盘结果写回弱点、强项、SM-2 复习、行为信号和copilot_sessions/copilot_avg_score,不写入topic_mastery。GET /api/copilot/prep/{prep_id}/sessionsGET /api/copilot/sessions/{session_id}POST /api/copilot/sessions/{session_id}/reviewDELETE /api/copilot/sessions/{session_id}已知限制:结束面试时仍在识别的最后一句不会保存(实时 ASR 在停止后按现有设计丢弃转写)。界面和文档已提示用户等字幕定稿后再结束。
验证
bun install --frozen-lockfile bun run gen:api && git diff --exit-code -- packages/contracts/openapi.json frontend/src/api/schema.d.ts bun run check bun run test:contracts bun run smoke:desktopbun run check:后端 583 项通过;前端 Node 测试 22 项、Bun 测试 44 项通过;类型、架构边界、构建与桌面打包通过;lint 0 错误,保留上游原有的 41 条警告。截图(合成数据与模拟接口,无真实简历、录音、画像或凭证):
实战记录:进行中 / 复盘生成中 / 已复盘 / 复盘失败 / 复盘已删除 / 数据不足
完整对话弹窗
Copilot 实战复盘页
兼容性影响
InterviewModeSchema增加copilot,ReviewTaskTypeSchema增加copilot_review(只加不改)。copilot_realtime_sessions新增两个可空列review_session_id、review_claimed_at,初始化时自动补齐,可重复执行;个人归档的建表语句已同步,旧归档可导入,新归档保留关联。copilot_sessions和total_sessions只计入已生成复盘的 Copilot 会话,不再按实时会话行数计数,避免同一场面试被算两次。