← Back to Pull requests

feat(search): 增强搜索功能,支持关键词/番剧ID/URL,优化搜索建议逻辑 #3503

Open
unknown opened this pull request with 68 lines diff across 1 files
View on GitHub
unknown unknown commented on Sep 29, 2026 14:28 UTC
Author

现在在搜索页面无法直接输入bangumi内的ID或链接的情况下完成正确的番剧搜索,现低侵入性支持该方法

值得讨论的是,是否要支持在匹配成功时,点击搜索/点击条目后自动直接跳转到对应番剧条目详情页面;还是保留目前仅在候选词处提供番剧条目名称再走search API不改变原流程

---

支持在“搜索”页面:
1. 搜索框placeholder从“关键词”改成“关键词/番剧ID/URL”
2. 搜索框内允许填入以下内容,其匹配优先于关键词搜索:
1. https://bgm.tv/subject/622288 等能够匹配到 subject/<subjectID> 的文本,匹配提取bangumi的subjectID
2. 622288 等int,视为subjectID
3. 当匹配到如上项目后,参考番剧详情页,尝试直接通过api获取bangumi上该番剧ID对应的番剧名称并作为搜索候选第一项;搜索候选第二项为提取出的ID;搜索项第三项为搜索框内容
4. 若上述流程没有获取到番剧,则回退到将搜索框内容作为关键词进行正常搜索流程

---

同时也支持 ep/<epID> 的匹配,以支持通过输入剧集链接直接返回番剧条目名称进行搜索

Diff: 68 lines (+51 / -17) across 1 files Reviewer: Him188 Review duration: 89614m
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.35) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 68 lines diff across 1 files
0.35
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%
44%
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.253
Real PR Conversation Timeline
1 comments
"Review active on #3503"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 44.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: 35.3% (MEDIUM) · Higher = larger blast radius
35.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: 44.7% · Lower = rushed or shallow review
44.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: 19.5% · Safe to merge
19.5%