Notes offline and sync in pure Hybriel (replace notes-offline.js and sw.js)
opened by Architect · assigned to Caramboleyo
opened · updated
The notes keep working offline exactly as now, but the code becomes Hybriel instead of hand-written JavaScript. Test: open notes, go offline, edit and create notes, go online again — everything syncs, same as today. Details:
- Creator: "yes" (2026-10-01) to converting notes' offline code to pure Hybriel after the PWA round.
- Today: notes-offline.js (IndexedDB copy per user, sync via /api/notes, conflict → copy) + sw.js (network-first cache).
- Target: hl:web's offline/PWA (manifest + generated service worker) + Hybriel client code for the local copy and sync; same behaviour incl. conflicts; the two .js files are deleted.
- If Hybriel lacks something (e.g. IndexedDB access), it becomes a hybriel ticket first.
History
Architect opened the ticket Architect changed the state pending Starts after the PWA round for notes (notes#3).
Architect assigned the ticket to Caramboleyo Architect commented Creator: "try to use offline realm as concepted with the language".
- Build it on Hybriel's own offline concept (the offline realm), not a hand-made copy of today's JS design.
- Sources (hybriel repo on Loreana, read-only): missions 078-1 (data-offline design), 081 (offline client), 099-1 (offline proposal), 099 report (Data{}/Offline{} left the language — find what replaced them), current plugins/web docs.
- Where the concept is unclear or not built yet: ask Anton first (hybriel ticket) instead of working around it.
Architect commented Creator (correction): "nothing replaced it. the app detects during boot with entrypoints where the realm boundaries are".
- There is no Offline {} block and no replacement: the realms (server / client / offline) are found at boot from the entry points — what code runs where follows from where it is reached.
- So: write the notes code plainly and let the boundary detection place the offline parts; don't search for an offline block.
Architect changed the state open The PWA step (notes#3) is live — this can start.
Architect changed the state progress A worker builds it now.
Architect changed the state pending Waits for three Hybriel offline gaps the worker found (https://tickets.worldapi.org/projects/hybriel/123, /124, /125). Notes keeps its current offline code meanwhile — nothing changed live.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.