The splash is the photograph, and it is painted before the app exists
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s

Two things about the launch screen on the phone.

**No mark on it.** The photograph is the screen now — the logo that sat in the middle is
gone, and so is the vignette that existed to keep that logo readable. Nothing to read, just
the picture, which is what was asked for.

**It no longer waits for React.** Until now the splash was a React element, so it could not
appear until the bundle had downloaded, parsed and mounted — on a phone that is the long
blank stretch between opening the app and seeing anything, and it is why the splash seemed
to arrive late and then flash past: by the time it rendered, the app was nearly ready.
index.html now paints the same photograph from inline styles, so it is on screen as soon as
the HTML is parsed, with the bundle still downloading behind it. React replaces the
container's contents when it mounts, and the two screens are identical — same image, same
object-fit, same base colour behind it while the picture decodes — so the handover cannot be
seen as anything but the app arriving.

The blank before even that is iOS's own launch screen, which is what apple-touch-startup-image
covers: production already serves all fourteen, so a PWA that still opens white is one that
was installed before those existed. Removing the icon from the home screen and adding it
again is what makes iOS pick them up — its launch images are read at install time, not on
every launch.
This commit is contained in:
dsantillan committed 2026-09-23 12:05:27 -04:00
1 parent b6d3512c36
commit 45183c725f
4 files changed
+22 -15

No files matched your search

+13 -1
View File
@@ -72,7 +72,19 @@
<div class="aura-layer-2"></div>
<div class="aura-layer-3"></div>
</div>
<div id="root"></div>
<div id="root">
<!-- The first thing the browser can paint at all. The splash React renders (`.boot-splash` in
index.css) cannot appear until the app's bundle has downloaded and run, and on a phone that
is the long blank stretch between opening the app and seeing anything. This is the same
photo with the same rules, written inline so it needs neither the stylesheet nor a line of
JavaScript, and React replaces the container's contents the moment it mounts — the two
screens are identical, so the handover is invisible.
The background behind the photo is the aura's base colour: the image takes a moment to
decode, and a dark frame is not a flash of white. -->
<div aria-hidden="true" style="position:fixed;inset:0;z-index:1;overflow:hidden;background:#100e0b">
<img src="splash.webp" alt="" style="position:absolute;inset:0;width:100%;height:100%;object-fit:cover">
</div>
</div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
+3 -3
View File
@@ -161,11 +161,11 @@ function Shell() {
const authed = user || isGuest
if (!waitedMax && (!ready || !waitedMin)) return (
<div id="app">
{/* The launch screen: the photo, then the app's own mark on it (see .boot-splash in
index.css). Fixed to the viewport, so #app's own padding does not matter here. */}
{/* The launch screen: the photograph, nothing on it. It matches the one index.html paints
before this bundle has even run (see #root there), which is what makes the handover from
that first frame to this one invisible. */}
<div className="boot-splash">
<img className="boot-photo" src="splash.webp" alt="" />
<img className="boot-logo" src="logo.png" alt="KuentaGYM" />
</div>
</div>
)
+2 -1
View File
@@ -44,7 +44,8 @@ describe('the app shell', () => {
// The splash: the shell renders it before anything else, which is what a launch screen is.
expect(host.querySelector('.boot-splash')).toBeTruthy()
expect(host.querySelector('img.boot-photo')?.getAttribute('src')).toBe('splash.webp')
expect(host.querySelector('img.boot-logo')?.getAttribute('src')).toBe('logo.png')
// Only the photograph: the mark that used to sit on it is gone by request.
expect(host.querySelector('.boot-splash').querySelectorAll('img').length).toBe(1)
})
it('stays long enough to be seen, then gets out of the way', async () => {
+4 -10
View File
@@ -221,17 +221,11 @@ button,.chip,.tile,.item,.wday,.cal-d,.swatch,.hm-c,.lrow,.seg button,.stp butto
/* The launch screen, while the profile is being read. The photo fills the viewport and the app's
own mark sits on it, over a soft darkening so the logo never fights a busy part of the image.
public/splash.webp is derived from assets/splash.jpg by scripts/build-app-icons.mjs. */
.boot-splash{position:fixed;inset:0;z-index:1;display:grid;place-items:center;overflow:hidden}
/* The photograph, full bleed, and nothing on it. No mark and no vignette: the picture is the
screen, which is also what index.html paints before this stylesheet exists — identical rules,
so the one hands over to the other without a flicker. */
.boot-splash{position:fixed;inset:0;z-index:1;overflow:hidden;background:#100e0b}
.boot-splash img.boot-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.boot-splash::after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,transparent 30%,rgba(16,14,11,.55) 100%)}
.boot-splash img.boot-logo{
position:relative;width:104px;height:auto;filter:drop-shadow(0 8px 24px rgba(0,0,0,.45));
/* A slow pulse so a screen that is waiting looks like it is waiting. `prefers-reduced-motion`
already switches every animation in this file off (see the top), which is the right answer for
anybody who asked for less movement. */
animation:splash-breathe 1.9s var(--ease) infinite;
}
@keyframes splash-breathe{0%,100%{opacity:.82;transform:scale(1)}50%{opacity:1;transform:scale(1.035)}}
/* Keep the last workout controls clear of the mobile overlays without adding a second
screenful of blank scroll space. The stacked rest timer needs the larger reserve. */
body.resting #app{padding-bottom:calc(206px + var(--sab))}