Skip to content
quarry View Ticket
Login

View Ticket

2026-09-24
00:54 • Ticket [548788c1a4] Evaluate Datastar Pro for the fleet filter's URL sync status still Closed with 1 other change artifact: 9777791356 user: zeitgeist
2026-09-03
18:00 • Ticket [548788c1a4]: 1 change artifact: a2d84c8d2a user: dmestas
18:00 • Closed ticket [548788c1a4]. artifact: f0854bcece user: dmestas
2026-08-27
10:55 • New ticket [548788c1a4]. artifact: 6339776ac8 user: dmestas

Evaluate Datastar Pro for the fleet filter's URL sync

Closed548788c1a4b6d97f5f5585e299c789f931fff11aCreated 95.5 days agoUpdated 67.9 days ago
Description2026-08-27 10:55:06
The fleet filter on `/` is the one URL-sync case our hand-rolled `syncurl` helper cannot cover, and it is the only concrete reason to consider Datastar Pro.

## Why syncurl stops here

`syncurl` (internal/web/web.go) works by reading the clicked anchor's own `href` — the real, cold-loadable route — and replaceState-ing to it. That works for the diff toggle and the doc tabs because both are anchors already carrying a real URL.

The fleet filter is not an anchor. It is `<form method="get" action="/">` with a debounced search input plus `kind` and `sort` selects (fleetSource). Without JS it navigates to `/?q=...&kind=...&sort=...`; with JS it fires `@get('/fleet.frag', {contentType: 'form'})` and the address bar never moves. The URL we would want is the serialization of three controls, which no href-reading trick can produce — we would have to build the query string from form state on every change.

## What Pro offers

`data-query-string` syncs signals to query params on change and back on load, with a `__history` modifier. Verified 2026-08-26 against data-star.dev/reference/attributes. Also `data-replace-url`, a thinner version of what syncurl already does for us.

Pro is a one-time lifetime licence: $349 solo, $1,299 team (up to 25 employees). It also carries the Inspector, which is plausibly worth more day to day than the attribute — debugging SSE patches by eye is the real pain in this stack.

## Why this is Low

One affected surface. The filter works correctly today; you simply cannot link to a filtered fleet view or restore one on reload, and the no-JS path already does the right thing. Nothing is broken, and hand-rolling query-string assembly stays available if we decide the surface matters more than the licence.

## What would raise it

More form-shaped filter surfaces. The current inventory is exactly one. At three or four, buying beats hand-rolling.

## Notes

- The load-side half of `data-query-string` is largely redundant here: quarry is server-rendered and every one of these routes already reads its own query string, so the server owns URL-to-state. - Whichever way this goes, the fleet input must use replaceState, not pushState — it is debounced, and pushState would stack a history entry per keystroke burst. - Related: the strata `url-sync-helper` / `url-sync-doctabs` covers the two anchor-shaped cases. This ticket is only about the form-shaped one.

2026-09-03 18:00:42

Won't do