Skip to content

[pull] master from mattermost:master#668

Merged
pull[bot] merged 4 commits into
code:masterfrom
mattermost:master
Apr 29, 2026
Merged

[pull] master from mattermost:master#668
pull[bot] merged 4 commits into
code:masterfrom
mattermost:master

Conversation

@pull

@pull pull Bot commented Apr 29, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nickmisasi and others added 4 commits April 29, 2026 10:17
…body ownership (#36186)

* MM-67913: fix white flash on product navigation by centralizing app__body ownership

Previously, `document.body.classList.add/remove('app__body')` was managed
independently by `ChannelController` and each product plugin (Playbooks,
Boards). When switching products, the plugin's cleanup removed `app__body`
before the incoming tree's effect re-applied it. Because `ChannelController`
is deeply nested and sometimes async, a ~170ms gap could elapse during which
the body fell back to `background: $bg--gray`, producing a visible white
flash behind the transparent `GlobalHeader` and LHS.

Centralize `app__body` ownership in `WithUserTheme` via a new
`useAppBodyClass` hook. Since `WithUserTheme` wraps both the products
Switch and the `/:team` route in `root.tsx`, it stays mounted across
product navigation, so the class is never removed mid-transition.

`ChannelController` no longer toggles `app__body`; tests updated.

Product plugins (Playbooks, Boards) should stop touching `app__body` as
well; companion fixes land in their respective repos.

Made-with: Cursor

* MM-67913: add coverage for app body class ownership

Made-with: Cursor

* Update webapp/channels/src/components/theme_provider/theme_context.ts

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* MM-67913: fix theme context hook closure

Made-with: Cursor

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* Add stronger EnableTesting warnings

Co-authored-by: Nick Misasi <nick13misasi@gmail.com>

* Keep EnableTesting translations in en only

Co-authored-by: Nick Misasi <nick13misasi@gmail.com>

* Address EnableTesting review feedback

Co-authored-by: Nick Misasi <nick13misasi@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@pull pull Bot locked and limited conversation to collaborators Apr 29, 2026
@pull pull Bot added the ⤵️ pull label Apr 29, 2026
@pull pull Bot merged commit 6c0e0fe into code:master Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants