|
1 | 1 | # hyperbook |
2 | 2 |
|
| 3 | +## 0.100.4 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- [`d91255b`](https://github.com/openpatch/hyperbook/commit/d91255bb77ce954056c8caa7780a1e7048e60b9d) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Improve the cloud sync indicator: |
| 8 | + |
| 9 | + - Each sync state now has its own badge shape on the toolbar icon. Every state |
| 10 | + previously rendered the identical person glyph, distinguished only by fill |
| 11 | + color, so amber "unsynced" and green "synced" were indistinguishable to a |
| 12 | + red-green color blind reader. |
| 13 | + - Sync states a reader can act on are now surfaced outside the user drawer. |
| 14 | + Being offline or failing to save was only visible in a drawer most readers |
| 15 | + never open. The notice offers a retry when a save fails, and says how much is |
| 16 | + waiting while offline. Successful saves stay silent. |
| 17 | + - A sync conflict no longer reloads the page without warning. The merge is |
| 18 | + explained first, with a "Reload now" button, and the reload follows a few |
| 19 | + seconds later. Reloading is still necessary because directives read the store |
| 20 | + once at startup, but it is no longer a surprise. |
| 21 | + - The toolbar button carries an accessible name that tracks the sync state, and |
| 22 | + the status line is an `aria-live` region, so a change is announced rather than |
| 23 | + only shown. |
| 24 | + - The status line reports what it already knew but discarded: how long ago the |
| 25 | + last save landed, and how many batches are waiting while offline. "Saved |
| 26 | + locally" alone read as "you are all done". |
| 27 | + - The toolbar icon no longer stops updating when the shell is rendered without |
| 28 | + the user drawer. |
| 29 | + - Status colors meet WCAG AA contrast and follow the light/dark theme; they |
| 30 | + were fixed mid-tones at roughly 2-3:1 on white. |
| 31 | + - `hyperbook.i18n.get` honors its fallback argument. Ten call sites in the |
| 32 | + cloud UI passed one, but the parameter did not exist, so a missing key |
| 33 | + rendered the raw key id. |
| 34 | + - The impersonation banner offsets only the element after it, not every |
| 35 | + following sibling, and builds its markup as nodes instead of interpolating |
| 36 | + the username into `innerHTML`. |
| 37 | + |
| 38 | +- [`d91255b`](https://github.com/openpatch/hyperbook/commit/d91255bb77ce954056c8caa7780a1e7048e60b9d) Thanks [@mikebarkmin](https://github.com/mikebarkmin)! - Fix several data-loss and corruption bugs in cloud sync: |
| 39 | + |
| 40 | + - Loading from the cloud no longer fails whenever the server has events but no |
| 41 | + snapshot. The reconstruction the server builds from an event log alone |
| 42 | + carries a placeholder database version, which `import` rejected outright — |
| 43 | + so a user's work synced up but never came back down, silently, until |
| 44 | + something happened to post a full snapshot. |
| 45 | + - The event watermark is now stored per hyperbook. Two hyperbooks served from |
| 46 | + the same origin shared one `localStorage` key, so each sent the other's |
| 47 | + `afterEventId` and got stuck in a permanent conflict loop. |
| 48 | + - A sync conflict no longer discards local work. The client now pulls the |
| 49 | + server state, replays its pending events on top of it locally and remotely, |
| 50 | + and only then reloads. |
| 51 | + - Offline batches now chain onto the watermark each one returns. Every batch |
| 52 | + after the first previously carried a watermark recorded before the flush and |
| 53 | + was rejected, discarding the whole queue. |
| 54 | + - Events now carry their Dexie primary-key schema, so the server can replay |
| 55 | + onto a table it has no snapshot for without assuming the key field is `id`. |
| 56 | + - Ephemeral `currentState` (cursor, scroll, window size) is no longer included |
| 57 | + in cloud snapshots; it was already excluded from events. |
| 58 | + - A batch rejected with a 4xx is dropped instead of being retried forever, and |
| 59 | + a 404 from the cloud no longer throws a `TypeError` that looked transient. |
| 60 | + - Concurrent `online` events can no longer start two overlapping queue flushes. |
| 61 | + - Closing the tab now flushes pending changes with a `keepalive` request |
| 62 | + instead of only warning. Anything changed inside the debounce window was |
| 63 | + lost when the tab closed, and `beforeunload` never fires at all on mobile |
| 64 | + Safari or when a background tab is discarded. |
| 65 | + |
3 | 66 | ## 0.100.3 |
4 | 67 |
|
5 | 68 | ### Patch Changes |
|
0 commit comments