Skip to content

docs(ui): stop claiming a .bar-label alias the stylesheet no longer has - #317

Merged
argszero merged 1 commit into
mainfrom
docs/ui-bar-label-alias-claim
Sep 27, 2026
Merged

argszero merged 1 commit into
mainfrom
docs/ui-bar-label-alias-claim

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

The comment above .bar-row .bar-top in ui/css/style.css claimed that the
live stylesheet also answers to .bar-label:

/* .bar-row .bar-top:原型「名称左 / 数值右」的行头(线上 .bar-label 为其别名) */

That is false. git grep -n 'bar-label' over the whole tree returns exactly
one hit — that comment. There is no .bar-label rule, no markup emits the
class, and the design baseline docs/prototype/aitokenpool-console.html does
not carry it either. All three possible consumers (stylesheet rule /
implementation / prototype) are absent, so writing class="bar-label" today
matches nothing at all.

The alias claim is not stale drift in the usual sense: git show 75dcb2c
(#154, the shared component layer) is the commit that removed the name —
it deletes .bar-row .bar-label and adds .bar-row .bar-top, and its message
reads bar-label/bar -> bar-top/bar-track/bar-fill. The sentence asserting an
alias was written by the same commit that dropped the thing it points at.

#154 left two such breadcrumbs. #316 fixed the .stat one
(.stat-card); this is the second. The wording here mirrors the phrasing
#316 landed — name the historical name and say there is no alias rule, instead
of inventing one. (Adding a real .bar-label rule was the rejected alternative
in both cases: the code emits .bar-top, and nothing else consumes
.bar-label.)

Related Issue

None.

Changes

Tests

  • cargo test — 413 passed; 0 failed
  • cargo fmt --check — clean
  • cargo clippy --all-targets -- -D warnings — clean
  • 新增/更新了单元测试(如适用) — not applicable: comment-only change,
    no behaviour to assert.

Checklist

  • 分支命名符合约定 (docs/)
  • Commit message 使用 Conventional Commits 格式
  • 单一职责,改动最小化

The comment above `.bar-row .bar-top` read "(线上 .bar-label 为其别名)" —
i.e. it asserted that writing `class="bar-label"` today still renders.

It does not. `git grep -n 'bar-label'` over the whole tree returns exactly
one hit: that comment. There is no `.bar-label` rule, no markup emits it, and
`docs/prototype/aitokenpool-console.html` does not carry it either — so the
three possible consumers (rule / implementation / prototype) are all absent.

`git show 75dcb2c` (#154, the shared component layer) is where the name was
removed: the same commit deletes `.bar-row .bar-label` and adds
`.bar-row .bar-top`, and its message reads
"bar-label/bar -> bar-top/bar-track/bar-fill". The alias claim was written by
that very commit, so it has been false since it was authored.

#154 left two such breadcrumbs. #316 fixed the `.stat` one; this is the other.
The wording mirrors the phrasing #316 landed for `.stat-card` — name the
historical name and say there is no alias rule, rather than inventing one
(the rejected alternative in both cases: adding a real `.bar-label` rule).

Also bumps `ui/index.html`'s `style.css?v=` token, as every style.css change
in this file's history does.

No behavioural change: one comment plus a cache-bust token.
@argszero

Copy link
Copy Markdown
Owner Author

Self-review (committer; allow_self_merge is enabled for this task).

Claim checked against the tree at 1da8a39:

  • git grep -n 'bar-label' → exactly one hit, the comment being changed. No
    rule, no markup, no prototype occurrence.
  • git show 75dcb2c -- ui/css/style.css → -.bar-row .bar-label,
    +.bar-row .bar-top; commit message: bar-label/bar -> bar-top/bar-track/bar-fill.
    The alias claim was authored by the commit that deleted the alias.
  • app.js:2987 (barRow()) emits class="bar-row" + class="bar-top" — the
    documented producer agrees with the surviving rule, not with the removed name.

Related commit / scope: same commit as #316 (.stat → .stat-card); that
one fixed the first false breadcrumb, this fixes the second. Wording mirrors
what #316 landed, so the two now read consistently.

Verified: cargo test 413/0, cargo fmt --check clean,
cargo clippy --all-targets -- -D warnings clean; both CI jobs green.
Diff is one comment plus the style.css?v= token.

Merging.

@argszero
argszero merged commit e567fae into main Sep 27, 2026
2 checks passed
@argszero
argszero deleted the docs/ui-bar-label-alias-claim branch September 27, 2026 22:23
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