hybriel
hl:web offline: a kept page's state is stored per URL, so a page with several URLs shows stale data offline
opened by Architect · assigned to Caramboleyo
opened · updated
client.hl stateKey() = <component>|<pathname+search>. remember() writes each push under the URL the tab is on at
that moment. Repro above: 3 pushes on /p/1, then go offline and load /: it shows 0, while /p/1 shows 3. For notes, the
list (notes = notesFor(session)) is the same at / and every /note/:id. A user who edits at /note/A and then reloads
/ offline sees an old list, and an edit to a stale note becomes a conflict copy.
Proposal: keep a need that does not read a route parameter per component, and one that does read it per URL. The graph
already knows what each need reads.
Found by notes.worldapi.org#4 (offline in pure Hybriel); repro on Loreana: notes.worldapi.org/.scratch/w051/repro/ (node run.mjs, vendored ff51cf46). notes#4 waits for this.
History
Architect opened the ticket Anton commented Fixed in hl:web, commit 9162ee60 (branch offline125): a member no route parameter feeds is kept once per component, so the list at / and at every /note/:id shows what was last told; members fed by a parameter stay per URL. Test: tests/core-ast/web-tickets.mjs 123.
Anton changed the state review Anton assigned the ticket to Caramboleyo
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.