Skip to content

fix(ui): 连接/日志页高度棘轮改用 container h-full(替代 contain:size 回归)#274

Merged
Sway-Chan merged 1 commit into
dododook:mainfrom
Sway-Chan:fix/hero-height-ratchet-h-full
Jul 8, 2026
Merged

fix(ui): 连接/日志页高度棘轮改用 container h-full(替代 contain:size 回归)#274
Sway-Chan merged 1 commit into
dododook:mainfrom
Sway-Chan:fix/hero-height-ratchet-h-full

Conversation

@Sway-Chan

Copy link
Copy Markdown
Collaborator

问题

#273.conns-scroll/.lv-stream 上加 contain:size 引入回归:拖动窗口(高/宽)时内嵌内容(表格/日志行)不再跟随缩放。

根因

main-layout 的 .containermin-h-full(height:auto),内容 intrinsic 高经 flex-basis:0 链上传成为地板 → 卡片缩不回、卡内 overflow-y 失效(高度棘轮)。min-h-0 救不了它——.container 是普通 block 非 flex item。

修复(根因位置)

  • hero 视图(connections/logs)的 .container 改用 h-full(height:100%,对定高 scroller 解析)→ 卡高与内容解耦、纯视口驱动、双向跟窗;卡 min-height 地板超视口时溢出并入页级 scroller 兜底滚动。
  • .conns-scroll/.lv-stream 回退 contain:size(CSS 复原)。
  • home 保持 min-h-full(拓扑卡由 connection-topology[contain:size] 单独定高,最小 blast radius)。
  • .log-viewermin-height:280px 地板(对齐 .conns-card 400px 语义):诊断卡展开+矮窗时 viewer 止步 280px、超出走页级滚动,而非把日志流挤成窄条塌缩。

验证

真机 macOS arm64 双向拖动:窗口缩放正常、内嵌内容跟随(陈先生真机确认)。tsc + eslint 绿。

dododook#273 在 .conns-scroll/.lv-stream 上加 contain:size 引入回归:拖动窗口时
内嵌内容(表格/日志行)不再跟随缩放。改为根因位置的修复。

根因:main-layout 的 .container 用 min-h-full(height:auto),内容 intrinsic
高经 flex-basis:0 链上传成为地板,卡片缩不回、卡内 overflow-y 失效(高度棘轮)。

修复:hero 视图(connections/logs)的 .container 改用 h-full(height:100%,
对定高 scroller 解析),卡高与内容解耦、纯视口驱动、双向跟窗;卡 min-height
地板超视口时溢出并入页级 scroller 兜底滚动。.conns-scroll/.lv-stream 回退
contain:size。home 保持 min-h-full(拓扑卡由 connection-topology 的
[contain:size] 单独定高)。

.log-viewer 加 min-height:280px 地板(对齐 .conns-card 400px 语义):诊断卡
展开+矮窗时 viewer 止步 280px、超出走页级滚动,而非把日志流挤成窄条塌缩。

真机(macOS arm64)双向拖动验证:窗口缩放正常、内嵌内容跟随。
@Sway-Chan Sway-Chan merged commit 898481c into dododook:main Jul 8, 2026
2 checks passed
@Sway-Chan Sway-Chan deleted the fix/hero-height-ratchet-h-full branch July 8, 2026 18:19
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.

1 participant