Repository navigation
[PR] feat: panel-embedded blog & articles — render bundled markdown in the panel's own style - #4597
Conversation
|
(ai: vllm/qwen3.8-27b) owner 实测发现「博客点不了」——已修复并补了回归测试(c5b03c8): 根因:client.ts 路由函数的顶层正则白名单 ^#/(overview|config|updates|connect|logs)$ 是独立硬编码的,我加 Blog 页时只更新了 PAGES 数组和 dispatch,漏了这一处——#/blog 匹配不上,静默落回 overview。教训:页面注册有三处联动(PAGES / route 白名单 / dispatch),这种硬编码清单才是漂移源。 验证(这次是真跑过的):新测试 tests/web-blog-route.test.ts 用 vm harness 执行真实 WEB_CLIENT:① hash=#/blog → blog 区显示、overview 隐藏、feed 恰好拉一次、卡片渲染;② #/overview 与 #/logs → 不碰 feed、blog 区保持隐藏。反向验证过:把修复撤掉测试必红,恢复必绿。typecheck + build + dev server 冒烟均复跑通过。 预览 server 已用新构建重启,还是这个地址:http://192.168.10.157:18742/__bili/ → 顶栏「博客」。 |
… in the panel's own style (#4587) Per owner feedback the panel does NOT serve the whole website; it renders a few posts/articles with its own look instead: - src/web/blogfeed.ts: GET /__bili/blog JSON feed (website/blog/posts/*.md + website/articles.json manifest, both EN/ZH) rendered server-side with web/markdown.ts; images ride guarded GET /__bili/blog-assets/<rel> (traversal/encoding/extension gates); fail-soft, no config surface - web/markdown.ts gains image refs (http(s)/panel asset route only) and GFM pipe tables rendered with the panel's .data classes — additive, kernel handoff output unaffected - panel gets a 博客/Blog page (card list, click to expand, bilingual via the existing language toggle which reloads) + nav entry + CSS - package.json files ships only the needed markdown + figures (+~100KB, not the whole site)
…the PAGES list (#4587 owner repro) #/blog fell through the top-level regex (overview|config|updates|connect|logs) and silently stayed on overview. Add blog to the alternation and pin both directions with a real-vm WEB_CLIENT harness test (tests/web-blog-route.test.ts): fix reverted -> red; fix present -> green.
A post with neither a frontmatter date nor a YYYY-MM-DD filename prefix got date = base.slice(0,10) — a garbage string that broke the documented undated-tail ordering. The manifest-article path already validated its date (validDate ? date : ""); apply the same gate to the post fallback. Pinned by a fixture post with no date anywhere.
…#4597) Conflicts (2, both union-of-intent): - src/web/page.ts: keep master's #3536 empty-favicon head change AND keep the full nav (overview/sessions/config/connect/logs/updates/blog). Note: master's #4590 line-rewrite silently dropped the #/updates nav link from page.ts while client.ts still routes #/updates — this merge keeps the link alive on this branch; the master-side loss is reported separately. - CHANGELOG.md: keep both sides' Unreleased/Added entries (master's D5-5 + #4316 layer-3 PR3 blocks, then this PR's blog entry).
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5715-pr.4597.0ed6ea7This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4597.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决,push 完成:merge commit 查重: 不重复(本 PR 即冲突当事方;更早的同名 PR #4588 已按 owner 反馈关闭并由本 PR 取代)。 结构化八问
本地验证(定向):typecheck 干净;tsup build OK(dist-external OK);定向跑 |
ed837ab to
89b0cbb
Compare
…line-rewrite 9addf98 (#3536 favicon fix) rewrote the whole topbar line in src/web/page.ts and dropped the updates <a> as a side effect — the Updates tab stayed routed (PAGES/route()/loadUpdates in client.ts) but became unreachable from the panel UI, and its nav.updates catalog entry turned into the dead-key failure on pristine master (#4599 born-red list). Restoring the anchor at its original position (after logs) fixes the regression at the source and makes the catalog key referenced again. Found while resolving this branch's rebase conflict in the same line.
89b0cbb to
900c09c
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 本 PR 即功能请求 #4587 的实现载体(Closes #4587);open/closed issue/PR 中无其他「面板内置博客」实现——#4588 是「面板接整个官网」的早期方向,已被 owner 否决关闭,与本 PR 机制不同(整站接入 vs 内置离线快照渲染)。 做了什么:独立代码审查(逐文件读 diff + 读改动前既有行为,不复述 issue 结论)→ rebase 到当前 master 八问:
标签: p3 / pr / scope/ui(已就位:功能请求、面板 UI 面、轻微严重度)。 验证:本地定向套件 74/74 绿(web-blogfeed 7 / web-blog-route 2 / web-i18n 10 / web-sessions / web-changelog / web-updates / web-routing / admin-origin / admin-probe);typecheck 干净;build OK(build-info= CI 状态:PR 现可合并(冲突已清)。当前红条全部是 master 收工判定:审查通过,冲突已解,两处小修已带并披露(见第 5 问行为变更)。CI 转绿后即可由人合并(agent 不合并);文章库条目待 #4564 合入 manifest 后自动进 feed,本 PR 无需再动。 |
(ai: vllm-qwen/qwen3.8-27b) CI 状态更正(接上条):head |
(ai: vllm-qwen/qwen3.8-27b) 状态说明(这条是旧评论的重复转发,无新指令):收到的是 floor 3(c5b03c8「博客点不了」修复报告)的重投——该问题当时已处理完毕,线程其后已推进多轮。当前实况核对过:
收工判定:冲突已清、审查已过、无新增动作;等 #4606 合入后做最后一次 rebase/重触发转绿,即可由人合并(agent 不合并)。 |
…Item) — unused-exports gate findings introduced by this PR (#4597)
(ai: vllm-qwen/qwen3.8-27b) unused-exports 红已修(新 head 拉了失败 job(run 40126930026,head ed837ab)日志核实,门禁共报 3 条:
处置(两个独立标注 commit,已推):
本地验证: 八问
收工判定:点名的 unused-exports 应在新 head 转绿;若仍有其他红,均为继承项(LIVE_FILES tripwire 分片,盘点第 2 条,#4606 修复集内),#4606 合入后 rebase/重触发即可,分支侧无需再动。 |
(ai: vllm-qwen/qwen3.8-27b) 本次告警对应的红是「过期红」——分支在两次告警之间被改写又恢复,当前 head 已全绿,无需再推任何提交。 发生了什么(时间线):
当前状态核实(本地 checkout
处置:不推任何东西——我在中间态上准备的两条重复修复提交若推出,只会重新引入被丢弃的谱系、重开竞态,且无新增内容。 八问
收工判定:PR 当前 head |
…r-article pages (#4587 owner feedback) Owner: no collapse/expand cards; dozens of posts must not bloat one page. The index now renders metadata only (date/kind/title rows as hash links); an article's HTML renders only when its #/blog/<slug> page is opened (same pattern as the sessions detail view). Feed fetch stays once-per-process cached. vm-harness tests cover index links, detail render (locale twin), unknown slug degrade, and the not-activating directions.
|
(ai: vllm/qwen3.8-27b) 按 owner 反馈把折叠卡片改成了正经博客路由(5c6cc10):
另:本次推送叠在分支上已有的 4 个评审修复提交之上(date 回退校验、#3536 顶栏锚点还原、去内部导出等),fast-forward 无冲突,一并纳入本 PR。预览 server 已用最终构建重启(http://192.168.10.157:18742/__bili/)。 |
…597-sync2 # Conflicts: # src/web/page.ts
(ai: vllm-qwen/qwen3.8-27b) 第 2 次冲突已解决,push 完成:merge commit 查重: 不重复(本 PR 即冲突当事方)。标签: pr / scope/ui / p3(已就位,不变)。 结构化八问
本地验证(定向):typecheck 干净;build OK(build-info= 收工判定:两次冲突均已解除,分支自上次 rebase 栈以来仅新增这一个 merge commit,CI 转绿后即可由人合并(agent 不合并)。 |
|
(ai: vllm/qwen3.8-27b) PR #4597 更新说明(owner 已确认样式,进入可合并准备):
web 定向套件(web-blog-route / web-blogfeed / web-i18n 共 21 例)+ typecheck + build 均绿。等远端 CI 裁决(#4599)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.834-master.d1b46fc # this exact build
npm install -g billion-context@master # always the newest merged build
|
这是什么(按 owner 反馈重做,#4588 的思路被否后换头)
面板不接入整个官网;而是在面板里加一个自己的「博客 Blog」页,用面板自己的视觉渲染几篇内置的博客与长文(和更新日志区同一套路:markdown 服务端转义优先渲染 → 面板组件),点卡片展开正文,双语跟随面板语言切换,离线可读。
改动
src/web/blogfeed.ts(新):GET /__bili/blogJSON feed——收录 ①website/blog/posts/*.md(+.zh.md双语对)②website/articles.json清单列出的仓库长文(paper 中英文)。服务端用web/markdown.ts(XSS-safe)渲染;图片走独立路由GET /__bili/blog-assets/<rel>——穿越/坏编码/扩展名白名单三重门;目录缺失→空 feed,绝不抛。内存缓存每进程一次(内容只随包更新变)。web/markdown.ts两个增量能力(纯增量,kernel handoff 输出不受影响):图片引用(http(s)/面板资产路由之外的源一律丢弃)+ GFM 管道表格(复用面板.data表格样式)博客/Blog页(PAGES+nav+页壳+i18n zh/en+CSS)、卡片列表点击展开、懒填充正文package.jsonfiles 只收需要的:paper/*.md、paper/figures/*.png(原有)、website/blog/posts、website/articles.json——包体增量 ~100KB,不再整站 1.5MB配置面(§3)
零新键/env/磁盘缓存。内容随自更新前进,GitHub Pages(#4561)仍是永远最新的完整文库;面板这份是离线兜底快照。owner 签核记录在 #4587(含本轮改向说明)。
验证
tests/web-blogfeed.test.ts7 例全绿(排序/双语配对/XSS 逃逸/图片改写与穿越丢弃/表格/资产路由正负双向/坏清单降级/空根空 feed/真树探测);web-i18n 键对齐 10/10Closes #4587