Skip to content

A loading screen, and "OpenBot couldn't load" with Try again, never a blank page - #2919

Merged
davidmckayv merged 1 commit into
mainfrom
david/boot-fallback
Dec 4, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
david/boot-fallback

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What

index.html now draws its own screen before the app's code arrives, so the page is never plain white:

  • The page's ground appears at once, in the person's theme. "Loading…" shows after a second.
  • "OpenBot couldn't load" / "Check your connection." / Try again shows when the app's code or styles fail to download, or when the app hasn't started 10 seconds in. Try again loads the page again.
  • The screen goes the moment the app draws anything, however late. If the app's styles never arrived it stays up, since the unstyled app is no better.

It's plain CSS and a classic inline script in the page, because nothing of the app's has loaded yet. The colours are the scheme's tokens: once the app's stylesheet has loaded they come from there, skins included, and until then from the scheme's own values. The layout is the app's error screen's (route-error.tsx). Nothing else changes visually.

Why

On 3 Dec 2026, someone opened OpenBot from a phone's Home Screen on a conference's Wi-Fi and got a blank white page for about two minutes. Every request that reached OpenBot got a normal answer. Until the app's code arrives, index.html draws nothing, and nothing tells the person anything or offers a way out.

What the leaders do: Gmail draws a loading screen with no scripts at all, and after a while says it is taking longer than usual and offers to try again (Gmail blog, Gmail won't load). On iOS Home Screen apps, a white screen means the app's JavaScript never ran (Netlify thread, WebKit bug 256219).

WebKit does draw this screen while the app's code is still downloading. It paints once the page has finished parsing and no stylesheet or font is pending (LocalFrameView::checkAndDispatchDidReachVisuallyNonEmptyState), and a recording of WebKit with the app's code held shows the dark ground and "Loading…".

Tests

app/tests/boot-screen.test.ts runs in real Chromium and WebKit. It uses the real index.html with the entry script and stylesheet where Vite's build puts them, the real app stylesheet, and a React app standing in for main.tsx:

  • The app's code fails to download: the failure and Try again show well before ten seconds, on the app's own ground, in light and dark, at phone and desktop widths.
  • The app's styles fail to download: the failure shows over the unstyled app, on the scheme's ground.
  • The app's code never answers: "Loading…" at one second, nothing more at nine, the failure at ten.
  • The app arrives late, after the failure shows: the app shows and the screen goes.
  • Try again loads the page again and the app comes up.
  • An app that loads never sees the screen, even after ten seconds.
  • Without a browser: every fallback colour equals tokens/src/scheme.ts, the words follow the copy rules, and the theme's script stays the page's first.

Red on main: 13 of 15 fail. Only "an app that loads never sees the screen" passes, in both engines, since there is no screen. Green with this change: 15 of 15, in Chromium and WebKit.

Changelog

Web app and OpenBot Desktop.

  • When OpenBot can't load on a slow or broken connection, it now says so and offers Try again, instead of showing a blank white page.

… blank page

Until the app's code and styles arrive, index.html drew nothing, so a slow or
broken connection showed a plain white page with nothing to press. On 3 Dec
that happened in a phone's Home Screen app on a conference's Wi-Fi for two
minutes, while every request that reached OpenBot was answered.

index.html now draws its own screen, as Gmail does: the theme's ground at
once, "Loading…" after a second, and "OpenBot couldn't load. Check your
connection." with Try again when the app's code or styles fail to download or
the app hasn't started in ten seconds. It goes the moment the app draws. Plain
CSS and a classic script, colours from the scheme's tokens, the layout of the
app's error screen.

app/tests/boot-screen.test.ts holds it in Chromium and WebKit, and holds the
fallback colours to tokens/src/scheme.ts.
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 4, 2026
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 798d04d Dec 4, 2026
75 of 78 checks passed
@davidmckayv
davidmckayv deleted the david/boot-fallback branch December 4, 2026 04:50
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