Skip to content

feat(app): make content font size configurable - #3166

Merged
kodiakhq[bot] merged 6 commits into
mainfrom
cursor/configurable-content-font-size-fc85
Oct 16, 2026
Merged

kodiakhq[bot] merged 6 commits into
mainfrom
cursor/configurable-content-font-size-fc85

Conversation

@MikeShi42

@MikeShi42 MikeShi42 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes HDX-5430.

Why

Log table text is fixed at 12px. The only way to make it bigger today is browser zoom, which scales the nav, filter panel and dropdowns too — so the user loses even more of the vertical space they were trying to reclaim. Users want to scale the content without scaling the chrome.

What

One new user preference, contentFontSize (sm | md | lg), surfaced as a Content font size select in the existing preferences modal under Appearance.

The preference is written once, in pages/_app.tsx, as two CSS custom properties on <html>:

  • --hdx-content-font-size — body text (12 / 14 / 16px)
  • --hdx-content-font-size-compact — secondary chart chrome (11 / 13 / 15px)

Content surfaces read the vars instead of hardcoding px:

Surface File
Search results row table styles/LogTable.module.scss, components/DBTable/TableHeader.tsx
Dashboard table tile HDXMultiSeriesTableChart.{tsx,module.scss}
Generic data tables components/Table.module.scss
Expanded row / side panel JSON components/HyperJson.module.scss
Chart legends and tooltips styles/HDXLineChart.module.scss, styles/app.scss

Recharts axes take a numeric fontSize prop rather than CSS, so those three charts (HDXMultiSeriesTimeChart, DBBarChart, DBHistogramChart) read the resolved number from a useContentFontSize() hook.

sm is the default and reproduces every size that was hardcoded before, so existing users see no change. The stored field is optional and the hook runs it through the isContentFontSize guard, so a blob written before the field existed — or one carrying a size we no longer ship — falls back to sm instead of crashing.

Out of scope, per the issue: chrome, navigation, headers, dropdowns, buttons and modal text.

Fixed px allocations that had to scale too

Several layout constants are really character budgets measured at the old 11/12px fonts, so they clip once the text grows. Each is now multiplied by the same scale ratio the hook exposes, which keeps the budget constant at every setting:

  • log table default column widths (getResolvedColumnSize) — a width the user dragged to is left untouched
  • Y_AXIS_WIDTH in HDXMultiSeriesTimeChart, and its three other consumers (singlePointBarSize, both annotation plotWidth calculations). This is what AXIS_CHAR_BUDGET depends on, so that constant now documents the relationship.
  • DBBarChart's y-axis width and BAR_LABEL_AXIS_HEIGHT (rotated x-labels need more vertical room)
  • DBHistogramChart's y-axis width

Not done

DBHeatmapChart sizes its uPlot axes with a font shorthand string ('12px IBM Plex Mono, monospace') that uPlot measures imperatively, so it can't read a CSS var and doesn't fit the same pattern. Left at 12px rather than growing the diff.

Making DBBarChart's x-axis allocation responsive to measured height (raised by a reviewer for short dashboard tiles) is answered in-thread — it's a layout change that applies at every font size, so it belongs in its own PR.

Testing

  • src/__tests__/useContentFontSize.test.tsx: default scale, fallback for preferences stored before the field existed, loading a saved non-default preference, fallback for an unrecognized stored size, and resolution + persistence of a change.
  • make ci-lint and make ci-unit clean on the merge commit (4526 app tests); E2E green on CI.
  • Manual: dev stack seeded with log data, stepped Small → Medium → Large → Small and inspected the table, histogram axes and row side panel. Re-verified after merging main.

content_font_size_small_medium_large_scales_table_charts_and_side_panel.mp4

Small (default, unchanged) vs large. The left nav, search bar, time picker and Run button are identical in both, while at large the histogram's y-axis gutter is wider (so the tick label still renders in full) and the timestamp column is wide enough for the complete timestamp:

Search page at the small content font size

Search page at the large content font size, with a widened y-axis gutter and full timestamps

Row side panel JSON at large:

Row side panel JSON attributes at the large content font size

The preferences modal after merging main, with the new upstream "Row click" setting alongside this one:

Preferences modal showing Content font size under Appearance and the upstream Row click setting

Linear Issue: HDX-5430

Open in Web Open in Cursor 

