41 lines
1.6 KiB
Markdown
41 lines
1.6 KiB
Markdown
# Tasks
|
|||
|
|
|
||
|
|
## 1. Consume the availability event
|
||
|
|
|
||
|
|
- [x] 1.1 In `tools/public/assets/fp/app.js`, add `agent.available` (default
|
||
|
|
`null`) and `agent.device` (default `''`); handle `fprint-device-status` to set
|
||
|
|
both and re-render the tag. Verify the handler is present.
|
||
|
|
- [x] 1.2 Clear `available` back to `null` and `device` to `''` on `disconnect`
|
||
|
|
and `connect_error`.
|
||
|
|
|
||
|
|
## 2. Show availability
|
||
|
|
|
||
|
|
- [x] 2.1 Extend `renderAgentTag` to the four states (offline, scanner not
|
||
|
|
connected, agent ready, agent connected/unknown) with the device name in the
|
||
|
|
tag `title`.
|
||
|
|
- [x] 2.2 Add a computed notice (title/subtitle) for agent-offline and
|
||
|
|
no-scanner, and render it as a warning `cds-inline-notification` in the
|
||
|
|
capture panel.
|
||
|
|
- [x] 2.3 Disable the capture and recapture buttons while
|
||
|
|
`agent.available === false`, and make `capture()` refuse an attempt in the
|
||
|
|
same state.
|
||
|
|
|
||
|
|
## 3. Docs
|
||
|
|
|
||
|
|
- [x] 3.1 Add a paragraph to `README.md` under "The Fingerprint Agent".
|
||
|
|
- [x] 3.2 Add a line to `tools/public/assets/help.html`.
|
||
|
|
|
||
|
|
## 4. Verification
|
||
|
|
|
||
|
|
- [x] 4.1 `cd tools && npm test` passes (65 tests, 6 new in
|
||
|
|
`test/fp-wizard.test.js`).
|
||
|
|
- [x] 4.2 `openspec validate 2026-10-02-fpagent-device-availability --strict`
|
||
|
|
passes.
|
||
|
|
- [x] 4.3 `test/fp-wizard.test.js` loads `app.js` in a vm sandbox and asserts the
|
||
|
|
availability states, tag labels, capture refusal, and disconnect reset.
|
||
|
|
- [x] 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.
|
||
|
|
- [x] 4.5 Archive the change (`openspec archive`), which syncs the
|
||
|
|
`fingerprint-wizard` spec.
|