Skip to content
quarry View Ticket
Login

View Ticket

2026-09-24
00:52 • Ticket [38d6b16e88] Landing page is no longer live at load: stream invalidation, not rendered rows status still Fixed with 1 other change artifact: 2b68ce5856 user: zeitgeist
2026-08-19
17:02 • Fixed ticket [38d6b16e88]. artifact: 18f04eb269 user: dmestas
12:10 • Ticket [38d6b16e88]: 1 change artifact: 509656016a user: dmestas
11:04 • Ticket [38d6b16e88]: 2 changes artifact: 41dce26ce1 user: dmestas
2026-08-18
23:34 • New ticket [38d6b16e88]. artifact: 0ebe5cc133 user: dmestas

Landing page is no longer live at load: stream invalidation, not rendered rows

Fixed38d6b16e880f095e38ca7260fdb3d39db8c5a48cCreated 104.0 days agoUpdated 67.9 days ago
Description2026-08-18 23:34:26
The fleet listing used to open its SSE stream at page load and repaint as stores ingested. It no longer does: the stream is opened by the filter input on first keystroke (check-in dcbfa94c). Live filtering works; live-at-load was traded away to get it, and that trade should not stand.

## Why it had to go

A stream carries the filter it was opened with. Opened at load that filter is empty, so a few seconds after a reader types into the box the background stream repaints the listing UNFILTERED — the rows they asked for replaced by the rows they did not.

Cancelling the stale stream does not fix it. Datastar RETRIES a connection it aborted (retry "auto", retryMaxCount 10), so the unfiltered stream reconnects on its own and clobbers the view again. Observed directly: correct 4 rows immediately after typing, back to 23 about five seconds later.

requestCancellation is per element and keyed by plugin name, so two attributes on one element DO cancel each other — the retry is what defeats it, not the cancellation.

## The actual fix

Stop streaming rendered rows. The stream should carry an INVALIDATION signal — "the fleet changed, revision N" — and the client should re-request the listing using its current form state:

- Server: /fleet.sse emits datastar-patch-signals with a monotonically increasing revision whenever any store ingests. It renders nothing and therefore carries no filter, so it cannot be stale by construction. - Client: a debounced signal-patch handler on the filter input re-issues the listing request with the form content type. Any change — a keystroke or a server revision bump — takes the same path and always sends the current filter. - /fleet.frag is a one-shot: one datastar-patch-elements for #fleet, then close. No long-lived connection holding stale parameters.

That also removes the last long-lived stream from the landing page, which matters for the scale ticket (fbe8dbfcc2): one open SSE connection per idle viewer is a per-reader cost, and a revision signal is cheap enough to broadcast.

## Acceptance

- Load the page, do not touch it, cause an ingest: the listing updates. - Filter to a subset, wait past any poll interval: it stays filtered. - Filter, then cause an ingest: the listing updates AND stays filtered. - Scripting off: the form still submits and the server renders the same page.

## Related

The timeline page still opens its stream at load and is unaffected — it has no filter to go stale against. Whatever shape this takes should be applied there too, so both live surfaces work the same way rather than by two different mechanisms.

2026-08-19 17:02:45

Fixed with the shape the ticket specified.

/fleet.rev — the long-lived stream carries only datastar-patch-signals {fleetRev: N}. It renders nothing, so it holds no filter and cannot be stale; retry resurrection is harmless because a resurrected signal stream still says only "revision N". Bumps on every notifier tick, plus a 2s poll over a cheap fingerprint (which repos are still indexing) so the indexing badge clears without a fleet-wide render per poll.

/fleet.frag — a one-shot: one patch-elements for #fleet, then close. The client's effect ($fleetRev && @get(..., form)) and the debounced input both go through it with the FORM content type, so every refresh — keystroke or background bump — serializes the filter as it is at that moment. The && guard keeps the effect's initial run from re-fetching the page the server just rendered.

Acceptance verified live: rev stream opens at load; a real write bumped fleetRev on an open stream; /fleet.frag?q=quarry returned exactly the filtered row and CLOSED (the held connection was the bug's carrier); no-script submits render server-side unchanged.

Also banked for #fbe8dbfcc2: an idle viewer now costs one signal stream and zero renders, instead of a full fleet render every 2s per open tab.

Timeline note: its stream still ships rendered rows, but its only parameter is the branch, which changes by NAVIGATION (new page, new stream), not by live filtering — no staleness window exists. Converting it to this shape is worthwhile uniformity when someone touches it, not a defect today.