Skip to content

fix(settings): stop the row hairline bending on Astryx Item's corners - #2111

Merged
jackwener merged 1 commit into
mainfrom
pr-fix-row-hairline-5
Aug 4, 2026
Merged

fix(settings): stop the row hairline bending on Astryx Item's corners#2111
jackwener merged 1 commit into
mainfrom
pr-fix-row-hairline-5

Conversation

@jackwener

Copy link
Copy Markdown
Member

Task #143 — owner 报障的「弯曲分隔线 / 两套隔离线」。

根因(运行时实测,不是推断)

探针取计算样式:开放行组里每一个 .astryx-item 都同时是 border-radius: 10px + border-block-start: 1px

Astryx 给 Item 这个圆角是服务它的独立用法 —— 一个 hover 时高亮的圆角芯片。而我们的 hairline 是画在 Item 元素自己身上的 border,border 会跟着自己元素的圆角走,于是分隔线两端向下弯。一条线,两种形状 —— owner 看到的「两套隔离线」就是这个。

修法

.settingsRows / .settingsRowsGroup 内把 Item 圆角归零,这就是全部

edge-to-edge 行组里的行不是芯片:它横贯内容列,所以它的 hover 高亮本来就该横贯。为了保住圆角 hover 去包一层 wrapper,等于把开放行组刚去掉的芯片又装回来 —— 按规格没有这么做。

全仓同族扫描(用通用检测,不是 grep CSS)

写了个探针走 9 个设置页,报告所有同时带横向 border 和圆角的元素。这比搜 CSS 规则可靠 —— 圆角来自 Astryx 主题,源码里根本搜不到。

结果两类宿主:

宿主 判定
.astryx-item 就是这个 bug,命中 关于 / 通用 / 数据 / 记忆 / 语音 / 健康 6 个页面,一条规则全覆盖
kbd 不是。radius 6px + borderBottom 2px,但四角全圆、底部粗边是 Astryx 的键帽效果,故意画的。不动

修完重跑扫描:.astryx-item 条目全部消失,只剩 kbd。

两个虚惊,都核过了

  • .maka-plan-rows 圆角在容器上且 overflow: hidden —— 这正是正确形状
  • .maka-skill-library-item 附近那个圆角属于旁边的状态图标方块,不是带 border 的行

顺带

astryx-item 加进 check-dead-css 的运行时类白名单,紧挨着 astryx-collapsible-trigger —— 同样的理由:Astryx 通过 themeProps 运行时产出,源码里不存在这个 className 字面量。

验证

步骤 结果
npm run build
npm run typecheck
npm run format:check
check-dead-css --check
test:checks
workspace · desktop
workspace · ui
真实 app 前后截图(关于 / 数据) ✅ 分隔线两端笔直到边

已知失败:storage / cli 是 Node v25 node:sqliteruntime-host 是并行 runner 下的 ownership 测试 flake(单独跑必过)。均与本 PR 无关,本 PR 只改一条 CSS 规则 + 一个白名单条目。

@maka-审美专家 请 review。

@jackwener
jackwener force-pushed the pr-fix-row-hairline-5 branch from 2ab0ad3 to ece8540 Compare August 4, 2026 07:41
Owner reported what looked like two different divider systems meeting in
the settings rows: a straight line through the middle with a hook at each
end.

Measured at runtime rather than inferred — every `.astryx-item` in an open
row group computes `border-radius: 10px` and `border-block-start: 1px`.
Astryx ships that radius for Item's standalone use, where the row is a chip
that highlights on hover. Our hairline is a border on the Item itself, and a
border follows its own element's corners, so the divider curved down at both
ends. One line, two shapes.

Zeroing the radius inside `.settingsRows` / `.settingsRowsGroup` is the
whole fix. A row in an edge-to-edge group is not a chip: it spans the
content column, so its hover highlight should span it too. Wrapping the row
to keep rounded hover would reintroduce exactly the chip the open row idiom
removed.

Scanned for the rest of the family the general way instead of grepping CSS:
a probe walked nine settings pages and reported every element carrying a
horizontal border together with a corner radius. Two hosts came back.

  - `.astryx-item` — this bug, on 关于 / 通用 / 数据 / 记忆 / 语音 / 健康.
    One rule covers all six.
  - `kbd` — radius 6px with a 2px bottom border. Not this defect: all four
    corners are rounded and the heavy bottom edge is Astryx's keycap, drawn
    on purpose. Left alone.

Two near-misses worth recording, both checked and both fine:
`.maka-plan-rows` puts its radius on the container and clips with
`overflow: hidden`, which is the correct shape for this; the radius near
`.maka-skill-library-item` belongs to the status glyph beside it, not to
the bordered row.

`astryx-item` joins the check-dead-css runtime-class allow-list next to
`astryx-collapsible-trigger`, for the same reason: Astryx emits it through
themeProps, so it never appears as a className literal in our source.

Verified: build, typecheck, format:check, check-dead-css, test:checks, and
the desktop + ui workspace suites, plus before/after captures of 关于 and
数据 from the real app. storage, cli and runtime-host remain the known
local failures (Node v25 node:sqlite; runtime-host's ownership tests are
flaky under the parallel runner and pass standalone).
@jackwener
jackwener force-pushed the pr-fix-row-hairline-5 branch from ece8540 to a69f0c2 Compare August 4, 2026 07:52
@jackwener
jackwener merged commit 2dd3f28 into main Aug 4, 2026
11 checks passed
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