fix(web): remove vestigial className="app-root" tokens#31389
Conversation
PR #31324 deleted AppRootProvider after confirming zero CSS rules target `.app-root` in this repo — theme tokens live on `:root` and apply via `data-theme` on `<html>`. Two `className="app-root"` strings survived that cleanup and are dead (target no CSS rule). The portal-container docstring example also still referenced the old wrapper pattern; it now reflects current conventions where overlays fall back to `document.body` directly and the provider is reserved for nested overlay scoping (dialogs, shadow DOM). Closes LUM-1769
There was a problem hiding this comment.
✦ APPROVE
Dead code sweep — exactly right. Three surgical removals, no behavioral changes.
-
native-splash.tsx+login-page.tsx—app-rootwas a no-op className targeting no CSS rule since #31324 deletedAppRootProviderand moved theme tokens to:root/data-themeon<html>. Both removals preserve all other classes cleanly. -
portal-container.tsxdocstring — the rewrite is better than the original: correctly reflects thatdocument.bodyis now a valid default fallback (tokens on:root), demotes the app-shell mount pattern from "primary use" to "not needed," and updates the example to show the actual remaining use case (dialog nesting withrole="dialog"). Accurate, concise, actionable.
Verification checks in the PR description (grep -rn "app-root" returns empty, TypeScript clean) are exactly what this kind of change warrants. CI fully green.
Trigger @codex review + @devin review this PR for second approval gate.
|
@codex review |
|
@devin review this PR |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Summary
PR #31324 deleted
AppRootProviderafter confirming zero CSS rules target.app-rootin this repo — theme tokens now live on:rootand apply viadata-themeon<html>. TwoclassName="app-root"strings survived that cleanup and have been dead ever since (they target no CSS rule). A docstring example inportal-container.tsxalso still illustrated the old.app-rootwrapper pattern.This PR removes the dead tokens and updates the docstring to reflect post-#31324 conventions.
Changes
apps/web/src/components/native-splash.tsx— dropapp-rootfrom className (other classes preserved).apps/web/src/domains/account/pages/login-page.tsx— dropapp-rootfrom className (other classes preserved).packages/design-library/src/utils/portal-container.tsx— rewrite docstring example. The provider is no longer needed at the app shell (overlays fall back todocument.body, which now has access to design tokens via:root). The example now shows the provider's primary remaining use case: nesting overlays inside a dialog so menus opened from within a modal portal into the modal rather than escaping todocument.body.No runtime behavior changes — only dead className tokens removed and a docstring updated.
Verification
grep -rn "app-root" apps/web/src packages/design-library/srcreturns no matches.cd apps/web && bunx tsc --noEmitpasses cleanly.Links
Closes LUM-1769
https://claude.ai/code/session_01DGgkooyEB8d6v9fpDj7UxN
Generated by Claude Code