Repository navigation
Description
Describe your motivation
The built-in PWA offline page (flow-server/src/main/resources/com/vaadin/flow/server/default-offline-page.html) is shown by the service worker whenever an installed Vaadin PWA cannot reach the server, unless the app configures its own offlinePath. Its look is outdated: a dark-only layout with a large app-name heading and a bar above it, the app icon pushed aside, and a long explanatory paragraph. It doesn't follow the user's color scheme, and the application's own identity (icon + name) isn't front and center.
Describe the solution you'd like
Update the default offline page to the following design:
- Content centered vertically and horizontally on a plain background.
- The application's icon (the largest cached PWA icon, i.e. what
%%%LOGO_PATH%%%already resolves to) shown as a rounded-square app icon, with the application name (%%%PROJECT_NAME%%%) below it in bold. With the default icon this shows the Vaadin logo; with a custom app icon, the custom icon is shown. - Below that, a small vertical "broken connection" indicator: two dots, a crossed-out cloud icon, two dots.
- Heading: Connection Lost.
- Muted body text: Check your network connection and try reloading the page.
- Light and dark variants following
prefers-color-scheme(light: white background, dark text; dark: black background, white text, grey secondary text).
Constraints from the current implementation:
- The page must stay fully self-contained (inline CSS/SVG, no external resources), since it is pre-cached and served while the server is unreachable.
PwaRegistryjoins the file line-by-line, stripping newlines, so any inline script must use block comments and terminate statements with semicolons.- Keep the existing template variables (
%%%PROJECT_NAME%%%,%%%LOGO_PATH%%%,%%%META_ICONS%%%,%%%BACKGROUND_COLOR%%%) working, and keep the auto-reload-on-reconnect behavior.
Additional context
Whether the embedded offline game added in #25526 should remain on the default page is discussed separately in #26460. This issue only covers the visual design; the redesign shouldn't make that decision.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
totally-not-ai commentedon Oct 15, 2026
Triage
Type: valid enhancement request (not a bug). The current behavior is as designed since #25526.
Where it lives
flow-server/src/main/resources/com/vaadin/flow/server/default-offline-page.html(~520 lines, of which ~370 are the inline Reindeer Runner script/CSS).PwaRegistry#initializeOfflinePagereads the file line by line, joins the lines with no newlines, then substitutes%%%PROJECT_NAME%%%,%%%BACKGROUND_COLOR%%%,%%%LOGO_PATH%%%(href of the largest icon) and%%%META_ICONS%%%. Apps that set@PWA(offlinePath = ...)are not affected, because their own page is used.Assessment
/* */comments and explicit semicolons. The page must have no external resources. Theonline→location.reload()listener has to stay.<img src="%%%LOGO_PATH%%%">withborder-radiusfor the app icon, the bold app name, an inline SVG for the dots / crossed-out cloud indicator, the "Connection Lost" heading and a muted paragraph. Light/dark is handled with@media (prefers-color-scheme: dark). No Java or API changes are needed.%%%BACKGROUND_COLOR%%%is substituted today, but the current template doesn't actually use it. The new design calls for a plain white/black background, so the variable can keep working without being used, or it can tint the light-mode background. That needs a decision.%%%LOGO_PATH%%%resolves to"". The new page should hide the icon (e.g.img[src=""] { display: none }) rather than show a broken image.Why I'm not opening a PR right away
This removes a feature that shipped very recently (#25526), and the exact visual design depends on the mockups that haven't been attached yet. Both are product decisions, so they should be confirmed by the team, and ideally by @samie as author of #25526, before anything is implemented.
Options
offlinePathpage, and the game could be published as a sample or add-on.Recommendation: option 1. Once the mockups are attached and the direction is confirmed, the change is a single-file template rewrite, plus a test asserting that the rendered default offline page contains the app name/logo and the reload listener.
jouni commentedon Oct 15, 2026
The default app icon should be updated at the same time.
Add dark default-icon mockup for #26458
[-]Redesign the default PWA offline page and remove the embedded game[/-][+]Update the default PWA offline page to the new design[/+]Artur- commentedon Oct 21, 2026
@totally-not-ai do 1 on top of #26557
totally-not-ai commentedon Oct 21, 2026
@Artur- Done: I opened #26573 as a draft PR, stacked on #26557.
prefers-color-schemefor the light and dark variants.%%%LOGO_PATH%%%resolves to an empty string and the icon is hidden, so there is no broken image.%%%BACKGROUND_COLOR%%%is still substituted but stays unused. The design uses plain white or black instead. If the page should use the manifest background color, that is a small follow-up.fix: revert "add a playable game to the PWA offline page" (#26557) (C…
fix: revert "add a playable game to the PWA offline page" (#26557)
feat: redesign default PWA offline page (vaadin#26573)
vaadin-bot commentedon Nov 6, 2026
This ticket/PR has been released with Vaadin 25.4.0-alpha5.