Skip to content

fix(webui): stop the session rail row actions from covering the session name - #8

Merged
UncleMoc merged 4 commits into
mainfrom
fix/rail-row-actions-occlude-session-title
Nov 10, 2026
Merged

UncleMoc merged 4 commits into
mainfrom
fix/rail-row-actions-occlude-session-title

Conversation

@stevenjj33

@stevenjj33 stevenjj33 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Change

The session rail's inline row actions (pin / archive / more) covered the session
name instead of sitting beside it. In Safari the effect is total: hovering a
session row left three floating buttons on an otherwise empty line, with the
session title gone.

Two CSS rules combined to produce it.

1. Every nested rail container reserved a 17px scrollbar slot. The base layer
sets scrollbar-gutter: stable on html, body, div, main, section, aside, nav, ul, ol, pre, textarea, select, so each container nested inside the rail reserved
room for a scrollbar it never draws. The rail nests five levels (rail -> project
sections -> project disclosure -> session list -> row), which cost 5 x 17px =
85px and squeezed the session list down to 123px. The three inline row
actions are 90px wide on their own, so no room was left for a title.

2. The title reserve was a hard cut, not a truncation. On hover the title was
clipped with clip-path: inset(0 88px 0 0) to make room for those buttons.
clip-path removes the pixels it covers, so a title narrower than the reserve
is erased entirely. With a 59px title ("飞书会话") and an 88px reserve, the name
disappeared and only the buttons were left.

The fix keeps the design intent (the actions appear on hover, the title yields to
them) and changes two mechanisms:

  • The rail's nested containers now opt out of the reserved gutter with
    scrollbar-gutter: auto - the same opt-out the plugin, transcript and
    workspace panels already use. These levels never scroll, so the slot was pure
    loss.
  • The title yields with padding-right instead of clip-path, so the text ends
    in an ellipsis rather than being cut away. The reserved width is unchanged
    (88px for the three project-row actions, 28px for the single child-row action).

No behaviour, action set or copy changed: pin and archive stay inline, the
session context menu is untouched, and no action was removed. (The session
context menu has no 置顶 entry, so the inline pin button had to stay.)

One deliberate consequence: the reserved space now appears immediately instead of
animating. The old reserve rode on clip-path, and .webui-motion-feedback-clip
animates clip-path; padding-right is a layout property, and feature stylesheets
may not declare transitions (the motion ownership rule keeps timing in the shared
layer), so the swap is instant. The row actions themselves still fade in - that
transition lives on .webui-motion-feedback-opacity, which is untouched.

Measured

Measured in WebKit - the engine Safari uses - against the running WebUI:

before after
session list width 123px 208px
session row width 121px 206px
title width covered by the row actions 48-56px 0px

Verified in Safari itself as well: hovering a session row now shows the full
title with the three actions beside it, and the relative-time label stays on the
rows that are not hovered.

Validation

  • Checks run and results (include the revision/profile where relevant):
    • Geometry measured before and after in WKWebView (WebKit) and in Chromium at a
      1320px viewport, against the running WebUI 0.1.8 build.
    • Verified by hand in Safari 27.2 on macOS 27.2: reloaded the page, hovered a
      session row, and confirmed the title stays readable and the three actions no
      longer overlap it.
    • The change is CSS-only, in packages/webui/src/client/features/sessions/ui/sessions.css.
  • Performance: basic. No runtime path changed; the change only removes reserved
    space from containers that never scroll.
  • NOT RUN, platform limitations and live-service boundaries:
    pnpm typecheck:webui, pnpm check:webui-*, pnpm build:webui,
    pnpm test:webui, pnpm test:webui-browser and pnpm test:webui-package
    were not run locally: this checkout was made through the GitHub API instead of
    a full clone, so the pnpm toolchain was never installed on this machine. CI
    runs all of them on this PR. Windows and Linux rendering of the same rows was
    not checked locally either.

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Added/removed source files were reviewed before regenerating release/public-source.json; new tests are declared in test/vitest-suites.json where applicable. - no source files were added or removed, and no test was added.
  • Shared English/Chinese documentation and capability/verification records are updated where applicable. Mock/offline results are not described as live-service acceptance. - no documentation change is needed for a CSS defect fix; the numbers above come from the running WebUI, not from a mock.

Maintainer handoff

Publication scope or license changes (if any): none.

Shared-source port: not needed.


中文说明(问题与修法)

侧栏会话行的三个行内按钮(置顶 / 归档 / 更多)会盖住会话名。Safari 下最明显:
鼠标悬停一行时,只剩三个按钮浮在一条空行上,标题整条不见了。

