Repository navigation
[PR] dsh panel: show the raw probe/status error (copyable) instead of spinning on connecting | dsh面板连不上时显示原始报错并可复制 - #4461
ranxianglei wants to merge 1 commit into
Conversation
…eadout Closes #3693 A failing embed-route probe or Context-tab status poll was swallowed silently: the settings panel and the Context tab spun on the connecting hint forever with zero evidence of what actually failed. Remote-access users (page served from a LAN IP while the panel binds to server loopback) could neither see nor copy the underlying network error. Every failure state now renders the raw engine message plus the failed URL in a selectable block with an explicit copy action (navigator.clipboard.writeText with an execCommand fallback, since LAN-http pages are not secure contexts). Probe errors are transient by design: never cached, retried on every poll tick until a verdict lands.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5356-pr.4461.07c38c0This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4461.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 已拉取分支核对代码并确认 CI。这是本 daemon 之前提交的 PR(提交作者 查重:不重复——本 PR 是 #3693 的收尾,与 #3816(远程 blocked 面)同域但机制不同:#3816 修「远程页面对 loopback 地址结构性不可达」的引导文案,#3693 修「所有失败面吞掉底层报错、无证据可复制」。两者叠加后远程面既有跳转按钮又有报错复制。 结构化八问
CI / 基线:基线干净(merge-base == 当前 master tip,0 落后、无需 rebase),无冲突( 代码审查结论:两文件(+355/-17, 判定:等那 12 个 in_progress 的 test 分片转绿即可合入(静态门已全绿、无冲突、无 rebase 需要)。合并权在你(human-only)。我这边无需改码;测试分片跑完我再补一条确认。 |
What & why
Closes #3693
When the bili proxy was unreachable, the dsh settings panel and the Context tab swallowed every failure: they spun on 「正在连接 bili 代理…」/ the generic degraded hint forever, showing zero evidence of what actually failed. For remote-access users (page served from a LAN IP while the panel binds to server loopback — the reporter's exact posture) there was no way to see or copy the underlying network error for a support report.
Now every failure state renders the raw engine message plus the failed URL in a selectable block with an explicit copy button:
probeEmbedRoute's previously-silent.catchnow reports{ verdict: undefined, error }— transient by design, never cached, retried on every poll tick until a verdict lands..catchcaptured nothing; it now surfaces the raw error under the degraded hint, and non-ok HTTP answers read asHTTP <status>failures instead of being parsed blind.navigator.clipboard.writeTextwith a legacyexecCommandfallback — required because LAN-http pages are NOT secure contexts (nonavigator.clipboard) and that is exactly where remote-access users sit. Label flips to 「已复制」for 2s on success.Behavior changes (old → new)
res.json()blindly ⇒ now treated as a failure carrying its status code. Edge-only delta: an error body shaped like our contract JSON can no longer be mistaken for data.probe_error/copy/copiedadded to both zh+en dicts (parity pinned by the existing dict test).No config surface change, no wire change, no kernel/pi-subagents touch, no version bump.
Tests
tests/dsh-settings-ui.test.ts: local-posture probe failure shows the verbatim error + working copy (primary clipboard path); execCommand fallback whennavigator.clipboardis absent; Context-tab status-poll failure surfaced with copy.no such management endpointafter profile auto-update #3100), zero-button pure-degraded case unchanged ([Bug] Inconsistent host-side context statistics after compression in dsh plugin mode (ref: dsh-context#173) | [Bug] dsh 插件模式压缩后宿主侧上下文统计不一致(引用 dsh-context#173) #3862).