You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 20c42b2
Browse filesBrowse the repository at this point in the historyBrowse files
-**Spool detail side panel no longer flashes when something else changes in Firestore.** Editing a different spool — from the mobile app, from another device, or even just a write echo coming back — used to tear down and rebuild the entire side panel, flashing the product photo and every SVG icon (badges, twin link, chip status). The panel now compares the displayed spool against the last render and skips the rebuild when the visible fields haven't changed. Editing the open spool's own weight still triggers one rebuild instead of two or three, because the server-commit echo carries the same signature as the pending-write update and is now ignored.
Copy file name to clipboardExpand all lines: WORKLOG.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,11 @@
1
-
# Worklog — v1.8.15 (in progress)
1
+
# Worklog — v1.8.16 (in progress)
2
2
3
3
## Added
4
-
- Firestore IndexedDB offline persistence on every Firebase app instance (default + per-account named apps). Snapshot listeners now replay from the local cache on cold start and only deltas hit the network — cuts cold-start reads from ~130 (100 spools + 10 racks + 5×printer brands + scales + friends) to near-zero on repeat boots and makes the UI usable while offline. Implemented via `enablePersistence({ synchronizeTabs: true })` right next to `firebase.initializeApp` so it runs before any other Firestore call — `renderer/firebase.js`.
5
4
6
5
## Changed
7
-
- Image cache no longer returns base64 `data:` URLs to the renderer. The main-process `img:get` IPC now returns a stable HTTP URL (`/img-cache/<md5>.<ext>`) served by the local dev server straight from the on-disk cache. With a stable HTTP URL, Chromium can keep the decoded bitmap alive across DOM operations — destroying and re-creating an `<img>` element no longer forces a re-decode, so view switches and full rebuilds no longer flash the product thumbnails. The HTTP response carries a 1-day Cache-Control header for good measure — `main.js`.
8
6
9
7
## Fixed
8
+
- Spool detail side panel: stop tearing down the panel on every Firestore snapshot. Editing a different spool elsewhere (mobile app, another device, anything firing a Firestore write) used to flash the open side panel — every image and every SVG icon was destroyed and re-created because `subscribeInventory.onSnapshot` unconditionally called `openDetail(state.selected)` → `panelBody.innerHTML = buildPanelHTML(r)`. The snapshot listener now calls `refreshOpenDetail()` which compares a `_rowSignature` of the displayed spool against the last render and only rebuilds the panel when the displayed spool's visible fields actually changed. Editing the open spool's weight still triggers one rebuild (pending-write echo) instead of two or three, since the server-commit echo carries the same signature and is now skipped — `renderer/inventory.js`.
0 commit comments