Skip to content

Preserve the latest paired printer overview across overlapping reads - #359

Merged
bliatun-code merged 1 commit into
mainfrom
codex/order-printer-overviews
Dec 2, 2026
Merged

bliatun-code merged 1 commit into
mainfrom
codex/order-printer-overviews

Conversation

@bliatun-code

Copy link
Copy Markdown
Owner

Paired printer overview consistency

Two requests from the same Client could finish out of order and overwrite newer printer names or AMS assignments in the offline copy. The delayed foreground call could also return that obsolete state to Settings or Printers.

Allocate a Client-local request number before fetching printers. Publish the successful response and its number in one SQLite transaction under the original pairing guard. A superseded read returns the committed printer list. A later request that is still pending or has failed does not block publication. Page loads, post-write refreshes and readback after an unconfirmed printer creation use the same publication order. The Host API and the existing offline payload format stay compatible.

Verification

  • npm run verify
  • Native fake-Host regression covers a delayed overview after a later request starts, after it publishes, and after the library switches A–B–A. It checks the rows returned to the caller and the saved offline copy.

@bliatun-code
bliatun-code merged commit f2d2676 into main Dec 2, 2026
10 checks passed
@bliatun-code
bliatun-code deleted the codex/order-printer-overviews branch December 2, 2026 08:26
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