Skip to content

perf(web): defer tooltip provider from public boot - #406

Open
Yevanchen wants to merge 1 commit into
mainfrom
perf/web-defer-tooltip-provider
Open

perf(web): defer tooltip provider from public boot#406
Yevanchen wants to merge 1 commit into
mainfrom
perf/web-defer-tooltip-provider

Conversation

@Yevanchen

Copy link
Copy Markdown
Collaborator

Closes YEF-914

Summary

  • Move the shared TooltipProvider out of the root AppProviders tree.
  • Scope TooltipProvider to the authenticated App and Org shells where tooltip UI is actually rendered.
  • Keep public routes from eagerly loading Base UI tooltip code during boot.

Why

  • Public pages such as /login and callback routes do not render tooltips, but the root provider made them download tooltip runtime code anyway.
  • The production web build now emits a much smaller root entry chunk: 28.81 kB instead of 147.23 kB.

Verification

  • Commands:
    • bun run --filter @mosoo/web build
    • bun run fmt:check:path -- apps/web/src/app/providers.tsx apps/web/src/app/app-shell.tsx
    • bun run --filter @mosoo/web tc
    • bun run --filter @mosoo/web lint
    • bun run --filter @mosoo/web test
    • just commit-check
    • TMPDIR=/private/tmp just check
  • Manual steps:
    • Served the production web build with bun run --filter @mosoo/web preview -- --host 127.0.0.1 --port 4173 --strictPort.
    • Measured 22 canonical routes with Playwright against the production preview and mocked same-origin GraphQL. Worst browser Navigation Timing loadEventEnd: 19.4 ms.
  • Not run:
    • N/A

Impact

  • User/API/contract changes:
    • No user-facing behavior, API, or contract changes.
  • Generated files / GraphQL / DB / lockfile:
    • N/A
  • Env or config changes:
    • N/A
  • Risk and rollback:
    • Low. The provider is still present around all authenticated shell content; rollback is reverting this commit.

Review

  • Closest review areas:
    • apps/web/src/app/providers.tsx
    • apps/web/src/app/app-shell.tsx
  • Known trade-offs:
    • New public routes that add tooltip UI will need their own provider or an intentional provider placement change.

@Yevanchen
Yevanchen force-pushed the perf/web-defer-tooltip-provider branch from ca8b158 to aef5315 Compare July 27, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant