Skip to content

feat(web): set the text size steps from the design - #4021

Merged
hzub merged 4 commits into
mainfrom
visual-fixes-text-sizes
Aug 4, 2026
Merged

feat(web): set the text size steps from the design#4021
hzub merged 4 commits into
mainfrom
visual-fixes-text-sizes

Conversation

@hzub

@hzub hzub commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Related issue

Closes OMNI-2331

Summary

Sets the text size steps from the design:

Use Size Line height Letter spacing
Body text 13px 18px 0
Chat text 13px 18px 0
Caption (sidebar subtitles like Projects / Sessions) 12px 16px 0
  • Body and chat text are both 13/18, so they share the existing text-13 step — its line height was 20px and is now 18px. No separate chat token, since a second 13/18 step would be a duplicate.
  • Adds the 12/16 caption step (text-caption).
  • Letter spacing is 0 across all three, which is already the default, so there's no token for it.

Scope caveat: this defines the steps. text-13 has existing consumers so the 18px line lands immediately, but pointing the chat thread and sidebar subtitles at these steps is follow-up work — that part of OMNI-2331 is not done here.

Stacked on #4020 (rails + backgrounds) — review that one first.

Test Plan

  • npm run test for the touched suites — index.css.test.ts, Sidebar, AppShell, WorkspacePanel, Sidebar.subagentHighlight: 201 passing.
  • prettier --check clean.
  • Manually checked the surfaces already on text-13 (composer footer selectors, slash-command rows) for the tighter line height.

Demo

N/A — type-scale values only.

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

A line-height value change has no behavioral surface to unit-test; the existing suites confirm nothing regressed, and the tighter line was checked by eye on the surfaces already using text-13.

Changelog

Tightened body and chat text to the design's 13/18 type scale.

@github-actions github-actions Bot added the size/S Pull request size: S label Aug 4, 2026
@omnigent-ci

omnigent-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Polly AI Review

Review: feat(web): set the text size steps from the design

Blocking issues

None. The diff is a self-contained set of Tailwind v4 @theme inline token changes in web/src/index.css:

  • --text-13--line-height 20px → 18px (with the accompanying comment updated to match).
  • New --text-caption / --text-caption--line-height (12/16) step.

Both are valid @theme inline declarations that generate the expected utilities (text-13, text-caption). No logic, no contracts, no error paths, no test assertions touched (index.css.test.ts only inspects backdrop-filter glass rules, so it is unaffected).

Security vulnerabilities

None. No code, no dependencies, no lockfile changes, no extras — purely CSS custom-property values.

Non-blocking notes

  • Global side effect on text-13, spot-checked only. The line-height change applies to every existing text-13 consumer (NewChatDialog.tsx, SkillPills.tsx, composer footer/slash-command rows), not just body/chat text. The PR acknowledges this and says it was verified by eye. Worth confirming the denser rows (NewChatDialog list items, the pill chrome) still look right — though SkillPills uses leading-none, so it overrides this line-height and is unaffected regardless.
  • text-caption is a dead token until follow-up. No consumer references it yet (grep finds none); the PR explicitly scopes the actual chat/sidebar re-pointing as follow-up. Defining the step ahead of its consumers is a reasonable stacked-PR pattern, but the token ships unused on this branch.

Summary

Low-risk, correctly-scoped design-token change. The only real-world consequence is the 20→18px line height tightening every current text-13 surface, which the author flagged and manually checked; there is no automated coverage for line-height values (nor is one really warranted). No correctness, contract, or security concerns. Fine to merge once the stacked base (#4020) lands and the tighter line is visually confirmed on the denser text-13 rows.


Automated review by Polly · workflow run

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

UI Snapshot doesn't match the committed baseline.

If this UI change is intentional, update the baseline — each path renders in the same pinned image, so the result matches this gate:

  • Label the PR (recommended): add the update-ui-snapshot label — the bot regenerates the baseline in the pinned image, pushes it back here, and re-runs the checks.
  • Locally with Docker: run tests/e2e_ui/visual/regen_baseline_docker.sh, review the PNG, then commit + push.

Diff PNGs (expected_=baseline, actual_=your render, diff_) are in the run artifact. Full guide: tests/e2e_ui/visual/README.md.

@hzub
hzub force-pushed the visual-fixes-text-sizes branch from 5aa846c to 1ea04bc Compare August 4, 2026 09:31
Base automatically changed from visual-fixes-rails-backgrounds to main August 4, 2026 11:34
@hzub
hzub force-pushed the visual-fixes-text-sizes branch 2 times, most recently from dca8dfd to 2f210a8 Compare August 4, 2026 11:36
Body and chat-thread text are both 13px/18px in the design; the shared
`text-13` step was on a 20px line, so tighten it to 18px. Adds the 12px/16px
caption step used by sidebar section subtitles (Projects, Sessions).

Defines the steps only — switching each surface onto them is follow-up work.

Co-authored-by: Isaac
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
@hzub
hzub force-pushed the visual-fixes-text-sizes branch from 2f210a8 to 7994e1d Compare August 4, 2026 11:38
@hzub hzub added the ui-preview label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

UI Preview for this PR has been removed.

The chat thread hard-coded its own 15px/24px with negative tracking, and
sidebar rows set a size but no line height, so neither matched the design.

- Chat bubbles (user and assistant share the wrapper): 13px/18px, and the
  -0.01em tracking is dropped — the design specifies 0.
- Sidebar body rows: pin the line height to 18/13 of the font size, which was
  previously left to inherit.

Both stay in rem/unitless so the mobile root-font bump and the Appearance
font-size setting keep scaling them. Sidebar section captions were already
12px/16px and are unchanged.

Co-authored-by: Isaac
@hzub hzub added the update-ui-snapshot Used to tell CI that the baseline UI snapshot should be regenerated label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

✅ Regenerated the visual baseline(s) in the pinned Playwright image and pushed to this PR. CI will re-run on the new commit.

@github-actions github-actions Bot removed the update-ui-snapshot Used to tell CI that the baseline UI snapshot should be regenerated label Aug 4, 2026
1.3846 was the 18/13 ratio written as a unitless number — unreadable, and it
took arithmetic to confirm it meant 18px. 1.125rem is 18px directly and
scales the same way, matching how the chat wrapper states it.

Co-authored-by: Isaac
@hzub
hzub merged commit a47a9ee into main Aug 4, 2026
35 checks passed
@hzub
hzub deleted the visual-fixes-text-sizes branch August 4, 2026 12:17
@github-actions github-actions Bot added the no-doc-update Merged PR does not need a docs update label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🏷️ Doc impact: no-doc-update

Pure CSS/typography tweaks (font size and line-height for chat/sidebar text) plus updated visual snapshot baselines; no user-facing surface, integration, or documented behavior changed.

Auto-classified on merge. Set the label manually before merging to override. · run

nicky-isaacs-awoo added a commit to DataDog/omnigent that referenced this pull request Aug 13, 2026
* feat(web): set the text size steps from the design

Body and chat-thread text are both 13px/18px in the design; the shared
`text-13` step was on a 20px line, so tighten it to 18px. Adds the 12px/16px
caption step used by sidebar section subtitles (Projects, Sessions).

Defines the steps only — switching each surface onto them is follow-up work.

Co-authored-by: Isaac
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>

* feat(web): put chat and sidebar text on the design's type scale

The chat thread hard-coded its own 15px/24px with negative tracking, and
sidebar rows set a size but no line height, so neither matched the design.

- Chat bubbles (user and assistant share the wrapper): 13px/18px, and the
  -0.01em tracking is dropped — the design specifies 0.
- Sidebar body rows: pin the line height to 18/13 of the font size, which was
  previously left to inherit.

Both stay in rem/unitless so the mobile root-font bump and the Appearance
font-size setting keep scaling them. Sidebar section captions were already
12px/16px and are unchanged.

Co-authored-by: Isaac

* test(e2e-ui): regenerate visual baselines

* refactor(web): express the sidebar line height in rem

1.3846 was the 18/13 ratio written as a unitless number — unreadable, and it
took arithmetic to confirm it meant 18px. 1.125rem is 18px directly and
scales the same way, matching how the chat wrapper states it.

Co-authored-by: Isaac

---------

Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Co-authored-by: Hubert Zub <hubert.zub@databricks.com>
Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com>

Co-authored-by: Hubert <hubert.zub@gmail.com>
nicky-isaacs-awoo added a commit to DataDog/omnigent that referenced this pull request Aug 13, 2026
* feat(web): set the text size steps from the design

Body and chat-thread text are both 13px/18px in the design; the shared
`text-13` step was on a 20px line, so tighten it to 18px. Adds the 12px/16px
caption step used by sidebar section subtitles (Projects, Sessions).

Defines the steps only — switching each surface onto them is follow-up work.

Co-authored-by: Isaac
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>

* feat(web): put chat and sidebar text on the design's type scale

The chat thread hard-coded its own 15px/24px with negative tracking, and
sidebar rows set a size but no line height, so neither matched the design.

- Chat bubbles (user and assistant share the wrapper): 13px/18px, and the
  -0.01em tracking is dropped — the design specifies 0.
- Sidebar body rows: pin the line height to 18/13 of the font size, which was
  previously left to inherit.

Both stay in rem/unitless so the mobile root-font bump and the Appearance
font-size setting keep scaling them. Sidebar section captions were already
12px/16px and are unchanged.

Co-authored-by: Isaac

* test(e2e-ui): regenerate visual baselines

* refactor(web): express the sidebar line height in rem

1.3846 was the 18/13 ratio written as a unitless number — unreadable, and it
took arithmetic to confirm it meant 18px. 1.125rem is 18px directly and
scales the same way, matching how the chat wrapper states it.

Co-authored-by: Isaac

---------

Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Co-authored-by: Hubert Zub <hubert.zub@databricks.com>
Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com>

Co-authored-by: Hubert <hubert.zub@gmail.com>

Co-authored-by: Nick Isaacs <nick.isaacs@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-doc-update Merged PR does not need a docs update size/S Pull request size: S ui-preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants