Stop the attention flasher reverting an org's tab title to the platform's

Fixkamo-internal
Shipped
29 Agosti 2026, 01:48 UTC
Author
Kamo
Commit
181296c

A child org with no domain of its own showed "KamoCRM", flashed to its real name, then flashed back to "KamoCRM" and stayed there. TabAttention wrote `document.title = baseTitleRef.current` on every run of its effect in which nothing was pending — including the run caused by `iconGeneration`, which DynamicMetaLoader bumps by dispatching KAMO_THEME_ICONS_APPLIED immediately AFTER it sets the tab's real name. So the theme named the tab and the flasher overwrote it a moment later, every time. The guaranteed ordering is why this reverted and stayed rather than being an intermittent race. The base it wrote back was stale for a second reason. Its MutationObserver was bound to the <title> ELEMENT captured at mount, and React's metadata handling replaces that element rather than editing its text — so the observer sat watching a detached node and reported nothing, which is indistinguishable from "the title never changed". That observer had been added precisely to avoid restoring a stale title; it could not see the change it existed to catch. Two fixes, because the two failures are independent: - Only restore a title we actually replaced (titleOverriddenRef). Restoring is meaningless for a title this component never touched, and that write was the clobber. - Track the base via document.head rather than the title element, so a replaced <title> is still seen, and seed it from the tab's own recorded org name rather than from document.title — on the shared host the server resolves by hostname and renders the PLATFORM's name, so a mount-time snapshot captures the wrong one for every org without a domain. The head-vs-element half is pinned by a jsdom test that replaces the <title> element: it fails with element-scoped observation and passes with head-scoped.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei