Web UI: FileListTable load-more loop guard only active in DEV — unbounded paging retry loop in production

未关闭 适合新手
#131 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, typescript
领域
frontend

调研方向

先查看 src/profiles/web/src/components/FileListTable.tsx:369-407 中的回退 effect 和滚动路径,然后检查 src/profiles/web/src/App.tsx:300-302 如何处理去重后的行。验证当列表签名未变化时,签名保护和加载标志会阻止重复调用。完成标准是:在这种情况下,回退分页停止重试,同时正常的加载更多行为仍然有效。

由索引模型根据 Issue 内容生成。

描述

bug frontend

Problem

The render-time fallback effect (FileListTable.tsx:389-407, no dep array — runs every render) never sets loadingRef.current (only the scroll path does, lines 369-372), and the only protection against re-firing with an unchanged signature is compiled out in production:

// src/profiles/web/src/components/FileListTable.tsx:401
if (import.meta.env.DEV && lastLoadSignatureRef.current === signature) {
  console.warn("[FileListTable] load-more re-fired with an unchanged list signature — skipped");

In production, if the backend returns rows that all dedupe away (App.tsx:300-302 filters by path) so rawCount/grandTotal stay put, every re-render (each scroll tick writes scrollTop state) re-fires onLoadMore forever — a request storm. #33's fix is thus dev-only.

Suggested fix

  • Drop the import.meta.env.DEV && so the signature guard always applies.
  • Set loadingRef.current = true around the fallback call with the same 200 ms release the scroll path uses.
主要语言
Python
星标
1
派生
1
平均合并
4 小时 46 分钟
30 天内合并 PR
55

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

falbany/ProFiles 的其他 Issue

查看 falbany/ProFiles 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。