Repository navigation
fix(serving): browser Back no longer restores a public patch with a dead client - #368
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. The persisted SpecNo merge-blocking intent findings. The shell reloads only on a persisted return. Existing broker/client teardown remains intact; the change neither reopens the old port nor adds replay of pending operations. ADR-0010 records that behavior. No missing requirement or unrelated behavior change found. Verification: the focused Chromium test passed, 1/1: pnpm exec playwright test -c playwright.tier1.config.ts --project=chromium --grep "Back to a cached public patch leaves a working client"The test confirmed Summary: Standards 0 blockers, none; Spec 0 blockers, none. |
dc62de2 to
764f06a
Compare
af60cd0 to
130ebc3
Compare
764f06a to
d2929a5
Compare
… a closed client The broker and client close on pagehide. A back/forward-cache restore resumed that closed document, so every route call rejected unknown_outcome until a manual reload. On a persisted pageshow the shell now reloads, getting a fresh document and broker; pending work is never replayed and the old port stays closed. Public shells keep their one-minute cache rather than opting out with no-store, which Chromium and Safari no longer treat as a reliable opt-out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
130ebc3 to
56cb499
Compare
…array elements (#369) Stacked on #368 (branch fix/341-bfcache). Fixes #340. Postgres relation reads (`list`, `get`, `getMany`) rounded `bigint[]` and `numeric[]` elements, so two distinct external ids like `9007199254740992` and `9007199254740993` came back equal. `query` on the same columns already returned them exactly, as strings. The relation mapping projected every array through `to_jsonb`, which turns elements into JSON numbers. Arrays whose element is int8 or numeric now go through `text[]` first, so elements arrive as strings, matching the scalar and query paths. Nulls and dimensions are kept, domain arrays and arrays of int8/numeric domains are covered, and older snapshots without element metadata fall back to the builtin array name. Other arrays (such as `integer[]`) still return numbers. The postgres skill and `docs/product.md` now say array elements of int8/numeric are strings. Tests: - New parity case discovers a table with `bigint[]`, `numeric[]` (with a null), an int8-domain array, a domain over `bigint[]`, a 2-D `bigint[]` and an `integer[]` control, then checks list/get/getMany against query on both native Postgres and the PGlite dev fixture. It failed on the unmodified code with the ticket's exact rounding, on each surface separately. - Mapping unit test covers which arrays get the text projection, with and without element metadata. - `pnpm typecheck` and `pnpm lint` pass. The integrations suite passes. The full `pnpm test` had 4 timeouts under machine load (Operations, Runtime, PgliteCompanyDatabases); those files pass when run alone. Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).
Leaving a public patch and coming back with browser Back could restore a page that looked ready but whose client had already closed. Every route change then failed with
unknown_outcomeuntil you reloaded by hand. Fixes #341.Stacked on #367 (branch fix/324-unicode-route).
The broker and client close on
pagehide, and a back/forward-cache restore resumes that closed document without running setup again. The shell now reloads when it gets apageshowwithpersistedset. That gives a fresh document and broker, and pending work is never replayed or sent over the old port. Reloading beats marking the public shellno-store: we keep its one-minute public cache, andno-storeno longer reliably keeps a page out of the back/forward cache in Chromium or Safari. ADR-0010 now says this in one sentence.Test evidence
--disable-back-forward-cacheflag, because the headless build refuses to cache. It checks thatpageshow.persistedwas true, then clicks the in-patch "Next route" button until the URL changes./items/2.pnpm typecheckandpnpm lintpass.pnpm test: 955 of 957 passed. The 2 failures were 5-second timeouts in the integrations Postgres suites, which this change doesn't touch; both files pass when run alone.Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).