Skip to content

[PR] DSH: Context tab fills the conversation view | DSH「上下文」标签页铺满会话区 - #4284

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-22_4281-dsh-context-tab-fill
Oct 24, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-22_4281-dsh-context-tab-fill

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #4281

改了什么

仅 conversation.view slot(bili-context 标签页)的渲染布局重排,src/agent/dsh-native-client.ts 的 contextPanel:

位置 旧 新
外层容器 gap:12; padding:"20px 8px"(高度自适应内容) height:100% flex 纵向列,min-height:0/min-width:0,无 padding
iframe height:min(640px,78vh) + border:1px solid rgba(127,127,127,0.4) + borderRadius:8 flex:1; height:100%; min-height:0; border:none,无圆角——撑满剩余高度
「刷新 / 在浏览器打开」 iframe 下方独占一行(flexWrap footer) 顶部一行小按钮(padding:"8px 12px", flex-shrink:0),不再占内容行
各降级提示态 依赖容器 padding 呼吸 内容 wrapper 自带 padding:16(根 padding 已去掉,提示文字不贴边);origin 未知时按钮行不渲染(沿用原判定,degraded 态仍 0 按钮)

设置页(settings.section / plugins.bundle.config)面板完全不动:仍用 EMBED_HEIGHT=min(640px,78vh)、边框、圆角、底部布局。EMBED_HEIGHT 常量保留(设置页仍在用)。

布局与 issue 里本地验证过的小插件配方一致(flex:1; height:100%; border:0),宿主侧铺满前提已由 reporter 实测确认。

行为变更披露

纯 UI 层显示变化(dsh 车道单一 slot),无线协议/数据流/轮询/降级语义变更:

  • 上下文标签页从「固定高度+留白+边框」变为「铺满会话区+无边框」;
  • 两个操作按钮从底部行移到顶部行(功能不变:刷新立即重取 status 并换掉 poll loop;打开 Web UI 仍开 ${origin}/__bili/)。

config surface

不涉及:无新增 env/config/CLI。

测试

tests/dsh-settings-ui.test.ts 上下文标签页用例新增 #4281 布局钉:根 height:100% 且无 padding、iframe border:none/无圆角/flex:1/height:100%、两按钮共享同一顶部行、提示态 wrapper 自带 padding 且 wrapper 内无按钮;原有全部行为钉(pre-flight 前不出 frame、10s 轮询、刷新换 loop、各降级态文案、foreign fallback 拒框、degraded 0 按钮)原样保留并通过。定向跑 node --import tsx --test tests/dsh-settings-ui.test.ts 16/16 绿;typecheck + build 干净;全量回归交 CI。

@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-22_4281-dsh-context-tab-fill (c6bd8c9)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.5091-pr.4284.8bd6f66

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4284.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title DSH: Context tab fills the conversation view | DSH「上下文」标签页铺满会话区 [PR] DSH: Context tab fills the conversation view | DSH「上下文」标签页铺满会话区 Oct 22, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重:不重复 —— 全仓检索(open+closed,关键词 context tab / conversation view / fill / 上下文 / 标签页)无其他同改动工作项;本 PR 是 #4281 的唯一实现入口。

标签: pr(既有)+ dsh、scope/ui、p3 —— dsh 车道单一 slot 的 UI 显示层改动,体验瑕疵级。

