Browse: keep a proven last page when the record count arrives or shrinks, not only when it's unchanged
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
从 DatabaseTableView.tsx 中的最后一页证明检查开始,当记录数量与证明时的数量不同时,记住的最后一页会被丢弃。阅读 Next 如何使用该证明,然后为三种计数情况添加测试:首次到达、增长和缩减。完成标准是:首次到达和缩减时保留证明,增长时丢弃证明,并且每种情况都有测试覆盖。
由索引模型根据 Issue 内容生成。
描述
What happens
After #1958, Browse remembers that a page is the last one only while the table's record count is the same as when that was proven. A count that moves lets Next probe past it again, which is what fixes #1940.
The rule is strict equality, so a remembered last page is also dropped when nothing new could be past it:
- The count first arrives. The proof was made before the count was known, and the count then loads.
- The count shrinks. Records were deleted, so a page that was last is still last, or now past the end.
Either way the next step costs one extra probe of the page after it. That probe comes back empty and proves the last page again. Nothing is shown wrongly and Next still works, so it's one wasted read, not a bug the user sees.
Possible improvement
Only retire the proof when the count grows: keep it when the count first arrives, or when it shrinks. It's a small change to the proof check in DatabaseTableView.tsx, and needs a test for each of the three cases.
Low priority: the cost is one read per step after a deletion or an initial count load.
Review-Deferral: a3b75b0e1d3e87f1 severity=nit category=correctness
Raised by the cross-model review of #1958 (#1940).
🤖 Generated by Anthropic Claude Code (Claude Opus 5.5); posted via @dawsontoth.
- 主要语言
- TypeScript
- 星标
- 5
- 派生
- 4
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 144
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HarperFast/studio 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
HarperFast/studio#2070 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
HarperFast/studio#2067 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
HarperFast/studio#2053 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
HarperFast/studio#2026 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
HarperFast/studio#2021 ·
维护者通常 2 天内回复
查看 HarperFast/studio 的全部 Issue
相似的 Issue
-
Bug: Cloudflare Pages static _redirects identity rule causes RSC Flight to reload as HTML可能已有人在做 @Donvero 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Mantitup-Org/vista#210 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
simstudioai/sim#9831 ·
维护者通常 1 天内回复
-
status: waiting for maintainer
难度 2/5 1-3 小时 新手友好度 88/100
mui/material-ui#49751 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
diplodoc-platform/transform#1184 ·
维护者通常 1 天内回复