The tab's own session names its organization; `?org=` leaves the URL

Refactorkamo-internal
Shipped
August 27, 2026 at 6:48 AM UTC
Author
kamo
Commit
13dfbd9

Builds directly on 05ff51b3, which established the right source of truth — the tab asks its own session which workspace it is in, over a call the per-tab token signs. What it kept was the carrier: `?org=` still had to be written back into the URL after every navigation so the NEXT server render could resolve it. That carrier is the part that keeps failing. It has to be re-stamped after each navigation, it is visible in every address, it can be hand-edited, and when the sessionStorage key behind the re-stamping was renamed the rewriting stopped without a sound — a save on the branding page then repainted the whole workspace as the platform. Three separate bugs have now come from the same place. Nothing has to be carried. The tab already recorded its organization, and a blocking script in the document head reads that before the first paint and applies the organization's stylesheet — so a render that resolved nothing is already wearing the right branding by the time React runs, and OrgProvider's session lookup confirms it rather than being the only thing standing between the member and the platform's logo. DynamicMetaLoader replaces the same element by id once it has config.json, so the two are never both in the cascade. So: OrgUrlSync, stampOrgRef and mayNameInUrl are gone, and /validate spends the reference instead of forwarding it. That one hop is the only place `?org=` was ever needed — a tab arriving there has no session yet — and 05ff51b3's rule for what may be recorded is kept exactly: the ALIAS, never the resolved domain, since `abc-mortgage.kamocrm.com` is looked up as a hostname and resolves to KamoCRM Inc. Note for whoever lands next: 13 chat tests and the matching tsc errors are red on main independently of this — app/components/chat is written against a @kamo/chat-core that has not been published (canEdit, reactions, dateEdited). Verified by stashing this change and re-running. Everything else: 2834 tests.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing