Skip to content

Improve chat typography readability (CL-7397) - #572

Merged
TheGreatAxios merged 3 commits into
corbitsdev:mainfrom
pratikbuilds:cl-548-chat-typography-readability
Sep 4, 2026
Merged

TheGreatAxios merged 3 commits into
corbitsdev:mainfrom
pratikbuilds:cl-548-chat-typography-readability

Conversation

@pratikbuilds

@pratikbuilds pratikbuilds commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Keep primary chat messages and composer text at a 16px minimum.
  • Use the shared base-size and medium-weight typography tokens.
  • Preserve message metadata, the existing 72ch measure, and surrounding layout.

Before / after

Before

Workbench chat typography before

After

Workbench chat typography after

Impact

  • Message text increases from about 14.1px to 16px (about 14%).
  • Composer text increases from about 13.1px to 16px (about 22%).
  • The 16px composer minimum avoids mobile Safari focus zoom.
  • The shared base-size token can raise both surfaces if the design scale grows later.

Validation

  • Greybeard approach review: approved the 16px minimum plus shared-token approach.
  • cd packages/chat-ui && bun test — 843 passed, 0 failed.
  • bun run check — passed. DB-gated suites emitted their expected local skip banners because DATABASE_URL is unset; CI runs those in PostgreSQL jobs.
  • Production web bundle rebuilt successfully with the updated CSS.

Closes #548

Fixes CL-7397

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bumps .chat-bubble-text and .chat-composer-input to an exact 16px / 500 weight; scope is tightly limited to those two rules and CI is green (840 chat-ui tests, full bun run check).

Must fix

None.

Consider

  • Both changed rules hardcode 16px and font-weight: 500 as literals. react-ui's theme already exposes --text-base: 1rem (16px) and --font-weight-medium: 500 (see apps/web/dist/assets/react-ui-*.css) — using those tokens instead of raw literals would keep this in line with DESIGN.md's "never hardcode... add the token to react-ui if it doesn't exist" posture, even though that line is written about color specifically. Minor, since the surrounding file is already raw-rem throughout.
  • 16px (not 1rem) is a deliberate choice per the PR body to guarantee no mobile Safari input-zoom regardless of root font-size — that's a reasonable call for the composer, but worth confirming it's still fine for .chat-bubble-text, which isn't a form control and has no zoom-avoidance requirement; 1rem would have matched the rest of the file's unit convention there without changing the rendered size.
  • No screenshot/before-after image is attached to the PR body itself (it says the comparison lives on the linked issue, CL-548) — for a pure typography/readability change, having the before/after in the PR too would make it reviewable without cross-referencing Linear.

Verified

  • Diff is minimal and scoped to packages/chat-ui/src/styles.css (message bubble text + composer input), no unrelated churn.
  • Weight 500 is actually loaded for Red Hat Display (apps/web/index.html requests Red+Hat+Display:ital,wght@0,400;0,500;...), so this isn't a synthesized/faux-bold weight.
  • Message metadata (.chat-bubble-sender at 0.875rem/640) and the 72ch measure are untouched, so sender/timestamp hierarchy and reading width are preserved as claimed.
  • CI (build-test, db-suites, e2e, isolation, lint, structural, typecheck) all pass on this PR.

@pratikbuilds

Copy link
Copy Markdown
Contributor Author

Addressed the review suggestions:

  • Both surfaces now use --text-base and --font-weight-medium.
  • The size is max(var(--text-base), 16px). Workbench sets the root to 15px, so plain 1rem would render at 15px and partially regress the approved readability change. The composer needs the 16px floor for mobile Safari focus behavior; message text keeps the same floor as a deliberate readability choice.
  • The before/after images are now included directly in the PR description.

Validation: 843 chat UI tests passed, the production web bundle rebuilt, and the full bun run check gate passed.

@TheGreatAxios TheGreatAxios changed the title Improve chat typography readability Improve chat typography readability (CL-7397) Sep 3, 2026
@TheGreatAxios
TheGreatAxios merged commit 0c2ee96 into corbitsdev:main Sep 4, 2026
7 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.

Increase chat message and composer typography for readability

2 participants