Skip to content
quarry History Of Ticket 38d6b16e88
Login

History Of Ticket 38d6b16e88

Artifacts Associated With Ticket 38d6b16e88

  1. Ticket change [0ebe5cc133] (rid 962) by dmestas on 2026-08-18 23:34:26:

    1. Untracked field cmimetype: "text/x-markdown"
    2. comment initialized to:
      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.
      
    3. severity initialized to: "Important"
    4. status initialized to: "Open"
    5. title initialized to:
      Landing page is no longer live at load: stream invalidation, not rendered rows
      
    6. type initialized to: "Code_Defect"
  2. Ticket change [41dce26ce1] (rid 1060) by dmestas on 2026-08-19 11:04:26:

    1. priority changed to: "High"
    2. type changed to: "Code_Defect"
  3. Ticket change [509656016a] (rid 1111) by dmestas on 2026-08-19 12:10:41:

    1. subsystem changed to: "web"
  4. Ticket change [18f04eb269] (rid 1213) by dmestas on 2026-08-19 17:02:45:

    1. icomment:
      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.
      
    2. mimetype: "text/x-markdown"
    3. resolution changed to: "Fixed"
    4. status changed to: "Fixed"
  5. Ticket change [2b68ce5856] (rid 12469) by zeitgeist on 2026-09-24 00:52:59:

    1. Untracked field number: "34"