Log/trace table text was fixed at 12px, so the only way to make it bigger
was browser zoom, which scales the chrome too. Add a contentFontSize user
preference (sm/md/lg, defaulting to the current sizes) that writes
--hdx-content-font-size and --hdx-content-font-size-compact on <html>, and
read those vars from the content surfaces: search results table, data
tables, expanded row JSON, and chart axes, legends and tooltips.

Co-authored-by: Mike Shi <mike@hyperdx.io>
@changeset-bot

changeset-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5a6ee92

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Minor
@hyperdx/api Minor
@hyperdx/otel-collector Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Oct 16, 2026 5:38pm UTC
hyperdx-storybook Ready Ready Preview Oct 16, 2026 5:38pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge within its agreed scope, with no new blocking findings.

Summary

Adds a saved content font-size setting while keeping Small as the default.

  • People can choose Small, Medium, or Large content text.
  • Content tables, JSON, and chart legends use the chosen text size.
  • Chart labels and default log-table widths scale with content text.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Preferences select] --> B[Saved user preference]
  B --> C[useContentFontSize]
  C --> D[Root CSS variables]
  C --> E[Chart tick sizes and layout widths]
  D --> F[Tables, JSON, legends, and tooltips]
Loading

Reviews (5) · Last reviewed commit: "Merge branch 'main' into cursor/configur..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 429 passed • 1 skipped • 1346s

Status Count
✅ Passed 429
❌ Failed 0
⚠️ Flaky 2
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

At the large content font size the timestamp and service columns
truncated, because their default widths are px constants sized for 12px
text. Scale the defaults by the font ratio; widths the user dragged to
are left untouched.

Co-authored-by: Mike Shi <mike@hyperdx.io>
Review feedback. The y-axis width and the bar chart's rotated-label
height are character budgets measured at the default tick font, so at
medium/large the widest tick labels clipped. Scale them by the same
ratio, and narrow the preference Select's value with a type guard
instead of asserting it.

Co-authored-by: Mike Shi <mike@hyperdx.io>
@MikeShi42
MikeShi42 marked this pull request as ready for review September 22, 2026 06:20
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Diff size: 259 production lines changed (Tier 2 max: < 250)

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Production files changed: 16
  • Production lines changed: 259 (+ 110 in test files, excluded from tier calculation)
  • Branch: cursor/configurable-content-font-size-fc85
  • Author: MikeShi42

To override this classification, remove the review/tier-3 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions github-actions Bot added the review/tier-3 Standard — full human review required label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

Configurable content font-size preference (sm/md/lg) scaling tables, expanded-row JSON, and chart axis/legend/tooltip sizes via a new useContentFontSize() hook, CSS custom properties, and scaled fixed-px layout budgets. sm is the default and reproduces every previously-hardcoded size, so default users are unaffected. The core feature is sound and the sm-preserves-everything approach is verified correct. No P0/P1 ship-blockers.

✅ No critical issues found.

🟡 P2 — recommended

  • packages/app/src/config/fonts.ts:74 — isContentFontSize uses the in operator, which walks the prototype chain, so a stored value of toString/constructor/valueOf passes the guard; CONTENT_FONT_SIZES["toString"] then resolves to an inherited function, yielding undefined base/compact and a NaN scale that propagates to undefinedpx CSS vars and NaN chart widths — defeating the exact stale/corrupt-localStorage case the guard was written to handle (not reachable from the UI Select, which only emits sm/md/lg).
    • Fix: switch the guard to an own-property check such as Object.hasOwn(CONTENT_FONT_SIZES, value) (or Object.prototype.hasOwnProperty.call), and add a fallback test seeding contentFontSize: 'toString'.
    • correctness, testing, kieran-typescript, previous-comments
  • packages/app/src/components/DBBarChart.tsx:80 — barLabelAxisHeight and yAxisWidth are multiplied by contentFontScale with no awareness of container height, so at lg on a short dashboard tile (~158px) the enlarged rotated x-axis band can consume the drawable area and hide bars even though data is present; DBHistogramChart scales its y-axis the same way.
    • Fix: clamp the scaled axis allocation against available height or reserve a minimum plot area and let labels overflow/truncate; if deferred, file it as a tracked follow-up rather than leaving it silent.
    • previous-comments
  • packages/app/styles/app.scss:37 — the SCSS var defaults (--hdx-content-font-size: 12px / -compact: 11px) must equal CONTENT_FONT_SIZES.sm in config/fonts.ts:66, but the only tie between them is a comment; if the sm scale changes, the TS test breaks without pointing at the SCSS file, which silently keeps the old default and shows default users a wrong-size flash until the _app.tsx effect overwrites the vars.
    • Fix: add a test that reads app.scss and asserts the two default values match CONTENT_FONT_SIZES.sm, or generate the SCSS block from the TS constant.
    • maintainability
🔵 P3 nitpicks (4)
  • packages/app/src/config/fonts.ts:77 — OPTIONS_CONTENT_FONT_SIZE is inferred as { label: string; value: string }[], so its values are not tied to the ContentFontSize union and can silently drift from CONTENT_FONT_SIZES keys without a compiler error.
    • Fix: annotate with satisfies { label: string; value: ContentFontSize }[], or derive the options from CONTENT_FONT_SIZES keys.
  • packages/app/src/components/DBHistogramChart.tsx:33 — three module-local constants share the name Y_AXIS_WIDTH with divergent values (DBBarChart 40, DBHistogramChart 35, HDXMultiSeriesTimeChart 40), inviting a maintainer to "consolidate the duplicate 40s" and break the histogram.
    • Fix: rename the per-chart constants to disambiguate (e.g. HISTOGRAM_Y_AXIS_WIDTH, BAR_Y_AXIS_WIDTH) to make their independence explicit.
  • packages/app/pages/_app.tsx:55 — the destructure { base: contentFontSize, ... } binds the local name contentFontSize to a px number, while the same hook also exposes a contentFontSize field that is the 'sm'|'md'|'lg' string key (used in UserPreferencesModal), so a reader grepping contentFontSize meets two types under one name.
    • Fix: rename the local bindings to contentFontSizePx / contentFontSizePxCompact.
    • maintainability, kieran-typescript
  • packages/app/src/useUserPreferences.tsx:313 — adding useContentFontSize pushes the file from 272 to 313 lines, past the repo's documented 300-line soft limit (AGENTS.md, code_style.md).
    • Fix: extract the hook into a sibling module (e.g. useContentFontSize.ts) if the team enforces the limit; author's call.

Reviewers (8): correctness, testing, maintainability, project-standards, kieran-typescript, previous-comments, agent-native, learnings-researcher.

Testing gaps:

  • No test seeds a prototype-chain key (e.g. toString) — the existing xl case only exercises an own-absent key and misses the in-guard defect above.
  • The scale math in the actual consumers (getResolvedColumnSize, yAxisWidth, barLabelAxisHeight) is untested at md/lg; extracting getResolvedColumnSize as a pure export would let CI pin the scaled widths and confirm no NaN propagation.
  • The md/lg assertions re-derive expected values from CONTENT_FONT_SIZES itself, so a wrong size→value mapping would change both sides together and still pass; pin base/compact/scale to literal numbers.
  • No test covers the _app.tsx effect that writes the --hdx-content-font-size CSS vars (the single write point for every CSS surface).

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

} = useUserPreferences();

const size = contentFontSize ?? DEFAULT_CONTENT_FONT_SIZE;
const { base, compact } = CONTENT_FONT_SIZES[size];

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.

🟠 major — useContentFontSize destructures CONTENT_FONT_SIZES[size] without validating the persisted value, so a bad stored value white-screens the app

contentFontSize comes straight out of localStorage — isUserPreferences (line 51) only validates colorMode, so any other string survives the read. With {"colorMode":"dark","contentFontSize":"xl"} in hdx-user-preferences (a rollback from a future build that adds a size, or a hand-edited/corrupt entry), CONTENT_FONT_SIZES['xl'] is undefined and destructuring { base, compact } throws inside AppContent (pages/_app.tsx:98) — the whole app fails to render and the user can't reach the preferences modal to undo it. Apply the guard that already exists: const size = contentFontSize && isContentFontSize(contentFontSize) ? contentFontSize : DEFAULT_CONTENT_FONT_SIZE; (same read-time validation pattern as isValidThemeName in packages/app/src/theme/index.ts:225).

Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond

<Group wrap="nowrap" gap={0} align="center">
{!header.column.getCanSort() ? (
<Text truncate="end" size="xs" flex="1">
<Text truncate="end" fz="var(--hdx-content-font-size)" flex="1">

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.

🔵 minor — Swapping size="xs" for fz drops Mantine's xs line-height, changing header rows at the default setting

Mantine's Text size prop sets both --text-fz and --text-lh; fz sets only the font size, so --text-lh falls back to var(--mantine-line-height) (1.55) instead of var(--mantine-line-height-xs) (1.4). At the default sm the header text line box grows 16.8px → 18.6px, which visibly raises the dashboard table tile's header row (HDXMultiSeriesTableChart.module.scss .tableHeader sets no height) — contradicting "nothing changes until you opt in". Keep size="xs" alongside fz="var(--hdx-content-font-size)" (the inline fz still wins for font-size) on both lines 39 and 51.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

return value in CONTENT_FONT_SIZES;
}

export const OPTIONS_CONTENT_FONT_SIZE = [

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.

🔵 minor — OPTIONS_CONTENT_FONT_SIZE re-enumerates the ContentFontSize union with no compile-time link

The union is now listed in three places (ContentFontSize, CONTENT_FONT_SIZES, OPTIONS_CONTENT_FONT_SIZE), and only the first two are tied together by Record<>. Adding a fourth size to CONTENT_FONT_SIZES compiles clean but never appears in the preferences Select. Derive the options from the record — e.g. a Record<ContentFontSize, string> label map mapped over Object.keys(CONTENT_FONT_SIZES) — so both stay exhaustive by construction.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

expect(
JSON.parse(window.localStorage.getItem(STORAGE_KEY) ?? '{}'),
).toEqual(expect.objectContaining({ contentFontSize: 'lg' }));
});

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.

🔵 minor — The px-budget scaling — the part most likely to regress — has no test

The only new test covers the hook's resolved numbers; nothing exercises getResolvedColumnSize's scaled() defaults or the derived axis widths, so a future edit that drops contentFontScale from columnSizeOpts or reverts width={yAxisWidth} stays green. packages/app/src/components/__tests__/DBRowTable.test.tsx already has a "Column width persistence" harness asserting th inline widths — add a case there rendering with contentFontSize: 'lg' and asserting the timestamp column is 227px while a stored width stays untouched.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 critical or 🟠 major in code this PR adds or changes: fix before asking for review.
  • 🔵 minor in code this PR changes: your call. Fix if small, otherwise reply.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    severity. Reply with one sentence; if it is critical, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

5 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 5 minor

2 posted as inline comment(s) on the changed lines. 3 listed below.

Findings outside the changed lines

3 minor
  • 🔵 packages/app/src/config/fonts.ts:659 — isContentFontSize uses in, so inherited keys such as 'toString' or 'constructor' pass the guard → Use Object.prototype.hasOwnProperty.call(CONTENT_FONT_SIZES, value), the same check utils.ts:583 uses. As written, a stored contentFontSize: 'toString' passes the guard. useContentFontSize then reads a Function from CONTENT_FONT_SIZES, so base and compact are undefined, scale is NaN, and the CSS vars get set to 'undefinedpx'. That is exactly the stale-localStorage case the guard says it handles. Add a test for it next to the 'xl' fallback test.
  • 🔵 packages/app/src/useUserPreferences.tsx:721 — Every consumer repeats the same Math.round(px * scale) scaling → Have useContentFontSize return a scalePx(px) helper, or a ready-made axis tick style. Right now HDXMultiSeriesTimeChart, DBBarChart (twice), DBHistogramChart and the local scaled in DBRowTable.getResolvedColumnSize each do the multiply-and-round themselves. Each chart also rebuilds the same { fontSize, fontFamily: 'IBM Plex Mono, monospace' } tick object, so the rounding rule is defined in five places.
  • 🔵 packages/app/src/components/PropertyComparisonChart.tsx:216 — PropertyComparisonChart axis ticks stay at a hardcoded 11px, so this chart ignores the new setting → The PR says chart axes follow the preference, but this recharts chart in the row side panel still uses tick={{ fontSize: 11 }} and a fixed fontSize: 11 popover. Read compact from useContentFontSize() here, as MemoChart does, or list this chart under 'Not done' next to DBHeatmapChart.

Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides.

Comment thread packages/app/src/useUserPreferences.tsx Outdated
userPreferences: { contentFontSize },
} = useUserPreferences();

const size = contentFontSize ?? DEFAULT_CONTENT_FONT_SIZE;

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.

Could this fall back to the default when the stored value isn't a known size?

Would reusing the type guard cover it?

const size =
  contentFontSize && isContentFontSize(contentFontSize)
    ? contentFontSize
    : DEFAULT_CONTENT_FONT_SIZE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good catch, and yes — fixed in 38e9883 with exactly the guard you suggested.

It was worse than a silent fallback: CONTENT_FONT_SIZES['xl'] is undefined, so the very next line destructuring { base, compact } off it threw a TypeError and took the whole app down. I confirmed that by reverting the guard with the new test in place:

✕ falls back to the default when the stored size is not one we ship
  TypeError: Cannot destructure property 'base' of 'CONTENT_FONT_SIZES[size]' as it is undefined.

The test seeds localStorage with contentFontSize: 'xl' and asserts we land back on sm. I left a short comment on the guard noting why it isn't redundant against the declared type — the value is untrusted because it round-trips through localStorage, and migrateUserPreferences only validates colorMode, so anything else passes straight through.

cursoragent and others added 2 commits October 9, 2026 06:10
… size

Review feedback. The size comes from localStorage, so a hand-edited or
stale blob can carry a value we do not ship; indexing CONTENT_FONT_SIZES
with it returned undefined and the destructure threw. Reuse the
isContentFontSize guard and pin it with a test.

Co-authored-by: Mike Shi <mike@hyperdx.io>
Conflicts were all additive except the time chart's axis-width reasoning,
which main refactored into AXIS_CHAR_BUDGET / axisLabelBudget. Took main's
version there and moved the note about the gutter scaling with the content
font size onto AXIS_CHAR_BUDGET, since that constant is the thing whose
validity depends on it.

Co-authored-by: Mike Shi <mike@hyperdx.io>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 125 in total (1.69%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

}
}, [effectiveFont]);

useEffect(() => {

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.

🔵 minor — Users with a non-default size see a flash of small text and a column reflow on every load

userPreferencesAtom is an atomWithStorage with no getOnInit, and the vars are only written in a post-mount useEffect. So the first paint always uses 12px and scale: 1, then the text and the default column widths jump. SystemColorSchemeScript in useUserPreferences.tsx already solves this for color mode by reading hdx-user-preferences in an inline script before React runs. Have it set --hdx-content-font-size and --hdx-content-font-size-compact from contentFontSize too.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

border: 1px solid var(--color-border);
border-radius: 2px;
font-size: 11px;
font-size: var(--hdx-content-font-size-compact);

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.

🔵 minor — Chart tooltip font now scales but its fixed 280px width does not

.chartTooltip keeps width: 280px. That is a character budget measured at 11px, the same kind of allocation the PR scales for the y-axis gutters and column widths. At lg (15px) about 27% fewer characters fit, so series names and values wrap or clip. Scale the width with the font, e.g. calc(280px * var(--hdx-content-font-size-compact) / 11px) is not valid CSS, so expose a unitless scale var or use em (about 25.5em).

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

Comment thread packages/app/src/config/fonts.ts Resolved
// Content density, overridden on <html> from the `contentFontSize` user
// preference. These defaults must match CONTENT_FONT_SIZES.sm so the
// pre-hydration render matches the default preference.
--hdx-content-font-size: 12px;

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.

🔵 minor — The default content sizes are hardcoded twice: in app.scss and in CONTENT_FONT_SIZES.sm

The :root 12px/11px defaults have to match CONTENT_FONT_SIZES.sm (config/fonts.ts), and only a comment keeps them in sync. The unit test pins the TS values but not the SCSS. One fix: write a data-content-font-size attribute on <html> and define all three size pairs in SCSS keyed on it. Then the TS table only holds the numbers that recharts needs, and a test can check the two against each other.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

const columnId = opts.aliasMap?.[column] ? `"${column}"` : column;
const stored = opts.columnSizeStorage[columnId];
if (stored != null) return stored;
const scaled = (px: number) => Math.round(px * opts.contentFontScale);

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.

🔵 minor — No test for the column-width scaling, including the rule that dragged widths are never scaled

useContentFontSize.test.tsx covers only the hook. Add a DBRowTable.test.tsx case that sets contentFontSize: 'lg' and checks two things: default column widths (170/115/160) come out scaled, and a width stored in columnSizeStorage comes back unchanged. If someone later moves the stored != null early return below the scaling, the current tests would still pass.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

@kodiakhq
kodiakhq Bot merged commit 1773c11 into main Oct 16, 2026
30 checks passed
@kodiakhq
kodiakhq Bot deleted the cursor/configurable-content-font-size-fc85 branch October 16, 2026 17:59

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — 5a6ee923 Deployed Oct 16, 2026 by vercel[bot]
Preview – hyperdx-storybook — 5a6ee923 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants