Skip to content

fix(ui): single-language settings copy, snap editorial tail, migrate MB-Web type to tokens#136

Merged
helebest merged 3 commits into
mainfrom
ui-polish-082
Jun 27, 2026
Merged

fix(ui): single-language settings copy, snap editorial tail, migrate MB-Web type to tokens#136
helebest merged 3 commits into
mainfrom
ui-polish-082

Conversation

@helebest

@helebest helebest commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What

A second-pass /impeccable critique (general product-UI lens, 30/40) of the live
app surfaced three threads beyond the small-text band the 0.8.1 pass closed. The
deterministic detector confirmed the main app is otherwise clean — its styles.css
side-tab / layout-transition hits are markdown blockquote borders and
progress-bar width animations (conventional, not slop); the real drift is all in
mb.css.

Fixed

  • Settings 外观 copy — single-language chrome. The zh-CN subtitle read "System
    会跟随操作系统偏好" — the English enum label System inside Chinese chrome. Now
    references the localized 跟随系统 label.
  • Editorial / responsive heading tail snapped onto the ladder (the tail the 0.8.1
    review explicitly deferred): .wiki-preview-card h2 (19 → title 17),
    .import-done-banner__headline (20 → title 17), .wisdom-popover__title h2
    (15.5 → body 15), responsive .metric-card__value (24 / 26 → 22, the reader-h2
    editorial step).

Changed

  • MB-Web type migrated onto the role tokens. src/mb/mb.css dropped its
    self-contained half-step scale (11.5 / 12.5 / 13.5 / 14.5 …): all 60 font-size
    declarations now resolve to --type-* (label / body-sm / body / title) by nearest
    role — the app-wide styles.css import (main.tsx) makes the tokens available
    inside the MB-Web tree. The one kept literal is .mb-r-title (22px), the
    paper-reader title (reader-h2 editorial step). MB-Web radii / colors stay a
    tracked follow-up (DESIGN.md §3); only type was migrated here.

Verification

  • npm run verify green (901 unit + 53 e2e / 2 skip, coverage 75/66/75/77, build);
    check:bundle within budget (CSS 30.4 / 35 KB gzip).
  • Browser-verified MB-Web across the library, reader (paper selected), and notes
    views — title 22 serif, body 15 prose, meta 13, labels 11; no overflow or crowding.
  • The no UI text renders off the role scale e2e invariant still passes (the editorial
    tail lives in popovers/banners/breakpoints the passive sweep doesn't reach; MB-Web is
    a separate shell not in the workbench sweep — covered by the inventory + browser pass).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Updated the appearance setting text so “Follow system” now clearly explains it switches with your operating system’s light/dark mode.
  • Bug Fixes

    • Improved typography consistency across the app by aligning several headings, cards, dialogs, and reader sections to the shared text scale.
    • Fixed mixed-language appearance copy in the settings page.
  • Documentation

    • Refreshed the changelog and design notes to reflect the latest release and typography rules.

…MB-Web type to tokens

A second-pass /impeccable critique (general product-UI lens, 30/40) found three
threads beyond the small-text band the 0.8.1 pass closed:

- Settings 外观 subtitle leaked the English enum label "System" into Chinese chrome
  ("System 会跟随操作系统偏好") — a single-language-chrome violation. Reworded to
  reference the localized 跟随系统 label.
- The editorial/responsive heading tail the 0.8.1 review explicitly deferred is now
  on the ladder: .wiki-preview-card h2 (19 → title 17), .import-done-banner__headline
  (20 → title 17), .wisdom-popover__title h2 (15.5 → body 15), responsive
  .metric-card__value downscales (24/26 → 22, the reader-h2 editorial step).
- MB-Web (src/mb/mb.css) migrated off its self-contained half-step scale
  (11.5/12.5/13.5/14.5 …): all 60 font-size declarations now resolve to the --type-*
  role tokens (label/body-sm/body/title) by nearest role — the global styles.css
  import makes the tokens available inside the MB-Web tree. The one kept literal is
  .mb-r-title (22px), the paper-reader title (reader-h2 editorial step). MB-Web
  radii/colors stay a tracked follow-up; only type was migrated here.

The deterministic detector confirmed the main app is otherwise clean (its styles.css
side-tab/layout-transition hits are blockquote borders and progress-bar width
animations — conventional, not slop). Browser-verified MB-Web across the library,
reader, and notes views; npm run verify green (901 unit + 53 e2e), bundle within
budget (CSS 30.4/35 KB).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e41da3c3-b588-493c-ab13-fb389d2c20ea

📥 Commits

Reviewing files that changed from the base of the PR and between 3937b5b and 2bee03e.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • DESIGN.md
  • package.json
  • src/i18n.ts
  • src/mb/mb.css
  • src/styles.css
  • tests/e2e/typography.spec.ts

📝 Walkthrough

Walkthrough

Adds a 0.8.2 release entry, bumps the package version, updates one Simplified Chinese settings string, revises type-role documentation, and converts multiple app and MB-Web font sizes to shared type-token values.

Changes

Typography role migration and release notes

Layer / File(s) Summary
Release entry and settings copy
CHANGELOG.md, package.json, src/i18n.ts
Adds the 0.8.2 changelog entry, bumps the package version, and updates the Simplified Chinese appearance-detail string.
Type-role docs and shared app typography
DESIGN.md, src/styles.css, tests/e2e/typography.spec.ts
Revises the type-role guidance, updates shared app heading and metric sizes to tokens, and changes the typography sweep comment.
MB-Web shell, library, and reader text
src/mb/mb.css
Moves MB-Web shell, library, reader, and status typography onto shared --type-* values.
MB-Web Q&A, notes, and editor text
src/mb/mb.css
Updates MB-Web Q&A, message, note, quote, annotation, and editor text sizes to shared type roles.
MB-Web popovers, dialogs, and feedback
src/mb/mb.css
Moves MB-Web popover, dialog, toast, sync, error, and mobile tab typography to shared type roles.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • OpenDIKW/dikw-web#134: Also updates src/mb/mb.css, src/styles.css, and tests/e2e/typography.spec.ts around the same typography role-ladder sweep.
  • OpenDIKW/dikw-web#135: Continues the shared typography token and off-scale text cleanup across the app styles and sweep commentary.
  • OpenDIKW/dikw-web#125: Introduces the shared --type-* token foundation used by this PR’s stylesheet updates.

Poem

I hopped through the styles by moonbeam light,
from px to tokens, tidy and right.
The carrots of type all lined up in view,
and MB-Web sang, “--type-* will do!” 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the three main changes: localized settings copy, typography alignment, and MB-Web token migration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ui-polish-082

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a625e2fc5f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread CHANGELOG.md
## [Unreleased]

## [0.8.1] - 2026-06-27
## [0.8.2] - 2026-06-27

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the 0.8.1 changelog section

This replaces the former 0.8.1 heading instead of adding a new 0.8.2 section above it, so the old 0.8.1 notes remain inside the 0.8.2 section. The release job in .github/workflows/ci.yml reads package.json.version and runs node scripts/changelog-notes.mjs "$VERSION" for gh release create; with this changelog, the 0.8.2 release notes include the previous 0.8.1 small-text entry, while 0.8.1 now falls back to Release 0.8.1.. Please reinsert a ## [0.8.1] heading before the existing small-text notes.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 2bee03e. Reinserted the ## [0.8.1] heading; verified node scripts/changelog-notes.mjs 0.8.2 now emits only the 0.8.2 section and 0.8.1 resolves to the small-text notes.

helebest and others added 2 commits June 27, 2026 17:22
…count

Independent review (verdict: CSS/i18n changes functionally sound, no P0/P1) found two
doc-accuracy nits:

- The `no UI text renders off the role scale` test comment still listed the editorial
  sizes (preview-card 19, done-banner 20, wisdom-popover 15.5, responsive metric 24/26)
  as a deferred tail "out of this pass" — but this PR snapped exactly those. Replace the
  stale list with the still-true mechanical rationale (passive sweep doesn't open
  modals/popovers or @media breakpoints).
- CHANGELOG said "all 60 font-size declarations" then "one kept literal" — it's 59 of 60.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CodeRabbit caught a real bug: the 0.8.2 entry replaced the `## [0.8.1]` heading
instead of inserting above it, so the 0.8.1 small-text notes sat headingless inside
the 0.8.2 section. `scripts/changelog-notes.mjs` (used by the release job for
`gh release create`) would then ship the 0.8.1 content as part of the 0.8.2 release
notes, and 0.8.1 would fall back to "Release 0.8.1." Reinserted the heading;
verified `changelog-notes.mjs 0.8.2` now emits only the 0.8.2 section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@helebest helebest merged commit b12804b into main Jun 27, 2026
13 of 14 checks passed
@helebest helebest deleted the ui-polish-082 branch June 27, 2026 09:40
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