Repository navigation
[PR] Blog page: per-article GitHub discussion button (exact link from recorded data) + EN/中文 pin - #5396
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.7757-pr.5396.fb7f1c4This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5396.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 #5398 是「给博客文章加『去 GitHub 评论』链接」这个 UI 改动本身;相关但范围不同的条目:#5394 是单篇文章的评论区内容 issue(标题就是 标签: 我核对了分支 发现 1 — commit message / PR 正文引用了错的 issue(文档/归属错误) 发现 2 — 旧文章没有对应评论区 → 链接打开空搜索(边缘 UX) 八问
判定:可合并。代码与 CI 都过关;两处发现都是非阻塞小项——发现 1 建议顺手把 PR 正文的 #5393 改成 #5394,发现 2 建议给 |
cc22c63 to
c7beb52
Compare
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Verdict: APPROVE (posted as a review comment — GitHub forbids approving one's own PR) — after two small direct fixes, pushed as labeled commit c7beb5279 on the PR branch.
Verified independently:
- Direction. The convention issue (GH #5393, "blog:frequent-compression — Comment Section") states in its OP that every post's thread issue carries
blog:<post-id>in the title; the button opens a repo-scoped issue search on the post id. Live-verified the query shape via the GitHub search API:is:issue in:title "frequent-compression"→ exactly 1 hit (the thread issue itself). - Diff scope (at e93e52e).
src/web/client.ts(+7/-1) andsrc/web/i18n.ts(+2) only. No server change, nokernel/, no config surface, no persistence/wire/cache impact. - Security.
item.idpasses throughencodeURIComponentbefore reaching the href (attribute-breakout safe);target="_blank"+rel="noopener"present. - Regression inventory of the touched surface. Back link, date/badge row, body render and the not-found branch are all unchanged — the change is purely additive. The i18n catalog-parity test pins
bl.commentin both locales; web-blog-route runs the real WEB_CLIENT in a vm sandbox. - Tests. The new anchor had no pin — added one asserting the exact GitHub search URL plus target/rel in
tests/web-blog-route.test.ts. Targeted local run on the final head: web-blog-route + web-i18n + web-blogfeed = 27/27; the full-suite verdict is CI's job on the new head.
Fixed directly (commit c7beb5279):
src/web/client.ts:993— the two header links rendered glued together (</a><a>with no whitespace;.bl-backhas no margin/padding). Added a space, matching the existing pattern in the not-found branch (:987).tests/web-blog-route.test.ts— regression pin for the new anchor (see above).
Non-blocking note: the meet-bili post predates the convention and has no thread issue, so its button opens an empty search list — graceful by design of the search-based lookup.
Numbering note: references above follow GitHub numbering — this PR is GH #5396 and the convention issue is GH #5393 (the PR body's "#5393" citation is correct).
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复——无其他在途 PR 触碰博客详情页头部或 i18n 审核完成,结论:APPROVE / 可合(等新 head 八问:
两条备注:
判定:可合。新 head |
(ai: vllm-qwen/qwen3.8-27b) 复审确认(第二轮唤醒):head |
ranxianglei
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES (GitHub forbids the formal event on own PRs — this comment carries the full review)
(ai: vllm-qwen/qwen3.8-27b)
Round-3 review of new head f001dc239 (delta since c7beb5279: the button target pivoted from issue search to Discussions search, citing a "#5411 convention"). The direction — moving comment sections from issues to Discussions — is your call and I don't contest it; but as of this head the change ships broken. Three findings, the first two blocking:
F1 (blocking) — the "#5411 convention" citation is dead (src/web/client.ts:959, commit message). Verified against GitHub: issue/PR #5411 -> 404, discussion #5411 -> 404. (The mirror-side #5411 is an unrelated auto-update/rotation decision request.) The convention's actual origin is GH#5393, which is now closed. A code comment must cite something that exists: create the convention-establishing discussion first and cite its real number, or drop the number and state the convention inline.
F2 (blocking) — every button now links to an empty page. Verified: the repo has exactly 10 discussions total and none carries a blog:<id> token — no per-post discussion threads exist yet. After merge, 「去 GitHub 评论」opens zero results for ALL posts. Notably, frequent-compression's real thread is issue #5393 (now closed, but still surfaced by the OLD issue-search URL, which had no is:open filter) — so this pivot takes the one working link and makes it dead. This is a behavior drift that needs disclosure in the PR body: old = resolves to the real thread where one exists -> new = always empty until threads are created. Acceptable resolutions: (a) create the discussion threads before merge (port frequent-compression's content out of #5393) — I'll re-verify the search hits then; or (b) explicitly accept the interim dead-link state in the PR body. Side note: is:open in the query also means a later-closed thread silently empties its button — deliberate?
F3 (doc) — PR body is stale. It still says "It opens the search-filtered issue list ... (see issue #5393)" — that describes the pre-f001dc239 behavior. Refresh it to describe the Discussions convention once settled.
Non-blocking checks all pass: test pin matches the helper output byte-for-byte incl. is:open (tests/web-blog-route.test.ts:118); encodeURIComponent + rel="noopener" intact; i18n parity unaffected; no server/config/kernel impact; CI green on this head (47 runs: 35 success / 12 skipped / 0 failed — verified directly because the mirror cache entry again carried a wrong sha, same anomaly as last round).
Please resolve F1-F2 (and refresh the body per F3); I'll re-review immediately after.
(ai: vllm-qwen/qwen3.8-27b) 第三轮审核结论(新 head 八问:
其余核查均通过:测试对新 URL 逐字节钉住(含 判定:REQUEST_CHANGES,等 owner 解决 F1(死引用)+ F2(评论区不存在或明示接受死链)并更新 PR body,我随到随复审。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Verdict: APPROVE (GitHub forbids the formal event on own PRs — this comment carries the review)
Round-4 review of head 6f5b48483 (pivot to exact recorded-number links + EN|中文 pins). Round-3 findings disposition: F1 dead citation — resolved (comment rewritten); F2 dead-link — resolved structurally (exact link from data, or no button: honest degradation); F3 stale body — resolved (body now describes the new design and discloses the rollout split). Independent verification of this head:
- Language pins work as claimed. The pin is parsed once at init (#2321, src/web/client.ts:146-160) and outranks the stored choice; the anchors resolve to a query-differing URL, which is a FULL navigation (only fragment-only diffs are same-document), so the panel reloads with the pin, lands back on the article via the preserved hash, and the router decodes the slug correctly (route() decodeURIComponent at :4886, matching the list-row encoding at :1015). Same reload semantics as the existing #language-toggle handler (:4907). "Zero new state code" holds.
- Tests have teeth: positive case pins the exact discussions/ URL incl. target=_blank rel=noopener; the new negative case pins "no recorded number → no discussion anchor anywhere"; i18n catalog parity (web-i18n) covers the label. Local targeted run 7/7; CI green on this head (47 runs: 35 success / 12 skipped — direct fetch, mirror cache entry unreliable again this session).
- Staged delivery accepted. As of this head the comment button renders for NO post (server passthrough deferred to the fetch-fallbacks PR per the body; no numbers recorded yet). That is disclosed, and what the tests pin is the client-layer contract (item.discussion → exact link), so the staging is coherent. Two follow-ups belong in that other work, not here: (a) wire the passthrough for BOTH item kinds — posts come from website/blog/*.md frontmatter, not articles.json, so "recorded in articles.json" only covers kind=article unless the fallback PR also reads post frontmatter; (b) create the actual Discussion threads (frequent-compression first — port it out of closed #5393) so at least one button goes live.
One small defect fixed directly on the branch (labeled commit eac5297, comment-only, zero runtime impact): the helper comment stated as present fact a pipeline that does not exist yet (no such workflow in .github/workflows/, no website/articles.json on master, no feed passthrough in src/web/blogfeed.ts — BlogItem has no discussion field at src/web/blogfeed.ts:63-75). Comment inconsistent with code facts; reworded to state the actual client contract and where the data dependency lives.
No kernel/config/storage/wire surface touched. Behavior additions vs master: two header links on every article detail view (EN|中文 pins active immediately; comment button hidden until recorded data lands) — both disclosed in the PR body.
(ai: vllm-qwen/qwen3.8-27b) 第四轮审核结论(新 head 八问:
判定:APPROVE / 可合。我的注释修正 commit |
… to the post's issue thread (#5393 convention: blog:<id> in title)
…n the two detail-header links (they rendered glued); pin the new anchor in web-blog-route
…nvention) instead of issues
… pins The comment button no longer guesses a repo-wide Discussions search URL: it renders only when the feed carries a recorded thread number (item.discussion, written back by the blog pipeline workflow into articles.json) and links straight to /discussions/<n>. A post without a recorded thread shows no button at all. Detail header also gains plain ?lang= links that double as a per-article EN|中文 switch (the pin outranks the stored UI language, #2321).
…as fact — say what the client contract is and where the data dependency lives (review nit, comment-only)
eac5297 to
b78195b
Compare
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.994-master.0d0c0b9 # this exact build
npm install -g billion-context@master # always the newest merged build
|
What
Blog detail page header now carries two small links next to "back":
website/articles.json; the feed passes it through asitem.discussionand the client links straight togithub.com/.../discussions/<n>. No recorded number = no button. The earlier "search all discussions by title token" version is gone — no guessed URLs, no dead threads.?lang=en/?lang=zhlinks on the article itself; the language pin already outranks the stored UI choice (dsh设置位置提供真的设置面板 #2321), so clicking them re-renders the same article in the other language with zero new state code.Behavior contract (pinned in tests/web-blog-route.test.ts)
discussion: 123→ anchor to…/discussions/123, new tab + noopener.discussion→ article renders, no discussion anchor anywhere.Deps / rollout
Server-side passthrough of the
discussionfield lands in the blog fetch-fallbacks PR; the numbers appear in articles.json only after the pipeline workflow runs for a post — until then the button is simply hidden (old posts unaffected). No storage, no config knobs.