Skip to content

[PR] fix: dsh embed panel narrow-width adaptation (compact column set for embed table + button URL moved into tooltip + iframe height follows viewport) | [PR] fix: dsh 嵌入面板窄宽度适配(embed 表格紧凑列集 + 按钮 URL 移入 tooltip + iframe 高度随视口) - #2452

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-09_embed-narrow-panel-fit

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #2448

改了什么

dsh 嵌入面板(#2342/#2321)在窄宿主容器(~400–760px)下的三处不适配,全部 bili 侧修复,不动 dsh:

embed 表格(src/web/styles.ts)

  • .embed 下数据表无条件复用 ≤720px 紧凑列集(藏第 6 列起)。iframe 视口即宿主面板宽度,class-scoped 规则同时覆盖两个坏区间:≤720px(媒体查询已藏列但 min-width:940px 仍强制横向滚动)与 720–940px(什么都不藏、纯挤压);
  • .embed .twide/.tproc table.data { min-width: 0 } 去掉独立页最小宽;
  • embed 下单元格左右内边距收紧(7/9px → 5px)。

面板本体(src/agent/dsh-native-client.ts)

  • iframe 高度固定 640 → "min(640px, 78vh)",按宿主视口自适应(只可能缩小,不会超过 640);
  • 备用按钮 label 打开 Web UI(origin) + nowrap → 纯 打开 Web UI;完整 URL 移入 title tooltip(${origin}/__bili/,与点击目标一致);底部行加 flex-wrap,hint 段 flex: 1 → flex: "1 1 240px"——CJK 文本在 basis 0 下可无限收缩而不触发换行,必须给真实 basis 行才会真正 wrap。

行为变更披露(旧值 → 新值)

  1. embed 形态会话/近期表:可见列数随宽度变化(最多 13 列)→ 固定前 5 列(title/client/proto/upstream/reqs);概览协议表 embed 下 8 列 → 5 列(protocol/sessions/reqs/input/cached,藏 hit/saved/folds)。独立页面与移动端 ≤720px 行为不变(媒体查询未动)。
  2. 备用按钮 label:打开 Web UI(http://origin)(nowrap)→ 打开 Web UI;完整 URL 移入 hover tooltip。点击行为不变(仍打开 ${origin}/__bili/)。
  3. iframe 高度:固定 640px → min(640px, 78vh)(仅当视口高度 < ~820px 时缩小,不放大)。

测试

回归审计(触碰路径的既有行为)

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-09_embed-narrow-panel-fit (84dbe03)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.2664-pr.2452.2e5b9a9

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-pr2452.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 PR review 完成(分支 2026-10-09_embed-narrow-panel-fit @ 84dbe03,单 commit,4 文件 +51/−20)。代码已逐行核对、既有行为逐项清点、定向测试本地复跑全绿。

结构化八问

  1. 是什么问题:dsh 设置页嵌入面板在窄宿主容器(~400–760px)下三处不适配——会话表挤压重叠只能横滚、备用按钮带完整 origin URL 挤占整行、iframe 固定 640px 观感拥挤。
  2. 什么原因导致的:三层叠加——① 数据表按独立页设计(.twide table.data { min-width:940px } + colgroup 固定列宽);② embed 模式零窄宽适配(唯一响应式规则 @media (max-width:720px) 只覆盖 ≤720px 且藏列后 min-width 仍强制横滚,720–940px 区间纯挤压);③ 面板本体按钮 label 内联 origin + nowrap、iframe 高度写死。
  3. 影响范围与严重程度:仅窄容器下的 dsh 设置嵌入面板用户;独立 Web UI 与移动端浏览器不受影响。体验瑕疵级,无功能/数据损失。
  4. 怎么修复的:全部 bili 侧。.embed 下 class-scoped 无条件复用已上线验证的 ≤720px 紧凑列集(藏第 6 列起)+ 去 min-width(iframe 视口即面板宽度,一条规则同时覆盖两个坏区间);origin 移入 tooltip、底部行 flex-wrap + hint 真实 basis;iframe 高度 min(640px, 78vh)。
  5. 是否有回归问题:无。逐项清点结果——
  6. 是否破坏缓存:不涉及(纯前端 UI)。
  7. 是否改了设计方向:没有——embed 模式内的窄宽适配层,架构/数据流不变。
  8. 是否引入了新的配置:没有。

测试有效性:新增断言均为行为级且有牙——iframe 高度精确表达式、tooltip=精确点击目标 URL、label 裸翻译、flexWrap/flex basis 精确值、三条 embed CSS 规则存在性 + 媒体查询归属正则。任一改动回退都会挂。本地复跑:定向测试 18/18 ✅、build ✅(含 dist-import-annotations 门禁)。

顺手小修:PR 描述里「概览协议表 embed 下 8 列 → 4 列」数错——该表 8 列(page.ts:40),藏第 6-8 列后实际可见 5 列(protocol/sessions/reqs/input/cached)。已直接 PATCH 修正 PR body,代码本身无此问题。

CI:e2e-dsh-plugin-lane / e2e-fake-codex / e2e-native-opencode / e2e-codex-persona 均已 success;主 CI run 仍在 in_progress,出结果后补报。

判定:代码与测试通过审查,CI 主 run 转绿即可合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 CI 补报:主 CI run(typecheck + 全量测试 + build)已 completed / success,加上此前已绿的 8 条 e2e/PR-build lane(dsh-plugin-lane、fake-codex、native-opencode、codex-persona、native-pi、pi-codex-ws、native-dsh、real-codex),全部门禁通过。

最终判定:可合并——代码审查、回归清点、定向复跑、CI 全局回归四项齐绿;PR body 的列数笔误已顺手修正。请人工合并。

@ranxianglei ranxianglei changed the title fix: dsh 嵌入面板窄宽度适配(embed 表格紧凑列集 + 按钮 URL 移入 tooltip + iframe 高度随视口) [PR] fix: dsh embed panel narrow-width adaptation (compact column set for embed table + button URL moved into tooltip + iframe height follows viewport) | [PR] fix: dsh 嵌入面板窄宽度适配(embed 表格紧凑列集 + 按钮 URL 移入 tooltip + iframe 高度随视口) Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【bug】dsh 嵌入面板窄宽度下会话表格挤压重叠、面板行拥挤(#2342 嵌入面未做窄容器适配)

1 participant