Looking at an organization is not being in it

Fixkamo-internal
Shipped
September 8, 2026 at 6:59 PM UTC
Author
kamo
Commit
f9bd762

A workspace signed in to KamoCRM repainted itself as BluEleven - logo, colours, favicon, tab title, and the feature set driving the navigation - while every record on screen stayed KamoCRM's. It then stayed that way, and the moment it happened looked unrelated to anything that had just been clicked. `?org=` is the application-wide TENANT reference. proxy.ts forwards it as `x-kamo-org-ref`, the root layout resolves it, `orgWasNamed` goes true, `serverCanNameTabOrg` lets it name the tab, and DynamicMetaLoader records its alias as the folder this tab paints from. /network was also using the same parameter as an ordinary UI argument - `?org=<id>` opened one organization's record in a drawer - and workspaceEntryUrl built the same link for a newly created organization. So opening another tenant's record re-identified the whole tab as that tenant. The slug is remembered per tab, so it outlived the drawer being closed, the parameter leaving the URL, and every later navigation; the pre-paint script in the document head then applied it before React existed on every subsequent load. Nothing recovered from it either. OrgProvider does ask the session and adopt the right organization, but DynamicMetaLoader re-asserts the server's reference every time its effect re-runs - which includes the moment the session resolves - so the correction was overwritten a beat after it landed. Two changes, because the leak needed both a trigger and a way to stick. The drawer gets a parameter of its own, `?record=`. The legacy name is still read so links already sent in support conversations keep working, and is never written again. And the theme slug now carries how it was learned. A slug named by a URL reference cannot overwrite one the tab's own SESSION named; a session-named slug always wins, so /validate can still correct a tab that was mis-branded earlier. setThemeSlug answers with the slug in force rather than the one it was handed, DynamicMetaLoader paints from that, and OrgProvider asks for a re-apply when it adopts the session's organization - so the correction reaches the stylesheet and favicons instead of only the record. Guarded by four cases in themeSlug.test.ts.

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