Repository navigation
[PR] #3862: Context tab embeds the web UI's own session page - #4086
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4888-pr.4086.c2b1f77This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4086.tgz
npm install -g packageInstall instructions are refreshed on each push. |
CI failure triage (ubuntu-22 shards 1 & 3)All three distinct failing tests are the pre-existing SMT-solver environment red, not regressions from this diff:
This diff only touches `src/agent/dsh-native-client.ts` + its test pin; it cannot affect wire serialization or view-latch verification. Same solver-red family as master baseline run 39437368167 (see #3971 evidence comment). Everything my change gates is green in-CI and locally: tsc 0, rewritten #3862 pin ✔, issue3862-context-view + dsh-panel-embed-cors 7/7 ✔, gen-config-docs + unused-exports clean, build ✓. |
…-drawing a card The dsh conversation.view tab shipped in #3886 as a native re-rendering of the proxy's contextView payload (categories bar + anchor + event trail). It works, but the same data now lives in TWO places: the web UI session page (compression tree, fold ledger, switch attribution) and this second hand-drawn card that must be kept in lockstep with the kernel's buildStatusPanel categorization and the cache-ledger fold trail forever. Per owner direction, embed the web UI's own session page instead: ?embed=1&lang=..&theme=..#/session/<id> in the shared EMBED_HEIGHT frame — one place for the data, zero duplicated rendering to maintain. - session id resolved from the SAME status URL the /acp command uses server-side (/__bili/plugin/status sessionId field), so the tab can never frame a different session than the lane; string-nonempty guard, older or foreign builds answering without one fall through to honest hints - full pre-flight discipline shared with the settings panel(): probeOrigin (+per-origin embed verdict cache, mid-session re-binds re-probe), #2559 host-theme pin into the frame URL, #3816 remote-blocked notice extracted to renderRemoteBlock() so fix text/relay snippet/jump target cannot drift between the two placements - state tree stays honest end-to-end: degraded (no proxy) / remote-blocked / stale-build (frozen pre-embed proxy) / waiting-first-request / connecting / not-yet; chain-advisory reads as not-yet, never as 'restart fixes it'; first paint before verdict+id never frames anything - i18n: card-only keys removed from both dictionaries (EN/ZH sets stay equal); remaining keys are the shared set - tests: the #3862 pin is rewritten for the embedded face — happy path asserts the exact iframe src/title, 10s single poller, refresh click re-polls without duplicating the interval, unmount cancels; every degraded sub-state pinned (waiting / chain-advisory-not-stale / stale-route / unparseable-body→degraded / all-throws→degraded)
4c65391 to
b877ebd
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 本 PR 是 #3886(新增 dsh 「上下文」tab)的后续,按 owner 指示把 tab 从原生卡片重渲改为嵌入 web UI 自己的会话页;标题里的 "#3862" 指原始已关闭 bug(dsh 压缩后上下文统计不一致),是命名来源而非重复报告。检索 open/closed issue+PR 无同主题在途条目。 结构化八问
CI 诊断(关键发现)+ 已采取行动 推送时 6 个 test shard 中 5 个红。拉了 job 日志逐个核对:失败全部集中在 verif 求解器测试( 判定:代码审查通过(八问如上,无拦下项);rebased head b877ebd 的 CI 转绿后即可由人工合并。CI 结果出来我再跟一条确认。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.707-master.b5d7b22 # this exact build
npm install -g billion-context@master # always the newest merged build
|
What / why
Follow-up to #3886 (which added the dsh client 「上下文」/Context tab as a native re-rendering of the proxy's
contextViewpayload). Per owner direction, the tab now embeds the web UI's OWN session page instead of drawing a second card:One place for the data — compression tree, fold ledger and switch attribution stay in the frame; no hand-drawn duplicate of the kernel categorization or cache-ledger trail to keep in lockstep forever. Net −182 lines.
How it works
GET /__bili/plugin/status?conversationId=dsh&fallback=latest(identical form to the server-side/acpcommand) and reads itssessionIdfield — the tab can never frame a different session than the dsh lane. String-nonempty guard: older/foreign builds answering without one fall through to honest hints, never an empty frame.panel():probeOrigin(fast→slow phases) now drives the per-origin embed verdict cache (#3100) too, mid-session re-binds re-probe automatically;#2559host-theme pin is passed into the frame URL; the#3816remote-blocked notice was extracted to a module-levelrenderRemoteBlock()so fix text, relay snippet and jump target cannot drift between the two placements.chain-advisoryanswers read as not-yet and are NEVER rendered as a "restart fixes it" claim. First paint before verdict+id frames nothing.Tests
The existing #3862 pin in
tests/dsh-settings-ui.test.tsis rewritten for the embedded face: exact iframesrc/titleon happy path, single 10 s poller (delta-counted fetches), refresh click re-polls without duplicating the interval, unmount cancels the loop, and every degraded sub-state pinned (pre-first-request / chain-advisory-not-stale / stale-route / unparseable-body→degraded / all-throws→degraded-no-buttons). Server-sideissue3862-context-view.test.tsuntouched and green (the endpoint still servescontextViewfor the web UI itself).Verification (local, base master 2e13a70)
tsc --noEmit: 0 errorsdsh-settings-ui.test.ts: my pin ✔; remaining failure set byte-identical to clean master in this environment (#1590index-inject ×2,#1809/bili/origin×3 — pre-existing local env reds, verified via stash)issue3862-context-view.test.ts+dsh-panel-embed-cors.test.ts: 7/7 ✔tools/gen-config-docs.mjs generate✓ (238 keys, EN/ZH equal),scripts/check-unused-exports.mjs✓ clean (5 waived)npm run build: ✓