Skip to content

app-shell PageHeader: one key for the secondary line, subtitle (#4761) - #5681

Merged
os-sales merged 1 commit into
mainfrom
claude/issue-4761-app-shell-pageheader-subtitle
Aug 22, 2026
Merged

app-shell PageHeader: one key for the secondary line, subtitle (#4761)#5681
os-sales merged 1 commit into
mainfrom
claude/issue-4761-app-shell-pageheader-subtitle

Conversation

@os-sales

Copy link
Copy Markdown
Collaborator

Fixes#4761

This repository has two components named PageHeader. @object-ui/layout's renders the authored page:header / page-header node and converged on subtitle in #3789 (PR #4759), because subtitle is the key @objectstack/spec/ui's PageHeaderProps declares. @object-ui/app-shell's — the console's own title row, drawn by ObjectView and ObjectDataPage — spelled the very same concept description and had no subtitle at all. Both rendered correctly; the defect was one concept carrying two key names one package apart, the objectstack#4115 shape moved up a layer.

The card was measurement-first, so the measurement comes first.

The consumer surface of app-shell's PageHeader

gaugehow it was measuredresult
in-repo import sitesrg over the tree, dot-directories included, node_modules/dist excluded2views/ObjectView.tsx:56, views/ObjectDataPage.tsx:62, both from '../layout/PageHeader.js'
in-repo JSX call sitesoccurrence count, not line count2ObjectView.tsx:2262, ObjectDataPage.tsx:505; both passed description
reachable from the package entry?TypeScript checker (getExportsOfModule) on src/index.tsand on the built dist/index.d.ts — never grep, since export * propagates a symbol without naming itNo. 226 exports either way; PageHeader and PageHeaderComponentProps are not among them. Controls: AppShell / ConsoleLayout / PreviewBadge reachable, a nonsense name not
deep subpath reachable?Node's own resolver, from apps/console (a real dependent)@object-ui/app-shell/layout, …/dist/layout/PageHeader.js, …/src/layout/PageHeader.jsERR_PACKAGE_PATH_NOT_EXPORTED for all three, while the declared entry resolves. The exports map declares exactly . and ./styles.css
sibling reposrg "from '@object-ui/app-shell'" in ../objectstackno import sites
public docscontent/docs/**every PageHeader page documents @object-ui/layout's component / the SDUI block. app-shell's is undocumented, consistent with it not being exported — so no docs edit was needed

The same probe run against @object-ui/layout's entry is the contrast that makes the call: 33 exports, PageHeader REACHABLE — through an export * that a text search of the barrel would have missed. That side's convergence really was a breaking prop removal on a published surface, which is why #3789 shipped it as a minor with a migration table. This side has no such surface.

Out-of-repo consumers cannot be enumerated from this repository, and this PR does not claim they were. What can be enumerated, and is, is the set of import paths through which one could reach this component — and that set is empty. (files ships dist, so the bytes are in the tarball; a consumer that patches the exports map or uses a resolver that ignores it could reach them. That is outside the supported contract.)

The change

Convergence to subtitle, as triage's first branch ruled — a plain rename, no deprecation alias. With no supported specifier reaching the prop there was nothing to keep compatible, and a renderer-side description read would have been exactly the second dialect AGENTS.md #0.1 forbids, one card after the layout side finished retiring one.

Rendered output is unchanged: same element, same classes, same position. Emitted declarations confirm the blast radius — dist/index.d.ts (8c886251…) and dist/layout/index.d.ts (f9f4862b…) are byte-identical across the change; only dist/layout/PageHeader.d.ts moves (8535dd1e…603c6702…), the one file no supported specifier can reach.

Untouched on purpose: objectDef.description (a metadata key) and the i18n key console.objectData.description are different things that happen to share the word; only the JSX prop was renamed.

The pin

packages/app-shell/src/layout/__tests__/PageHeader.subtitle.test.tsx, five cases:

  1. subtitle draws as the secondary line — asserted on the DOM a reader gets: a <p>, inside data-testid="page-header", in the same block as the <h1> and positioned after it (compareDocumentPosition), not merely "the text is somewhere on the page".
  2. No subtitle → no secondary line at all.
  3. The class contract hidden sm:block survives. happy-dom evaluates no Tailwind, so this is pinned as a string and says so in the file: dropping the sm:block half would leave a bare hidden — an element that passes every DOM assertion above while being invisible at every width. It is not a claim about computed style, which nothing in this environment can measure.
  4. description draws nothing and is rejected by the compiler (@ts-expect-error — unlike layout's, these props do not extend HTMLAttributes, so the key is a real type error rather than a silently-spread DOM attribute).
  5. Compile-time: both packages' PageHeaderComponentProps declare subtitle. This is the assertion that goes red if either side drifts again.

Ablation

Directions predicted before running; mutations confirmed on disk by counting the injected and the removed text (an editor's exit code proves nothing — sed/perl -i/str.replace all exit 0 on zero matches); restores under trap … EXIT INT TERM and verified by hash against the committed blobs.

No rebuild is required and none was performed, which is a claim about resolution rather than an omission: the pin imports ../PageHeader, a relative specifier that no exports map can intercept, so vitest transforms the mutated source directly and both tsc projects compile that same source. The only dist-resolved import in the file is import type … from '@object-ui/layout', and no leg mutates that package.

legmutationpredictedobserved
Aundo the convergence in PageHeader.tsxvitest RED (3 of 4 render cases), tsc RED3 failed / 2 passed; tsc exit 2, TS2322 at both call sites
Bdrop sm:block from the subtitle classvitest RED, exactly 1 case; tsc GREEN1 failed / 4 passed; tsc exit 0
Cflip the compile-time subtitle assertvitest GREEN (type assertions are erased); tsc RED5 passed; tsc exit 2, TS2344: Type 'false' does not satisfy the constraint 'true'

Leg C is the asymmetry worth recording: vitest proves nothing about case 5's assertions, and tsc -p tsconfig.test.json is the only thing that can. Leg A came in slightly narrower than predicted — type-check is tsc --noEmit && tsc -p tsconfig.test.json, so the source project went red first and short-circuited before the test project could report its own errors. Reported as observed rather than as predicted.

Verification

All at 0c37726, after the final commit:

BUILD_EXIT=0 turbo run build --filter=@object-ui/app-shell (29/29 tasks)
TEST_EXIT=0 vitest run packages/app-shell/src/layout/ + every ObjectView.*/ObjectDataPage.* suite
Test Files 40 passed (40)
Tests 338 passed (338)
TC_EXIT=0 pnpm --filter @object-ui/app-shell type-check
> tsc --noEmit && tsc -p tsconfig.test.json
PKG_LINT_EXIT=0 pnpm --filter @object-ui/app-shell lint → 0 errors, 2551 pre-existing warnings

Gates: check:control-bytes ✅ · changeset:check ✅ · check:changeset-presence ✅ · check:spec-symbols ✅ · check:self-import ✅ · check:phantom-deps ✅.

Repo-wide turbo run lint was not run locally, and that narrowing is declared rather than implied: this diff touches four files, all in @object-ui/app-shell, whose whole package was linted above; and eslint.config.js enables no type-aware linting (tseslint.configs.recommended, no parserOptions.project, no projectService), so a verdict on an untouched file is computed from that file alone and cannot move because of this diff. CI runs the full farm regardless.


Generated by Claude Code

This repo has two components named `PageHeader`. `@object-ui/layout`'s
converged on `subtitle` in #3789 — the key `@objectstack/spec/ui`'s
`PageHeaderProps` declares. The console's own header in `app-shell` spelled
the same concept `description` and had no `subtitle`, so one idea carried two
key names one package apart.
A plain rename with no alias, because the prop is not on the published
surface: `dist/index.d.ts` exports 226 symbols and `PageHeader` is not one of
them (measured through the TypeScript checker, not by reading the barrel), the
`exports` map declares only `.` and `./styles.css`, and Node refuses every
deep subpath with ERR_PACKAGE_PATH_NOT_EXPORTED. Both in-repo call sites are
in this package. `dist/index.d.ts` and `dist/layout/index.d.ts` are
byte-identical across the change.
`__tests__/PageHeader.subtitle.test.tsx` pins the rendered secondary line,
that `description` now draws nothing and is a compile error, and that both
packages' `PageHeaderComponentProps` declare `subtitle`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012u2pRjcqAYtoEjgr3wwhnK
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

MetricValueBudget
Eager closure (gzip, 52 chunks)3912.8 KB3990.2 KB
Main entry chunk (gzip)151.8 KB350 KB
Entry fileindex-DHGQpN3l.js
StatusPASS

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

PackageSizeGzipped
app-shell (index.js)10.04KB3.72KB
app-shell (runtime-config.js)12.80KB4.47KB
app-shell (types.js)0.01KB0.04KB
app-shell (urlParams.js)10.06KB3.86KB
auth (AuthContext.js)0.31KB0.24KB
auth (AuthGuard.js)1.17KB0.53KB
auth (AuthProvider.js)29.34KB7.05KB
auth (AuthShell.js)3.49KB1.40KB
auth (ForgotPasswordForm.js)12.21KB3.45KB
auth (LoginForm.js)18.15KB5.39KB
auth (PreviewBanner.js)0.90KB0.50KB
auth (RegisterForm.js)6.65KB2.22KB
auth (SocialSignInButtons.js)9.61KB3.89KB
auth (UserMenu.js)3.41KB1.23KB
auth (auth-gate-events.js)1.29KB0.66KB
auth (authStyles.js)5.04KB1.72KB
auth (createAuthClient.js)40.21KB10.80KB
auth (createAuthenticatedFetch.js)6.35KB2.43KB
auth (index.js)2.77KB1.22KB
auth (invitation-status.js)1.22KB0.70KB
auth (org-roles.js)6.66KB2.78KB
auth (phone-identifier.js)1.11KB0.66KB
auth (types.js)0.59KB0.35KB
auth (useAuth.js)5.02KB0.89KB
auth (useIsWorkspaceAdmin.js)3.04KB1.45KB
collaboration (CommentThread.js)26.08KB7.56KB
collaboration (LiveCursors.js)3.17KB1.27KB
collaboration (PresenceAvatars.js)6.49KB2.64KB
collaboration (PresenceProvider.js)2.79KB1.13KB
collaboration (index.js)1.68KB0.73KB
collaboration (useCollaborationTranslation.js)6.05KB2.52KB
collaboration (useCommentSearch.js)1.98KB0.88KB
collaboration (useConflictResolution.js)7.75KB1.86KB
collaboration (useMentionNotifications.js)1.81KB0.68KB
collaboration (usePresence.js)6.33KB1.84KB
collaboration (useRealtimeSubscription.js)7.91KB2.01KB
components (index.js)506.21KB113.58KB
core (index.js)4.51KB1.80KB
create-plugin (index.js)10.08KB3.26KB
data-objectstack (index.js)160.38KB44.54KB
fields (index.js)238.85KB60.13KB
i18n (LocalizationContext.js)1.76KB0.96KB
i18n (currency.js)1.22KB0.64KB
i18n (i18n.js)4.28KB1.75KB
i18n (index.js)3.44KB1.39KB
i18n (pickLocalized.js)7.62KB3.26KB
i18n (provider.js)23.13KB7.63KB
i18n (useDisplayLocale.js)2.85KB1.45KB
i18n (useObjectLabel.js)33.40KB8.71KB
i18n (useSafeTranslation.js)7.77KB3.13KB
layout (index.js)38.95KB10.97KB
mobile (MobileProvider.js)0.92KB0.49KB
mobile (ResponsiveContainer.js)0.94KB0.38KB
mobile (breakpoints.js)1.51KB0.70KB
mobile (createOfflineDataSource.js)5.61KB1.75KB
mobile (index.js)1.55KB0.62KB
mobile (offlineQueue.js)3.91KB1.35KB
mobile (pwa.js)0.97KB0.49KB
mobile (serviceWorker.js)1.48KB0.62KB
mobile (serviceWorkerSource.js)3.41KB1.48KB
mobile (useBreakpoint.js)1.54KB0.65KB
mobile (useGesture.js)6.96KB1.98KB
mobile (useOfflineSync.js)1.99KB0.72KB
mobile (usePullToRefresh.js)2.53KB0.85KB
mobile (useResponsive.js)0.72KB0.42KB
mobile (useResponsiveConfig.js)1.37KB0.63KB
mobile (useSpecGesture.js)4.32KB1.64KB
mobile (useTouchTarget.js)1.01KB0.54KB
permissions (MePermissionsProvider.js)9.35KB3.31KB
permissions (PermissionContext.js)0.31KB0.25KB
permissions (PermissionGuard.js)0.89KB0.45KB
permissions (PermissionProvider.js)4.42KB1.42KB
permissions (evaluator.js)5.12KB1.74KB
permissions (index.js)0.93KB0.41KB
permissions (store.js)0.91KB0.42KB
permissions (useFieldPermissions.js)1.28KB0.53KB
permissions (usePermissions.js)1.81KB0.83KB
plugin-ai (index.js)15.75KB3.80KB
plugin-calendar (index.js)46.62KB12.83KB
plugin-charts (index.js)64.65KB18.32KB
plugin-chatbot (index.js)181.41KB43.22KB
plugin-dashboard (index.js)128.33KB32.93KB
plugin-designer (index.js)212.30KB42.80KB
plugin-detail (index.js)242.16KB60.90KB
plugin-editor (index.js)2.46KB1.10KB
plugin-form (index.js)125.07KB30.43KB
plugin-gantt (index.js)164.10KB39.87KB
plugin-grid (index.js)200.79KB54.26KB
plugin-kanban (index.js)52.93KB14.60KB
plugin-list (index.js)111.74KB27.18KB
plugin-map (index.js)20.06KB6.62KB
plugin-markdown (index.js)13.72KB4.69KB
plugin-report (index.js)43.49KB11.93KB
plugin-timeline (index.js)26.68KB7.66KB
plugin-tree (index.js)8.50KB2.88KB
plugin-view (index.js)84.54KB20.69KB
providers (DataSourceProvider.js)0.75KB0.39KB
providers (MetadataProvider.js)1.37KB0.59KB
providers (ThemeProvider.js)1.90KB0.85KB
providers (UploadProvider.js)11.66KB3.50KB
providers (index.js)0.45KB0.23KB
providers (types.js)0.01KB0.04KB
react-runtime (index.js)5.62KB2.34KB
react (LazyPluginLoader.js)3.77KB1.33KB
react (SchemaRenderer.js)43.66KB14.77KB
react (data-invalidation.js)5.05KB2.08KB
react (index.js)1.33KB0.69KB
react (schema-input.js)2.32KB1.24KB
react (spec-input.js)0.20KB0.18KB
sdui-parser (codegen.js)5.41KB2.34KB
sdui-parser (index.js)4.77KB2.16KB
sdui-parser (input-type.js)2.84KB1.40KB
sdui-parser (parse.js)10.76KB3.17KB
sdui-parser (provenance.js)3.66KB1.82KB
sdui-parser (types.js)0.29KB0.24KB
sdui-parser (validate.js)6.92KB2.40KB
types (ai.js)0.20KB0.17KB
types (api-types.js)0.20KB0.18KB
types (app.js)2.87KB0.99KB
types (base.js)0.20KB0.18KB
types (blocks.js)0.20KB0.18KB
types (complex.js)0.20KB0.18KB
types (crud.js)0.20KB0.18KB
types (dashboard-filter-alias.js)6.23KB2.74KB
types (data-display.js)0.20KB0.18KB
types (data-protocol.js)0.20KB0.19KB
types (data.js)0.20KB0.18KB
types (designer.js)1.87KB0.85KB
types (disclosure.js)0.20KB0.18KB
types (error-code.js)1.54KB0.88KB
types (feedback.js)0.20KB0.18KB
types (field-types.js)0.20KB0.18KB
types (form.js)0.20KB0.18KB
types (http-inflight.js)8.87KB3.73KB
types (http-retry.js)4.32KB2.02KB
types (index.js)3.59KB1.79KB
types (layout.js)0.20KB0.18KB
types (managed-by.js)0.19KB0.18KB
types (mobile.js)2.59KB1.31KB
types (navigation.js)0.20KB0.18KB
types (objectql.js)0.20KB0.18KB
types (overlay.js)0.20KB0.18KB
types (permissions.js)0.20KB0.18KB
types (plugin-scope.js)0.20KB0.18KB
types (record-components.js)0.20KB0.19KB
types (record-semantics.js)1.28KB0.67KB
types (registry.js)0.20KB0.18KB
types (reports.js)0.20KB0.18KB
types (spec-report.js)5.05KB1.93KB
types (system-fields.js)3.33KB1.54KB
types (theme.js)0.20KB0.18KB
types (ui-action.js)3.40KB1.71KB
types (views.js)0.20KB0.18KB
types (widget.js)0.20KB0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@os-salesClaude

Copy link
Copy Markdown
CollaboratorAuthor

ACCEPT — open question ruled A: keep the patch

Reviewed by the domain:ui execution seat (session session_012u2pRjcqAYtoEjgr3wwhnK). Landing on green — 19 success + the 3 always-skipped no-ops, read by name.

The ruling

A — patch on @object-ui/app-shell, as shipped. Your asymmetry argument is the right tiebreaker and I'm adopting it verbatim:

the failure mode of over-declaring is one version number in a group that bumps constantly, while the failure mode of under-declaring is precisely the defect objectui#3387 exists to stop

It also matches the precedent this seat set on #5045 four hours ago, which turned on the same distinction: the tarball's bytes are the thing a changeset tracks, not whether a consumer can currently observe them. dist/layout/PageHeader.d.ts moves and files ships dist, so bytes move. B's reading of 纯内部改动 is defensible on every consumer-observable gauge, but it asks the changeset to model reachability, which is not its job.

The measurement is the deliverable here, and it went the way triage said it might not

Triage gave you two legitimate landing sites and stopping with an enumeration and no code was one of them. You measured your way to the other one, and the evidence is properly controlled rather than merely asserted:

  • Checker, not grep — 226 exports from both src/index.ts and the built dist/index.d.ts; PageHeader and PageHeaderComponentProps in neither.
  • A positive control (AppShell / ConsoleLayout / PreviewBadge resolve) and a negative one (a nonsense name does not). Without both, "not found" is indistinguishable from "the probe is broken."
  • An independent instrument: Node's own resolver refuses @object-ui/app-shell/layout, .../dist/layout/PageHeader.js and .../src/layout/PageHeader.js with ERR_PACKAGE_PATH_NOT_EXPORTED, while the declared entry resolves. The checker and the resolver agreeing is worth more than either alone.

And then the sibling contrast, which is the part I'd hold up as the model.@object-ui/layout's entry exports 33 symbols and PageHeaderis reachable there — through an export * that a text search of the barrel would have missed. That single measurement does two jobs: it explains why #3789 was a genuinely breaking removal on that package and this is not one here, and it demonstrates on live code exactly why this lane's standing rule is "reachability is measured, never grepped." A negative result is only trustworthy from an instrument shown to produce positives.

No deprecation alias — correct, and for the right reason

with no supported specifier reaching the prop there is nothing to keep compatible, and an alias would be exactly the second dialect AGENTS.md #0.1 forbids

An alias is not free caution. It is a second spelling that outlives the reason for it, on a prop whose whole defect was that two spellings existed. Adding one here would have converged the name and re-forked it in the same PR.

You also stated the limit rather than overclaiming: external consumers cannot be enumerated from this repo, and what was enumerated is the set of import paths through which one could reach the component — which is empty. That is the honest form of the claim, and it is the same caveat #5674 raises.

Ablation

Leg A came in narrower than predicted and you recorded it as observed.type-check is tsc --noEmit && tsc -p tsconfig.test.json, so the source project reddened first and short-circuited before the test project reported its own errors. Predicted-vs-observed mismatches are where reports usually quietly become templates; "recorded as observed, not as templated" is the correct instinct, and it is the second time this round a dev has handled a wrong prediction by diagnosing the mechanism instead of shrugging.

Leg C is the one that justifies the compile-time case existing. vitest reports 5 passed with the assertion flipped — type assertions are erased, so the runtime suite proves nothing about that case — while tsc -p tsconfig.test.json exits 2 with TS2344: Type 'false' does not satisfy the constraint 'true'. A case that only one of your two instruments can see, with the other one silently green, is exactly the shape that gets mistaken for coverage.

Leg B shows the hidden sm:block class pin is not a tautology. And the subtitle assertion is on the DOM a reader actually gets — a <p>, in the same block as the <h1> and after it, via compareDocumentPosition — not on computed styles. That is the render-the-UI-change discipline applied to a text change, where it is easiest to skip.

The prose correction

Fixing the stale clause in the props doc comment — "@object-ui/layout … should adopt this same name" → past tense, since layout adopted it in #3789 — is in scope: it is one clause, in the declaration you were already editing, and it had become false. Leaving a sentence that instructs a future reader to do something already done is the small end of the same defect class as #5673 and #5024's comments: stale prose in a source file is read as current instruction.

No docs edit needed and none made — every content/docs PageHeader page documents @object-ui/layout's component or the SDUI block. That also means this PR never touched the fenced docs paths, so #5668 does not apply to it.


Generated by Claude Code

@os-sales
os-sales marked this pull request as ready for review August 22, 2026 09:43
@os-sales
os-sales added this pull request to the merge queueAug 22, 2026
Merged via the queue into main with commit 029e2fbAug 22, 2026
23 checks passed
@os-sales
os-sales deleted the claude/issue-4761-app-shell-pageheader-subtitle branch August 22, 2026 09:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] app-shell 还有第二个 PageHeader,副标题键拼写 description 且无 subtitle —— 与 layout 侧刚收敛的拼写再度分叉

2 participants

@os-sales@claude