Consume fpagent's fprint-device-status {available, device, captureAgentId}
in the /fingerprint wizard. Availability is tracked tri-state so an agent
that does not report it leaves capture working as before; the header tag
shows offline / no-scanner / ready, the capture panel warns, and capture is
disabled until a supported reader is attached.
Adds a vm-sandbox test for the wizard logic and the OpenSpec change
fpagent-device-availability, archived with the fingerprint-wizard spec.
1.6 KiB
1.6 KiB
Tasks
1. Consume the availability event
- 1.1 In
tools/public/assets/fp/app.js, addagent.available(defaultnull) andagent.device(default''); handlefprint-device-statusto set both and re-render the tag. Verify the handler is present. - 1.2 Clear
availableback tonullanddeviceto''ondisconnectandconnect_error.
2. Show availability
- 2.1 Extend
renderAgentTagto the four states (offline, scanner not connected, agent ready, agent connected/unknown) with the device name in the tagtitle. - 2.2 Add a computed notice (title/subtitle) for agent-offline and
no-scanner, and render it as a warning
cds-inline-notificationin the capture panel. - 2.3 Disable the capture and recapture buttons while
agent.available === false, and makecapture()refuse an attempt in the same state.
3. Docs
- 3.1 Add a paragraph to
README.mdunder "The Fingerprint Agent". - 3.2 Add a line to
tools/public/assets/help.html.
4. Verification
- 4.1
cd tools && npm testpasses (65 tests, 6 new intest/fp-wizard.test.js). - 4.2
openspec validate 2026-10-02-fpagent-device-availability --strictpasses. - 4.3
test/fp-wizard.test.jsloadsapp.jsin a vm sandbox and asserts the availability states, tag labels, capture refusal, and disconnect reset. - 4.4 End-to-end browser pass against a running agent (tag transitions and disabled controls) — done with Playwright driving the real page against a stubbed agent socket; screenshots in the harness run.
- 4.5 Archive the change (
openspec archive), which syncs thefingerprint-wizardspec.