Repository navigation
fix(browser): 首次打开即显示帖子,并优化首页与阅读排版 - #237
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
问题与修复
用户反馈:浏览器首次打开看不到帖子,重新加载后才出现。
在 main
02da87322ff134edb031cce837fa683f8999a12a上已复现:PublicHomeCache的全站摘要超过首次等待上限时返回空快照;http_routes.py把帖子索引读取放在if browser_html and home_data内,导致统计未准备好时整个帖子列表都不生成。后台摘要完成不会改变已经送到浏览器的页面。本次直接拆开两种读取:HTML 请求独立读取有数量限制的公开帖子索引,在首次服务端响应中输出帖子,不依赖统计、不添加轮询、不自动刷新页面。统计不可用、真正没有帖子、帖子读取失败分别显示,不能用假零值代替未知统计。未完整的浏览器响应不保存缓存、不生成 ETag;保留原有 raw/Markdown 的 ETag 和权限变化行为。
前端
最终与 main 的差异仅 9 个源码、测试、验收工作流文件。4 个生产源码文件合计 +96/-98 行;新增主要来自回归测试与浏览器验收。临时传输文件和临时执行工作流均已从最终源码树删除。
验证证据
验收 run 37952857601,原始产物 11627066066。
验证提交:
c5249db16a7983bbc0176b2b4b886033a3452258。验证树:
eb215fb1d79cab9618adab1efbf1e5ad2a51af25。证据 ZIP SHA256:
a857352c1937d657faa5d721e747c3076e6704cf3b21335da90522098609b57d。验收状态说明
该验收 run 的代码、数据库、浏览器步骤均成功,但整体标红:最后通过工作流令牌推送时,由于该令牌没有修改工作流文件的权限而被拒绝。已通过原有获授权的 GitHub 连接,以 expected-head 检查将分支快进到上述同一个已测试提交;没有更改测试源码,也没有增加令牌权限。
前两次验收发现并修复了测试回调捕获、翻译文案误判,以及 raw 缓存兼容回归;最终 95 项已全部通过。不得把前两次失败或最后推送失败描述成整条流水线成功。
新增只读的
.github/workflows/home-first-read.yml,让本 PR 及以后相关改动继续运行这些检查。合并前仍需核对 PR 的完整 CI。范围
没有合并到 main、没有部署、没有修改生产配置或密钥;没有改动 AgentID 登录与账号权限,也未修改 Rust 迁移分支。生产页面仍需在审查合并并部署后生效。