Repository navigation
fix(frontend): 论文探索三件套错误处理/取消/空态/竞态修复 - #38
Merged
Merged
Conversation
PR2 — 论文探索三件套前端
OverviewPanel:
- onNodeClick 用 react-router navigate 替代 window.location 整页刷新
- 6 子请求独立 catch + 失败计数 toast,区分无数据 vs 加载失败(外层 catch 是死代码)
- cluster_map 空 clusters 时透出后端 message(如'论文数量不足'),不再整块消失
CitationPanel:
- startImport 加并发锁(pollRef 已存在则 return)防定时器泄漏 + 双重轮询
- 导入轮询 catch 清状态 + 关弹窗 + toast,修 done 永假、关闭按钮不出现的卡死
- 轮询结束 clearInterval 后置 pollRef=undefined
- 论文搜索 catch 加 toast(此前仅清空下拉)
- handleQuery 改 Promise.allSettled,detail 成功但 tree 失败仍展示 detail
- 进度文案区分'等待任务创建'/'准备中'/'导入完成'/'导入失败'
InsightPanel:
- 删除未使用 import HelpCircle/ArrowRight
- 4 个单项刷新加 try/catch + toast(此前静默吞错)
- runInsight 加请求序号,快速切换关键词时丢弃旧响应防结果错位
- 外层死 catch 改为分项失败计数 toast
PaperDetail:
- skim/deep 取消加 toast'已取消(后台可能仍在处理)'
- figure/reasoning/embed PipelineProgress 加 onCancel(停 UI + toast,后端无 cancel 端点)
- 相似论文 fallback 用'点击查看详情'替代 UUID 当标题
- 加 if (!id) return null 收窄类型,paperId={id!} 改 paperId(消除非空断言)
Dashboard:
- 删除未使用 import Badge/AlertTriangle/CheckCircle2/Clock/TrendingUp
- costDays 切换改局部 costLoading,Token 卡片单独 loading,不再整页白屏闪烁
- 推荐不感兴趣 catch 加 toast(此前静默失败)
🔍 OpenCode PR Review Required这是一个受保护的分支,merge 前需要进行 code review。 请运行以下命令进行 OpenCode review: 或者在 PR 页面评论 This is an automated reminder from PR Review Gate. |
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.
PR2 — 论文探索三件套前端
OverviewPanel
onNodeClick用 react-routernavigate替代window.location整页刷新message(如'论文数量不足'),不再整块消失CitationPanel
startImport加并发锁(pollRef已存在则 return)防定时器泄漏 + 双重轮询 P0done永假、关闭按钮不出现的卡死 P0handleQuery改Promise.allSettled,detail 成功但 tree 失败仍展示 detailInsightPanel
HelpCircle/ArrowRightrunInsight加请求序号,快速切换关键词时丢弃旧响应防结果错位PaperDetail
PipelineProgress加onCancel(停 UI + toast,后端无 cancel 端点)if (!id) return null收窄类型,paperId={id!}改paperId(消除非空断言)Dashboard
Badge/AlertTriangle/CheckCircle2/Clock/TrendingUpcostDays切换改局部costLoading,Token 卡片单独 loading,不再整页白屏闪烁验证
依赖