Skip to content

fix(web): replace plain "Loading..." route fallback with a styled loading state - #3057

Merged
RockChinQ merged 1 commit into
masterfrom
fix/webui-route-loading-state
Nov 16, 2026
Merged

RockChinQ merged 1 commit into
masterfrom
fix/webui-route-loading-state

Conversation

@RockChinQ

Copy link
Copy Markdown
Member

Problem

While the WebUI loads, a bare Loading... text appears in the top-left corner. It is the lazy-route Suspense fallback in web/src/router.tsx (<div>Loading...</div>), shown while the /home / /wizard chunks download. After that, HomeLayout renders an empty <div /> during the Workspace bootstrap.

Fix

  • New web/src/components/RouteLoading.tsx:
    • PageLoading: full-viewport, centered LangBot mark with a subtle breathing animation and a small spinner. It follows the light/dark theme, fades in after 200ms so fast loads show nothing, respects prefers-reduced-motion, and keeps an sr-only i18n label (common.loading).
    • ContentLoading: a centered spinner for the content area.
  • All route fallbacks and HomeLayout's bootstrap phase use PageLoading, so the two phases look like one continuous state with no text and no blank flash between them.
  • The /home content area gets its own Suspense boundary, so the sidebar and header stay visible while a page chunk loads.

Verification

  • tsc --noEmit, eslint and prettier pass; vite build succeeds.
  • Ran the Vite dev server and held /api/** in Playwright to keep /home/bots loading. Screenshots in light and dark mode show the centered logo and spinner, with no top-left text.

Refs LANG-534

🤖 Generated with Claude Code

…ding state

The lazy-route Suspense fallback was a bare `<div>Loading...</div>`, which
rendered as unstyled text in the top-left corner while the /home and
/wizard chunks loaded. HomeLayout then rendered an empty div during the
Workspace bootstrap.

- Add PageLoading (centered LangBot mark + spinner, theme-aware, fades in
  after 200ms so fast loads show nothing) and ContentLoading.
- Use PageLoading for route fallbacks and HomeLayout's bootstrap phase so
  the two phases look like one continuous state.
- Wrap the /home content area in its own Suspense so the sidebar/header
  stay visible while a page chunk loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@RockChinQ RockChinQ closed this Nov 16, 2026
@RockChinQ RockChinQ reopened this Nov 16, 2026
@RockChinQ
RockChinQ merged commit 0a7584b into master Nov 16, 2026
10 checks passed
@RockChinQ
RockChinQ deleted the fix/webui-route-loading-state branch November 16, 2026 16:32
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