Repository navigation
fix(types,layout,app-shell,runner)!: the console renders an app's branding.logo; the top-level logo spelling retires (objectui#10827) - #10849
Conversation
… the console; retire the top-level logo spelling
UnifiedSidebar, the console's mounted sidebar, now reads the active app's
branding.logo and shows it as a header image. An app without a logo keeps
today's sidebar. Nothing mounted rendered the key before: its only reader
was the never-mounted AppSidebar.
The logo has one spelling. AppComponentSchema.logo is `never` on the TS
face and refused by name on the zod mirror ("Did you mean logo -> branding?",
the spec's own answer); wizardDraftToAppSchema stops copying the logo to the
top level; AppSchemaRenderer and the runner's LayoutRenderer read
branding.logo as an image URL and take an icon name from `icon`.
Claude-Session: https://claude.ai/code/session_01MCg3z5cGrV51xEddpGcxEY
Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ 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
|
Contract reviewServed-tier: 93/93 Read: the card thread on objectui#10827 (triage ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Fixes #10827
Clause-②: no
Related cards, referenced only: objectstack-ai/objectstack#20146 (its ledger row
app.branding.logoflipsplannedtoliveat a later.objectui-shapin; that is the PM's step and it is not done here) and objectui#10842 (the other four top-level keyswizardDraftToAppSchemawrites).What this does
The console renders
branding.logo.UnifiedSidebar, the sidebarConsoleLayoutmounts, reads the active app'sbranding.logoand draws it as an image in a header at the top of the sidebar. The alt text is the app's label, computed the same way as theAppSwitcherpill. An app without a logo gets no header, so its sidebar is byte-for-byte today's sidebar. That is the control. The header is drawn in app context only: on Home, the sidebar'sactiveAppfalls back to the FIRST app, whose logo is not the screen's. This is the chrome's only reader of the key.One spelling.
@objectstack/specdeclares the app logo only asAppBrandingSchema.logo(a URL). ItsAppSchemaalias table does not fold a top-levellogo. It refuses it: measured,AppSchema.safeParse({ name, label, logo })answersunrecognized_keyswith "Did you meanlogo→branding?". objectui's second spelling is retired at once, with no dual-read window:@object-ui/types:AppComponentSchema.logois nownever. The zod mirror refuses a top-levellogoby name throughaliasKeyRefusal, with the same "Did you meanlogo→branding?" lead as the spec. It is a named refusal rather than a deletion because the node is.passthrough(), and a deleted key would be KEPT without any error.wizardDraftToAppSchemano longer copiesdraft.branding.logoto the top level.@object-ui/layout:AppSchemaRenderer's default sidebar header readsschema.branding?.logoand draws any non-empty value as an image. The old read drew an image only for values starting withhttp, so the objectstack todo example's site-relative/assets/todo-logo.pngwould have fallen through to an icon lookup. The tile's icon now comes fromschema.icon.@object-ui/runner:LayoutRendererdoes the same. It readsbranding.logoas the image and takes an icon name fromicon. It no longer guesses the kind of value from a/or..content/docs/core/app-schema.mdxtaught a top-levellogoin two examples and its properties table. They now usebranding: { logo }, and the table gainsiconandbranding.logorows.content/docs/guide/console-architecture.mdsays where the logo is drawn.Route change from the dispatch, with the reason (Zone 2, B3 falsified)
The dispatch's B3 suggested adding
logoto theAppShellBrandingobject thatConsoleLayoutbuilds. I measured that route and did not take it. objectui#4818 settled that exact fork. The maintainer ruled option 1 (removeAppShellBranding.logo) and explicitly rejected option 2 ("build a real branding context so sidebar/navbar can read it"). The recorded architecture is "the single real logo path stays the app schema'sbranding.logo, read directly by the sidebar". That removal shipped in 17.6.0 with the migration note "Delete the key … set it on the app schema'sbranding.logoinstead". Adding the key back would have undone a settled ruling and changed a published interface twice.The route taken is the other option both the triage and the claim offer:
UnifiedSidebar(its header). It is the mounted successor ofAppSidebar, the sidebar #4818 named.AppShell.tsxandConsoleLayout.tsxare not touched. Zone 1's wording "beside theprimaryColorthatuseAppShellBrandingalready carries" is read as describing where the chrome sits, not as a requirement to route the logo throughAppShellBranding. I am naming that reading so the seat can overrule it.File surface outside the claim:
packages/runner/src/LayoutRenderer.tsx. This was forced: withlogo?: never, itsapp.logo.includes(…)is atscerror. It is the same defect class and the same move asAppSchemaRenderer. No open PR touches it (the file lists of the 14 open PRs were read during this run), and the gate family is the same:type-checkplus vitest.Census: top-level
logowriters and readers (the stop gate)Read at base
8eaa1a0, overapps/**,examples/**,content/docs/**andpackages/**, excluding CHANGELOGs and locale packs.logo:key writes: 23 hits. Top-levellogoon an app has 1 production writer,wizardDraftToAppSchema, which this PR removes. The other hits are: the zod mirror's own declaration of the key (now the refusal); 2 doc examples (moved tobranding.logo); 2 test fixtures (re-spelled);branding.logowriters, the positive control (AppCreationWizard×2,BrandingEditor,EditAppPage's draft,app-creation-types×5); and unrelated keys (organisation logo ×2,header-bar×3, a record field fixture ×2). The last hit is the CLI's own routed-projectapp.jsonvocabulary: a fixturelogo: 'Flame', typed by the CLI's localAppConfig, not byAppComponentSchema.logoexists outside the wizard. The stop condition does not fire. No writer puts an icon NAME into anAppComponentSchematop-levellogoeither (B2). The only icon-namelogois in the CLI's separate vocabulary.logo:AppSchemaRendererand the runner'sLayoutRenderer(both moved), plusEditAppPage's pre-fill fallback, which is left alone (see Acceptance notes).branding.logo/branding?.logo: 11 hits on an app's branding (the designer'sAppCreationWizard×3 andBrandingEditor×5,EditAppPage,app.tsand the console README). The same pattern also hits 6 unrelated lines: the operator'sbranding.logoUrlinruntime-config.ts×4 and the embeddable form's ownbranding.logo×2.examples/atorigin/main733822cf, read-only: 0 top-level applogo.branding.logohas one hit, inapp-todo'stodo.app.ts, insidebranding(the control). Theapp-crmandapp-showcaseapps declarebrandingwith a colour only.Verification: all at
6ea8f67ConsoleLayout.appBrandingLogo-10827.test.tsxmounts the realConsoleLayout, the realAppShelland the realUnifiedSidebarunder the realNavigationProvider. It checks four cases. A branded app shows its logo, named by its label. CONTROL: an app without a logo shows no image. An app with only a top-levellogoshows nothing. The active app wins over the first app. Separately, Home context draws no logo.AppSchemaRenderer.brandingLogo-10827.test.tsx: relative, absolute anddata:URLs are drawn. The CONTROL shows no image and the default icon. The retired key is drawn neither as an image nor as an icon name.LayoutRenderer.brandingLogo-10827.test.tsx(runner): the same three cases, withBoxas the control.app-logo-one-spelling-10827.test.ts(types): a named refusal at pathlogowith codeinvalid_type, whatever the value. The TypeScript face refuses the key (@ts-expect-error). The wizard output has nologokey and parses green through the refusing mirror. A spec control shows the spec refuses the top-level key and acceptsbranding.logo.pnpm exec vitest run --maxWorkers=2 packages/types/ packages/layout/ packages/runner/:Test Files 282 passed (282),Tests 5682 passed (5682).pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/layout/ packages/app-shell/src/__tests__/:Test Files 48 passed (48),Tests 626 passed (626).pnpm --workspace-concurrency=2 --filter @object-ui/types --filter @object-ui/layout --filter @object-ui/app-shell --filter @object-ui/runner run type-check: each script echoed (packages/X type-check$ tsc --noEmit && … tsc -p tsconfig.test.json), and each endsDone. The command exited 0. This ran after a turbo build of the dependency closure:Tasks: 28 successful, 28 total.--listFilesconfirms that each package'stsconfig.test.jsoncontains its new test.runner/srcprobe wrote{ type: 'app', logo: '/x.svg' }. The runner'stsc --noEmitexited 2 withTS2322: Type 'string' is not assignable to type 'undefined', which proves the runner reads the rebuiltdist/app.d.ts. The probe was removed andgit statusis clean.ablation-replace.mjs, commit first, WRAP mode):activeApp?.branding?.logowas changed toactiveApp?.logo, with anchor count 1 → 0 and blob0ef580a5b1b1→0b4febdb08ed. The console pin went3 failed | 2 passed (5): the branded app, the alias and the active-app cases failed, and the CONTROL and Home cases stayed green, which is the expected direction. The restore wasgit checkout HEAD -- ABS_PATH: blob == HEAD (0ef580a5b1b1), andgit diff HEADis empty.app-schema.mdxexample was put back to the top-levellogothrough the same tool.pnpm check:doc-snippetsthen failed withcontent/docs/core/app-schema.mdx … TS2322(678 of 678 block(s) judged, 1 failed), and the restore was proven the same way. At HEAD:678 of 678 block(s) judged, 0 failed.check-changeset-presence(12 source file(s) of 4 released package(s) changed … declares 1 changeset(s)),check-changeset-fixed,check-changeset-no-major,check-changeset-overwrite.check:changeset-claims: 12 pending changesets name files touched here, and each paragraph was read. None is falsified: none speaks of the app logo.check:pending-changeset-literals,check:new-line-citations(0 new citation(s)),check:control-bytes,check:vi-mock-specifiers,check:vi-mock-inherit,check:vi-mock-override-shape,check:test-path-roots.check:doc-types,check:doc-fences,check:doc-example-ids,check:doc-snippets,check:doc-examples,check-doc-expression-carriage,docs:check-links,check:i18n-keys,check:spec-symbols,check:unreferenced-sources.check-governed-queue-guard --teston the 15 paths:NOT GOVERNED.lintiseslint ., and the rule-bearing config objects match**/*.{ts,tsx}.eslint --format jsonover the 12 touched.ts/.tsxfiles gives12files,0errors and 18 warnings, and 0 of those warnings fall on an added line.eslint.config.jssets noparserOptions.projectorprojectService, so type-aware linting is off, and no custom rule reads the disk. This diff therefore cannot move a verdict on a file it does not touch.packages/app-shell: the whole-package run passed the 590 s foreground cap and was stopped. The layout directory and the source scans were run. The rest is left to CI.h-8 w-auto max-w-full object-contain).client.meta.saveItem) refuses the other four top-level keys. That is objectui#10842.Changeset
.changeset/10827-app-branding-logo-one-spelling.mdbumps@object-ui/typesminor, with the break stated:AppComponentSchema.logoisneverand refused by name.@object-ui/layout,@object-ui/app-shelland@object-ui/runnerare patch, because no published prop moves. It names the published 17.6.0 changelog sentence that is now false: the one saying the top-levellogois "rendered directly byAppSchemaRenderer's default sidebar header".Acceptance notes (not filed, per the dispatch's scope rules)
EditAppPage's pre-fill still readsappToEdit.branding?.logo || appToEdit.logo. That is a consumer-side fallback onto the retired spelling. Its{ ...appToEdit, ...appSchema }merge also passes a stored top-levellogothrough on save. The claim fencesplugin-designer, and this is not needed for compilation (appToEditisany), so it is left for the card that edits that file next. Thefavicontwin sits on the adjacent line. Carrier: objectui#10842.faviconhas the same two spellings (B5), and they are not changed here. Census at base:wizardDraftToAppSchema(the only production writer), 2 doc examples, and 1 test fixture.AppSchemaRenderer(it feedsAppShell's favicon fromschema.faviconand never readsbranding.favicon) andEditAppPage's fallback.branding.faviconreaders:ConsoleLayoutintouseAppShellBranding(live in the console), the designer's editors, andEditAppPage.favicon(unrecognized_keys). Carrier: objectui#10842.app.json'slogoas an icon name, in its generated layout. That vocabulary is separate (a localAppConfigwithtitle/logo/menu), is not validated againstAppComponentSchema, and has no in-tree producer beyond its test fixture. It is untouched.getLogoUrl()), which already takes the app'sprimaryColorthroughbg-primary.Generated by Claude Code