Skip to content

[codex] Update example card monitor flow#46

Merged
darekaze merged 3 commits into
mainfrom
codex/update-example-card-monitor
Jul 2, 2026
Merged

[codex] Update example card monitor flow#46
darekaze merged 3 commits into
mainfrom
codex/update-example-card-monitor

Conversation

@darekaze

@darekaze darekaze commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Updates the example app to use the explicit card monitor lifecycle added in PR #45.

  • Adds Start/Stop Card Monitor controls after connecting a reader
  • Tracks monitor state separately from card presence
  • Resets card presence to unknown when monitoring is stopped because stopping is silent
  • Stops the monitor before disconnecting when it is running

Why

After PR #45, connectReader() no longer starts Card Presence Event monitoring. The example subscribed to card events but never called startCardMonitor(), so the UI could connect successfully while never receiving presence/removal events.

Validation

  • ./node_modules/.bin/tsc -p example/tsconfig.json --noEmit
  • ./node_modules/.bin/prettier --check example/App.tsx
  • git diff --check

Related issues

Close related issues: none. Stacked on #45 and related to #41/#44.

Base automatically changed from codex/explicit-card-monitor-lifecycle to main July 2, 2026 12:19
@darekaze darekaze marked this pull request as ready for review July 2, 2026 12:21
@darekaze darekaze merged commit 46f498f into main Jul 2, 2026
1 check passed
@darekaze darekaze deleted the codex/update-example-card-monitor branch July 2, 2026 12:21
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