Fix USB printer discovery and reconnect recovery with Windows setting guidance - #996
Merged
Merged
Conversation
…ings Signed-off-by: Sridhar Bala <sridharkalaibala@gmail.com>
Signed-off-by: Sridhar Bala <sridharkalaibala@gmail.com>
Signed-off-by: Sridhar Bala <sridharkalaibala@gmail.com>
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows retains phantom USBPRINT records after reconnecting identical printers. Posnic previously treated those records as an unresolved identity and permanently failed jobs before submission. Match only currently present devices for the configured port; report absent, ambiguous, stale-binding and enumeration failures separately, without replacing a saved destination.
Recover the exact legacy identification failure only when durable state explicitly proves no submission, acceptance, observation or spooler job ID. Cover startup, background polling and repeated enqueue, keeping original job IDs and bytes. Temporary discovery failures use bounded retries and resume after recovery. Submitted and uncertain tickets are not replayed.
Hardware Manager now checks Windows Sleep, Hibernate and USB selective suspend read-only and shows specific instructions for enabled or unverifiable settings. It warns about the diagnostic keep-alive helper. Optional app idle initialization is suppressed if that helper is running or cannot be checked, and supports the observed POS-80C primary Idle / extended Unknown combination through the existing per-printer lock.
Validation: 61 queue/discovery/multi-printer and Hardware Manager rendering checks passed locally and on the new Windows CI job. That workflow runs the real PowerShell resolver tests on Windows for future printer changes. Windows-only tests execute the actual PowerShell resolver with synthetic records, including phantom history, ambiguity, stale IDs, mismatched ports and enumeration failure. The desktop suite passed 3,473 tests with four skips; its one environment failure (unavailable WSL Bash) passed when rerun using Git Bash. Packaging and attribution checks passed. The Windows power audit was also exercised read-only.
No production tickets were replayed and no installed archive, power policy, driver or external diagnostic helper was modified. The handoff's physical USB disappearance is not a proven software or hardware root cause; docs describe retiring the helper and comparing a short direct USB cable with the extender across the same idle interval.