Files
adebisi-fa 548e33390c feat(fpagent): show scanner availability and gate capture
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.
2026-10-02 15:12:16 +01:00

2.0 KiB

Spec Delta: fingerprint-wizard

ADDED Requirements

Requirement: Scanner availability is shown and gates capture

The wizard SHALL consume fpagent's fprint-device-status {available, device, captureAgentId} event and SHALL distinguish the agent being offline (socket not connected), connected with no supported reader attached (available false), and ready (available true). Until a status is received, availability SHALL be treated as unknown. The wizard SHALL NOT start a capture while no supported reader is attached, SHALL re-enable capture when a reader becomes available, and SHALL clear availability when the agent disconnects. Availability means "a supported reader is attached"; it does not guarantee a capture will succeed.

Scenario: Reader attached on connect

  • WHEN the page connects and fpagent reports fprint-device-status with available: true
  • THEN the wizard shows the agent ready and leaves capture enabled

Scenario: No reader attached on connect

  • WHEN the page connects and fpagent reports fprint-device-status with available: false
  • THEN the wizard shows that the scanner is not connected, explains captures are disabled, and disables the capture controls

Scenario: Unplug blocks capture

  • WHEN fpagent reports available: false while the operator is capturing or between captures
  • THEN the wizard disables the capture controls and a capture attempt is refused

Scenario: Replug re-enables capture

  • WHEN fpagent reports available: true after the reader is reconnected
  • THEN the wizard re-enables the capture controls

Scenario: Status absent or old agent

  • WHEN the connected agent never reports fprint-device-status
  • THEN availability stays unknown and the wizard does not block capture

Scenario: Disconnect clears availability

  • WHEN the agent socket disconnects
  • THEN the wizard shows the agent offline and does not present the reader as available