两个规则叠加导致:

  1. 每层嵌套容器各留了一条 17px 滚动条槽。 基线层给
    html/body/div/main/section/aside/nav/ul/... 一律设了
    scrollbar-gutter: stable,侧栏嵌套 5 层 = 吃掉 85px,会话列表被压到
    123px;而三个行内按钮本身就有 90px 宽,标题根本没有位置。
  2. 让位用的是 clip-path: inset(0 88px 0 0) 硬裁剪。 clip 会把覆盖到的像素
    直接删掉,标题比让位宽度窄就会被整条抹掉。59px 的标题对上 88px 的让位,
    于是名字消失,只剩按钮。

(一处取舍:让位宽度现在改为立即生效,不再有动画 —— 原来让位是搭 clip-path 的动画,
而 padding-right 属于布局属性,特性样式表按 motion 归属规则不能自己声明 transition。
按钮本身的淡入没动,它走的是 .webui-motion-feedback-opacity。)

修法保持原设计意图(按钮 hover 出现、标题让位),只换两个机制:

  • 这几层容器改用 scrollbar-gutter: auto(仓库里 plugins / transcript / workspace
    面板本来就是这么写的);这几层本来就不会滚动,那条槽是纯浪费。
  • 标题让位从 clip-path 改成 padding-right,文字以省略号收尾,而不是被裁没。
    让位宽度不变(项目会话行 88px、子会话行 28px)。

行为、按钮集合、文案都没变:置顶和归档仍然行内显示,菜单没动,没有删任何功能
(会话右键菜单里本来就没有「置顶」,所以行内的置顶按钮必须保留)。

实测(WebKit,Safari 同款引擎,对着跑起来的 WebUI 量的):

修复前 修复后
会话列表宽 123px 208px
会话行宽 121px 206px
标题被按钮压住的宽度 48-56px 0px

也在真实 Safari 27.2(macOS 27.2)里手工验过:悬停时标题完整、三个按钮在右侧
自己的位置,没被 hover 的行照常显示相对时间。

@stevenjj33 stevenjj33 added the bug Something isn't working label Nov 9, 2026
@stevenjj33
stevenjj33 force-pushed the fix/rail-row-actions-occlude-session-title branch from c0316b2 to 28d26a3 Compare November 10, 2026 04:43
…on name

The inline row actions (pin / archive / more) were painted over the session
title instead of sitting beside it. Hovering a row in Safari left three
floating buttons on an otherwise empty line, with the name gone.

Two rules combined to produce it:

* The base layer sets `scrollbar-gutter: stable` on html/body/div/main/
  section/aside/nav/ul/..., so every nested container in the rail reserved a
  17px slot for a scrollbar it never draws. The rail nests five levels
  (rail -> project sections -> project disclosure -> session list -> row),
  which cost 5 x 17px = 85px and squeezed the session list down to 123px,
  while the three inline actions are 90px wide on their own.

* The title yielded to the actions with `clip-path: inset(0 88px 0 0)`,
  which removes the pixels it covers: a title narrower than the reserve was
  erased entirely, so a 59px name disappeared and only the buttons were
  left.

The rail's nested containers now opt out of the reserved gutter with
`scrollbar-gutter: auto`, the way the plugin, transcript and workspace
panels already do, and the title yields with `padding-right` so the text
ends in an ellipsis instead of being cut away. The reserved width is
unchanged, and no action, copy or behaviour changes.
The rail's session titles now reserve the room for the row actions with padding instead of a clip, so the shared clip transition had nothing left to animate. The reservation moves with a padding transition instead, carried by a shared motion class because a feature's own stylesheet may not declare one.

The rail-pin cases now assert the reservation they claim: the room is padding, the title ends short of the actions, and a short title keeps its words instead of being cut away.
…anges

The rail's session rows now reserve the row actions' room with padding, and the nested rail containers no longer each claim a scrollbar slot, so the shell, the workspace panel and the dialogs that sit over it all render differently. Every baseline is re-recorded on the platform that owns it.
The fixture serves the committed faces as web fonts, so the typeface is the same on every platform. The pixels are not: each platform rasterizes the same outlines its own way, and even two machines of one platform differ by a handful, which is why the baselines are per-platform and the eight-pixel budget is tight. The README's claim that a comparison produces the same result on any host was the opposite of what the gate does.
@stevenjj33
stevenjj33 force-pushed the fix/rail-row-actions-occlude-session-title branch from 8c0587d to 704ebe1 Compare November 10, 2026 05:57
@UncleMoc
UncleMoc merged commit 3274bfd into main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants