This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(components): give the record header title a width floor the action tail cannot take - #7288
Merged
Merged
Conversation
…n tail cannot take The `page:header` record header laid its title column and action tail out in a `flex-nowrap` row. The tail is `shrink-0` — correct, buttons must not be squeezed into unreadable slivers — which left the title column, the only flexible item, absorbing the entire width deficit. Measured at a 799px viewport on the showcase Field Zoo record (three labelled `record_header` actions plus the `⋯` and `⟳` chrome): header 687px, tail 641.5px, `gap-4` 16px, leaving the title column 29.5px for an `h1` whose `scrollWidth` was 180px. It rendered as "S…" while the breadcrumb above it still showed the full "Specimen — Full". Two `sm:`-scoped utilities settle the arbitration: `sm:min-w-48` gives the title column a 12rem floor it will not yield, and `sm:flex-wrap` gives the deficit somewhere to go, so the tail drops to its own line rather than overflowing the header. Below `sm` the header is already a column and is untouched. Fixes #7244
…onRefresh` `onRefresh` is not on `RecordContextProviderProps`; `tsc -p tsconfig.test.json` rejected it. The host `refresh` is also the prop that puts the `⟳` chrome in the tail, which is part of what made the measured tail 641.5px wide.
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7244
The mechanism, measured
The
page:headerrecord header laid its title column and action tail out in aflex-nowraprow. The tail isshrink-0— correct, buttons must not be squeezed into unreadable slivers — which left the title column, the only flexible item, absorbing the entire width deficit.Measured in Chromium against the showcase
showcase_field_zoorecord (three labelledrecord_headeractions plus the...and refresh chrome), console dev server proxied to a running showcase backend:S...687 − 641.5 − 16 = 29.5, exactly the width the h1 was left with. The breadcrumb above it still showed the full "Specimen — Full", which is how the blank header gets noticed.
The fix
The producer is
packages/components/src/renderers/layout/containers.tsx(PageHeaderRenderer), notRecordTitleChip.tsx, which the issue pointed at. The chip is the victim: its ownmin-w-0+truncateare right for a chip handed a fair width. Twosm:-scoped utilities settle the arbitration in the header that owns both columns:sm:min-w-48on the title column — a 12rem floor it will not yield, so the deficit has nowhere to go but the tail;sm:flex-wrapon the header — so the deficit has somewhere to go: the tail drops to its own line rather than overflowing.min-w-0is deliberately kept alongside the floor: it is what letstruncateclip at all. The h1 still ellipsises, now at a width you can read a name from.Regression readings (same session, same browser)
flex-wrap: nowrap,min-width: 0px— both utilities inert belowsm; no document overflowThe Account reading reproduces the 217px the issue quoted as the healthy baseline, to the decimal — light-tail headers are untouched.
Tests
packages/components/src/__tests__/page-header-title-width.test.tsx(6 tests). jsdom has no layout engine, so these are class-shape assertions by necessity, and the file says so: they pin the structural precondition that made the collapse possible, with the browser numbers recorded in the docblock. Registration uses the module-scopeimport '../renderers'the siblingpage-header-refreshtest uses, which keeps the file in the lightdomproject instead of growingheavyDomTests.Reverse verification (run from the committed state, per AGENTS.md): reverting
containers.tsxtoorigin/mainwhile keeping the test turned it 3 failed / 3 passed — red exactly on the three assertions that name the fix, green on the three that pin pre-existing behaviour (min-w-0,truncate, tailshrink-0). Predicted before running. The mutation was proven on disk (marker count 2 → 0, blob hash changed) and the restore proven by blob hash equality against the HEAD blob plus an emptygit diff HEAD— not by any exit code.Gate results, at commit
95f6062e8pnpm exec vitest runon the 12-filepage-header-*+page-single-h1family: 12 files / 133 tests passedpnpm exec vitest runon the 13 files outsidecomponentsthat renderpage:header(app-shell, layout, plugin-grid, react): 13 files / 339 tests passedpnpm --filter @object-ui/components type-check(tsc --noEmit && tsc -p tsconfig.test.json): pass. This gate does cover test files — it caught a real error in the new test (onRefreshis not onRecordContextProviderProps), fixed in the second commit.pnpm exec eslint .inpackages/components: exit 0, 0 errors over 442 files.containers.tsxholds 91 warnings both before and after the change (measured by linting the file in both states, with the restore verified by blob hash) — this diff adds no lint findings.node scripts/check-changeset-presence.mjsandnode scripts/check-changeset-no-major.mjs: pass.refreshprop rename: fullpackages/components/suite 224 files / 2046 tests passed.Declared narrowings
Two, both declared rather than silent:
scripts/pm/os-verify-lock.shcould not take the shared verify lock on this host: no usableflock(it is util-linux; stock macOS does not ship it). The wrapper reports this itself and instructs that it be declared here. No serialization guarantee held for these runs, nor for any sibling agent in this container while they ran.packages/components/at95f6062e8were killed by the 10-minute foreground command cap under container contention (exit 143). The delta between the green 2046-test run and final HEAD is only this PR's own test file's prop rename, and that file plus its wholepage-headerfamily plus every out-of-packagepage:headerconsumer were re-run green at95f6062e8. CI runs the full farm regardless.Lint scope evidence: the population (442 files) is eslint's own resolution from its config rather than a guessed file list, the count comes from
--format json, andeslint.config.jsconfigures no type-aware linting (noprojectService/project:), so this diff cannot move the verdict on any file it does not touch.Out of scope
Two sibling record headers share the same width-arbitration shape —
packages/plugin-detail/src/DetailView.tsx:919(no wrap, no floor) andpackages/layout/src/PageHeader.tsx:236(wraps already, still no floor). Identified statically, not measured, and each needs its own browser repro in its own package. Filed separately as #7281 rather than fixed here; that card is not addressed by this PR.Generated by Claude Code