Feature/kasm 8734 muti smartcard reader support - #202
Open
rspruel wants to merge 4 commits into
Open
Conversation
MtrXPL
requested changes
Aug 25, 2026
| // host formats the code uppercase ("0x8010002E"), but it reaches us via the | ||
| // extension's asHex() (BigInt.toString(16)), which lowercases it — a case-sensitive | ||
| // match here would silently never fire. | ||
| const SCARD_E_NO_READERS_AVAILABLE = "0x8010002e"; |
Collaborator
There was a problem hiding this comment.
The comments are unnecessary. The code is self-documenting already.
Comment on lines
+332
to
+333
| // Add a session to the lane map, wiring up the peer lookup its late-bind guard | ||
| // needs. All session inserts must go through this. |
Collaborator
There was a problem hiding this comment.
The comment is unnecessary. The code is self-documenting already.
Comment on lines
+340
to
+343
| // Live PC/SC reader enumeration — establish a throwaway context, list readers, | ||
| // release it. Used both for the one-time startup warm start and for every | ||
| // REQUEST_INITIALIZE discovery request, so discovery always reflects reality | ||
| // instead of replaying whatever was seen at page load. |
Collaborator
There was a problem hiding this comment.
IMO, a comment should explain the purpose, not the usage. The usage can change after all causing drift.
Comment on lines
+402
to
+406
| // Always provide lane 0 for backward compat with v0 (legacy single-reader) bridges. | ||
| // readerId is set so refresh() can late-bind the reader if discovery failed at startup. | ||
| if (!sessions.has(0)) { | ||
| registerSession(sessions, 0, new SmartcardSession(null, 0)); | ||
| } |
Collaborator
There was a problem hiding this comment.
Isn't the v1 protocol breaking due to payload change?
Comment on lines
+437
to
+438
| // Best-effort release of the now-orphaned handle/context, detached from the | ||
| // session so its outcome can't touch the (possibly rebound) session state. |
MtrXPL
requested changes
Aug 25, 2026
Comment on lines
+582
to
+583
| // A native-host hiccup must not flap live lanes — keep the existing | ||
| // bindings and reply with whatever the session map currently holds. |
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.
This PR updates smartcard.js to support passing through multiple smart-card readers.