独立审核(自己拉分支读 diff,未照抄 issue 侧结论):

  • 代码:改动全部落在 contextPanel 内(src/agent/dsh-native-client.ts:540-688)。新提取的 framed 常量(:620)与原四处条件逐字等价(origin 已知 + embed verdict ok + session id 非空 + 会话归属自己),门控语义不变;iframe 的 src 拼串与改前逐字节一致;刷新按钮仍是 setReloadTick((x) => x + 1)(「换掉 poll loop」的机制原样保留);按钮行渲染条件仍是 origin !== undefined(degraded 态保持 0 按钮);各降级提示分支链(degraded / remote-block / stale / waiting / connecting / nodata)一行未动。
  • 设置页:panel() 面板逐字节未动;EMBED_HEIGHT 常量(:110)保留且仍被 :787 使用——与 PR 描述「设置页完全不动」一致。
  • 测试有效性:新增断言有牙——根 height:100% 且无 padding、iframe border:none/无圆角/flex:1、两按钮共享同一顶部行(对整个按钮集合做 deepEqual,抓得住拆成两行的回归)、提示态 wrapper 自带 padding:16 且内部零按钮(抓得住 degraded 态漏渲染按钮)。原有全部行为钉(pre-flight 前不出 frame、10s 轮询、刷新换 loop、各降级文案、foreign fallback 拒框、degraded 0 按钮)保留。
  • 本地定向验证(PR head c6bd8c9):node --import tsx --test tests/dsh-settings-ui.test.ts 16/16 绿;tsc --noEmit 干净。
  • CI(截至本条消息):static-gates、kernel-guard、version-guard、docs-sync、lane-guard 等静态门禁全绿;ubuntu×node22 三个 test shard 已绿;windows 与 ubuntu×node24 剩余 shard 在跑,无红。
  • 热文件协调:在途 PR [PR] fix: dsh lane: rename + hide switch for the top-bar Context tab (#4237) #4238(Context 标签改名 + 隐藏开关)触碰同样两个文件但区域不重叠——它动 readOrigin 附近(:395)与 slot 注册调用点(:812),本 PR 只动 contextPanel 函数体(:614-687);测试文件里它改的是别的用例 + 文件尾部追加。无文本重叠,后合入者 rebase 即可,无语义冲突。

结构化八问

  1. 是什么问题:DSH 桌面客户端「上下文」标签页原来按设置页式「固定高度卡片」渲染(min(640px,78vh) + 留白 + 边框),而宿主给的会话区其实是整块高度,于是页面下方一大片死区。
  2. 什么原因导致的:布局假设与宿主容器能力不匹配——组件按「卡片」写死了高度和边框,没有利用 conversation.view slot 提供的整区高度。
  3. 影响范围与严重程度:仅 dsh 车道、仅该 slot 显示层;体验瑕疵(p3),不影响任何数据、功能或协议行为。
  4. 怎么修复的:容器改为 height:100% flex 纵向列(min-height/min-width:0、去根 padding),iframe 改 flex:1 无边框铺满剩余高度,两个操作按钮从底部独占行移到顶部细行,各降级提示态的 wrapper 自带 padding:16 保证不贴边。
  5. 是否有回归问题:逐项审过既有行为——pre-flight 门控、10s 轮询节奏、刷新换 poll loop、各降级态文案、foreign-fallback 拒框、degraded 0 按钮、设置页面板、EMBED_HEIGHT 使用点——全部保持;唯一变化是披露过的显示项(固定高+边框 → 铺满无边框;按钮底部行 → 顶部行;提示文字呼吸空间 20px/8px → 16px,纯外观)。无线协议/数据流/轮询/降级语义变更。
  6. 是否破坏缓存:不涉及(未触碰缓存/重试/游标/去重路径)。
  7. 是否改了设计方向:不涉及(同一 slot 内显示层调整,架构/边界/数据流未转向)。
  8. 是否引入新配置:不涉及(无 env/config/CLI 变更)。

判定:可合。 纯显示层单 slot 改动,行为变更披露完整,本地定向验证 + 静态门禁全绿;待剩余 CI test shard 转绿后请自行合并:#4284 (合并权限在人)。CI 最终状态我稍后补一条确认。

@Zonex313

Copy link
Copy Markdown

看过改动了,和 #4281 里提的建议一致:铺满会话区、去掉边框圆角、按钮上移到顶部一行,提示态保留内边距。没有问题,CI 通过后合并即可,谢谢!

Reviewed the diff — it matches what #4281 asked for (fill the view, borderless frame, actions on one top row, padded hint states). LGTM once CI is green. Thanks!

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

收到。CI 当前状态:静态门禁全绿,test shard 已完成 4/6(ubuntu×node22 三片、windows×node22 第一片,全 success),windows×node22 第二片与 ubuntu×node24 第一片还在跑,暂无红。跑完我补一条最终确认;全绿后即可合并(合并权限在人):#4284

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

CI 最终确认:全绿。 全部 test shard(ubuntu×node22 三片、windows×node22 两片、ubuntu×node24 一片)success,静态门禁与各 guard 全 success,门控 e2e 车道按预期 skip,无任何 failure。

至此审查与验证闭环:代码独立审读 ✓、既有行为逐项回归清点 ✓、本地定向测试 16/16 + typecheck ✓、远程 CI 全量绿 ✓。可以合并了(合并权限在人):#4284

提醒一点合并顺序:在途的 #4238(Context 标签改名 + 隐藏开关)与本 PR 触碰同样两个文件但区域不重叠,后合入的一方 rebase 一下即可,无语义冲突。

@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.804-master.5743387 (rolling master tag).

npm install -g billion-context@0.0.804-master.5743387  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DSH: make the top-bar Context tab fill the conversation view | [Feature] DSH:顶部「上下文」标签页显示区域偏小,能否铺满会话区

2 participants