Repository navigation
docs(deployment): branding env vars follow the runtime — OS_PRODUCT_NAME defaults to ObjectOS, six readers added, precedence per posture - #24990
Conversation
…d readers OS_PRODUCT_NAME defaults to ObjectOS and names the console only (tab title, header mark, sign-in pages, loading screen, PWA manifest); mail and auth are OS_APP_NAME's. OS_PRODUCT_SHORT_NAME falls back to the served product name. Adds OS_PRODUCT_STAGE, OS_LOGO_URL, OS_FAVICON_URL, OS_BRAND_COLOR, OS_PWA_DESCRIPTION and OS_PWA_THEME_COLOR as RuntimeConfigPlugin resolves them, read once at construction. States the Setup -> Branding precedence under single and the withheld namespace under group / isolated. Claude-Session: https://claude.ai/code/session_01FM29ZqLTrnPNXxijioZwMp Co-authored-by: Claude <noreply@anthropic.com>
Seat reviewACCEPT ·
This seat readies the PR and queues it with auto-merge. Generated by Claude Code |
Fixes #24887
Clause-②: no
What changes
content/docs/deployment/environment-variables.mdxonly: the branding section. Docs follow the implementation. Every default, fallback and reader below is read offmain's code (objectstacke4d604efd3, which this branch carries; console consumers read in objectui at the.objectui-shapincf153eb2e535). The section heading loses "(single-tenant)", because under the walled postures these variables are the console's only branding source. No page or package links the old#branding-single-tenantanchor (git grepovercontent,apps,packages,docsandskillsfinds 0), andcheck:doc-anchorsis green.file#symbol)OS_PRODUCT_NAMEObjectStack, "shown in the UI chrome and emails". New: names the console only. That is the browser-tab title (alone, or after the open app's label), the header's product mark, the sign-in pages, the loading screen and the PWA manifestname. It names no mail and no auth, which point toOS_APP_NAME.packages/cloud-connection/src/runtime-config-plugin.ts#RuntimeConfigPlugin.constructor(productName), served by#RuntimeConfigPlugin.brandingBlock. Console: objectuipackages/app-shell/src/runtime-config.ts#getProductName, read byapps/console/src/main.tsx,apps/console/index.html,layout/ConsoleLayout.tsx,layout/AppHeader.tsx#ProductHomeMark,pages/auth/AuthLayout.tsx,pages/auth/DeviceAuthPage.tsxandchrome/LoadingScreen.tsxObjectOSOS_PRODUCT_SHORT_NAMEOS, "favicons, mobile titles". New: the PWA manifestshort_name, falling back to the product name served.#RuntimeConfigPlugin.constructor(configuredShortName),#RuntimeConfigPlugin.brandingBlock. Console:apps/console/src/main.tsxinto objectuipackages/mobile/src/pwa.ts#generatePWAManifestOS_PRODUCT_STAGEpreview/beta/ga, matched exactly. Drives the top-bar chip. Unset sends nostagekey and the console keepspreview. Any other value gets onewarnat boot and is treated as unset.#RuntimeConfigPlugin.constructor,#asPlatformStage, refusal in#RuntimeConfigPlugin.start. Console: objectuilayout/PreviewBadge.tsx#PreviewBadgestagekeyOS_LOGO_URL#RuntimeConfigPlugin.constructor(logoUrl),#brandingBlockOS_FAVICON_URLbranding.faviconreplaces it while that app is open. No setting outranks it.#RuntimeConfigPlugin.constructor(faviconUrl). Console:apps/console/index.html,apps/console/src/main.tsxOS_BRAND_COLOROS_PWA_THEME_COLOR's default. AppAppBrandingcolours are separate.#RuntimeConfigPlugin.constructor(brandColor),#brandingBlockOS_PWA_DESCRIPTIONdescription.#RuntimeConfigPlugin.constructor(configuredPwaDescription),#brandingBlock— runtime consoleOS_PWA_THEME_COLORtheme_color.#RuntimeConfigPlugin.constructor(configuredPwaThemeColor),#brandingBlock#4f46e5OS_APP_NAMEbranding.workspace_namesetting outranks it in auth." New: true undersingleonly, and the authenticator issuer takes a change only when the auth instance is rebuilt. Undergroup/isolatednothing outranks it. It never names the console.packages/plugins/plugin-email/src/capability-arg.ts#resolveDeploymentAppName, passed inpackages/cli/src/commands/serve.ts(new AuthPlugin({ appName })). Override binding:packages/plugins/plugin-auth/src/auth-plugin.ts(thebrandingOfferedtest beforeapplyBrand).packages/plugins/plugin-auth/src/auth-manager.ts#getAppName/#setAppName, and the issuer read increateAuthInstanceObjectStack(unchanged)All eight
OS_PRODUCT_*/OS_LOGO_URL/OS_FAVICON_URL/OS_BRAND_COLOR/OS_PWA_*variables are read once, in the constructor, so a change takes a restart. The page now says so. A host's ownRuntimeConfigPluginoption of the same name outranks each one. The CLI passes none:packages/cli/src/commands/serve.ts#Serve.RUNTIME_CONFIG_OPTIONScarriescontrolPlaneUrl,singleEnvironmentandinstallLocalonly. The showcase's own mount passes none either.Precedence, per posture (PR #24959, re-read on
main)Under
single, three served fields read thebrandingsettings namespace per request (#RuntimeConfigPlugin.readSavedBranding,#BRANDING_SETTINGS_KEYS):workspace_name→productName,logo_url→logoUrl,accent_color→brandColor. For each, the first source that is set wins:OS_BRANDING_WORKSPACE_NAME/OS_BRANDING_LOGO_URL/OS_BRANDING_ACCENT_COLOR(packages/services/service-settings/src/settings-service.types.ts#envKeyOf; it outranks a stored row and locks the field), then a value saved in Setup → Branding;RuntimeConfigPluginoption;OS_PRODUCT_NAME/OS_LOGO_URL/OS_BRAND_COLOR;A value with
source: 'default'is skipped, so the Branding manifest's ownObjectStackis never served to the console. A setworkspace_namealso names sign-in mail, the authenticator issuer and MCP sign-in, ahead ofOS_APP_NAME.Under
group/isolated,SettingsServicePluginholdsbrandingback (packages/services/service-settings/src/settings-service-plugin.ts#UNWALLED_ONLY_NAMESPACES,#offerUnwalledOnlyNamespaces). The namespace is absent fromGET /api/settings,GETandPUTon it answer404 UNKNOWN_NAMESPACE, and Setup lists no Branding entry. TheOS_BRANDING_*variables reach no reader. The console's branding is the host option, then the variables, then the default. The auth product name comes from theOS_APP_NAMEchain alone. The migration the changesets state,OS_BRANDING_WORKSPACE_NAME=Acme→OS_APP_NAME=Acme, is on the page.Live reading
The showcase was booted on this branch's base (
7adfaec2a1) withpnpm dev -- --fresh -p 41873.examples/app-showcasemounts its ownRuntimeConfigPlugin({ controlPlaneUrl: '', singleEnvironment: true, installLocal: true }), with no branding option. None of the eight variables,OS_APP_NAME,OS_BRANDING_*,OS_TENANCY_POSTUREorOS_MULTI_ORG_ENABLEDwas set; each was checked set/unset without printing a value. The posture issingle.GET /api/v1/runtime/configanswered200, withbranding={"productName":"ObjectOS","productShortName":"ObjectOS","pwaDescription":"ObjectOS — runtime console","pwaThemeColor":"#4f46e5"}. There is nostage,logoUrl,faviconUrlorbrandColorkey.GET /api/settings/branding(as the seeded admin) answered200:workspace_name=ObjectStackwithsource: default, andaccent_color/logo_url= null withsource: default. So the namespace is offered undersingle, and its default did not reach the console.POST /api/v1/auth/request-password-resetfor the seeded admin answered200, and itssys_identity_emailrow reads subjectReset your ObjectStack password, statussent. The body namesObjectStackonce andObjectOSzero times.That is the two-names reading the card carries:
ObjectOSin the console andObjectStackin the mail, on one unconfigured deployment.Verification (HEAD
d3a8afd655)node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 41 commands from this tree. All 41 ran with exit 0, each code captured before any pipe.--ranreports:41 derived famil(ies) accounted for — 41 run, 0 NOT-MEASURED. Among them:check:doc-anchors(563 links resolve),check:docs-single-h1,check:doc-frontmatter,check:docs-redirects,check:nul-bytes(no raw control bytes), and@objectstack/spec check:docs(227 generated files in sync).@mdx-js/mdx3.1.1 +remark-gfm4.0.1 (exit 0).git merge-tree --write-tree origin/main HEADexit 0, treee6b183653f. The path is not routed to the regen driver.Build Docs, theTest Coreshards and the type-check lanes.skip-changeset, measured: no published package'sfiles[]namescontent,docsor an mdx glob (73 published packages). A phrase unique to this diff (Branding precedence, by tenancy posture) has 0 hits across the 205files[]roots. Control:OS_PWA_THEME_COLORhas 4 hits, inpackages/cloud-connection/dist.Acceptance notes
ObjectOSagainstObjectStack) is product behaviour, and the card scopes it out. The page now states it, and namesbranding.workspace_nameundersingle, orOS_PRODUCT_NAMEplusOS_APP_NAME, as the way to name a deployment one way everywhere. Carrier: none.OS_PRODUCT_NAME,OS_PRODUCT_SHORT_NAMEandOS_PRODUCT_STAGEread empty as unset.OS_LOGO_URL,OS_FAVICON_URL,OS_BRAND_COLORand theOS_PWA_*pair forward'', because??keeps it. The console's||getters then fall back, so nothing visible changes. This is a read-only observation and is not filed. The page claims "empty reads as unset" for the product name only.content/docsstates these defaults. objectui'spackages/app-shell/README.mdnamesOS_PRODUCT_STAGEconsistently with this page.Generated by Claude Code