- Ya
- 29 Agosti 2026, 02:38 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 57ea143
An org with no domain of its own still ended up titled "KamoCRM" after a refresh, briefly showing its real name first. generateMetadata resolves the tab's org from ORG_REF_HEADER, which proxy.ts fills from the `?org=` query parameter — and that parameter was removed from the URL, deliberately, so the address bar stopped carrying tenant state. Nothing replaced it for the SERVER, because nothing can: the per-tab answer lives in that tab's sessionStorage, which no document request carries. So the render falls back to the hostname, gets the platform, and titles the tab "KamoCRM". That is not a harmless first guess. React owns the <title> it renders and re-asserts it after hydration — noted in this file and in DynamicMetaLoader — so the guess overwrites the correct name the client read from the tab's own theme folder, and wins. Hence: platform name, flash of the real name, platform name for good. So the server now says nothing when it cannot know. With no <title> rendered there is nothing to re-assert, and the two client paths that DO know own the tab: the pre-paint script in the head applies the name this tab already recorded, and DynamicMetaLoader sets it from config.json. A custom domain, or a per-org subdomain, still names exactly one org and still gets its title server-side — those were never ambiguous and are unchanged. PLATFORM_APEX moves to a server/client-neutral module rather than being copied. A duplicated literal is what broke the theme-slug key once already: renamed in one place, stale in the other, and the read silently returned nothing.