Skip to content

Keep the Host purchase total with offline queue pages - #362

Merged
bliatun-code merged 2 commits into
mainfrom
codex/offline-purchase-totals
Dec 2, 2026
Merged

bliatun-code merged 2 commits into
mainfrom
codex/offline-purchase-totals

Conversation

@bliatun-code

Copy link
Copy Markdown
Owner

Offline purchase totals

Stock and purchase queue responses already carry the Host's exact total. The Client discarded it when saving the visited rows, so an offline badge could fall from hundreds of purchases to the size of a single page.

Persist the total alongside its revision and rows, expose it through the scoped cache read, and use it for inventory tab counts. Offline filtering and pagination still use the actual saved rows. The loan workspace also uses the saved total when reconstructing missing badges. A previous-format snapshot still opens offline, and its next stock refresh requests the page once to populate the missing total.

Verification

  • npm run verify
  • SQLite tests cover a one-row filtered page out of 502 purchases, 50 saved rows out of 51, an empty library, an older reply, and upgrading an existing snapshot.
  • The Stock browser test disconnects the Host and checks the purchase badge against the saved total.

@bliatun-code
bliatun-code merged commit bede572 into main Dec 2, 2026
10 checks passed
@bliatun-code
bliatun-code deleted the codex/offline-purchase-totals branch December 2, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant