New markup over an old stylesheet

Reported from a desktop browser: a stray close button beside the logo, badly
drawn, and a page that would not scroll. None of it was in the code that was
running -- it was the code the browser had not fetched.

The worker caches /static/ under a cache named for the release while the files
in it carried no version, and a page is fetched network-first. That only ever
worked because the worker used to seize every open tab the instant it installed
and wipe the old cache. 1.1.0 stopped it doing that, rightly -- it was swapping
stylesheets out from under a streaming reply -- and a momentary mismatch became
a permanent one: new markup over the previous release's CSS for as long as the
old worker lived. `.sidebar__close` had no rule there, so `.btn--icon` made it
inline-flex: visible everywhere, placed by nothing.

Every /static/ URL carries the release now, written by `templating.asset` and
precached by `sw.js:versioned` -- both halves, because caches.match compares the
query too and precaching the bare path would cache entries nothing requests.
Self-correcting: updating is enough.

The header was also a brand with a button appended and margin-left:auto doing
the placing, which holds exactly while that button is last. Two slots now: a
brand that shrinks and truncates, and a rail on the trailing edge.

Verified before changing anything: with the current stylesheet the button is
display:none at 1280 and, with thirty chats and forty messages, both scrollers
scroll. The first measurement said the thread did not -- that was
scroll-behavior: smooth reporting where it started.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 18:16:24 +00:00
co-authored by Claude Opus 5
parent 28390095a9
commit 201281d616
18 changed files with 216 additions and 48 deletions
+26
View File
@@ -16,6 +16,32 @@ for 1.0.0 have something to be assembled from.
## Unreleased
## 1.1.1
One bug, and it is the one that made 1.1.0 look broken the moment you updated to
it. If you saw a stray ✕ beside the logo on a desktop, controls that looked
half-styled, or a page that would not scroll, this is why — and none of it was
in the code you were running; it was the code your browser had *not* fetched.
- Fixed: **updating showed you the new page drawn with the old stylesheet.**
Pages are always fetched fresh, while the CSS and JavaScript beside them come
from the cache the offline support keeps — and that cache was keyed on the
release while the files inside it were not. For as long as the previous
release's worker was still in charge, you got 1.1.0's markup over 1.0.x's
stylesheet: a close button meant for the phone drawer appeared on the desktop
with nothing to style or place it, and anything else the new layout depended
on was simply absent. Every asset now carries the release in its address, so
a new page cannot be handed an old stylesheet whatever the cache holds.
It is self-correcting: updating to this version is enough, and no cache needs
clearing.
- The sidebar header is two slots — the name, and a rail on the right for the
drawer's own controls — instead of a brand with a button appended to it. The
close button sits in that rail, at the top right where it belongs, and a
second control added later lands beside it rather than pushing the name
around.
## 1.1.0
Mostly about using this on a phone, where it turns out a good deal of it could