Open source · Web & UX

Form Flow Replay

Replay keyboard and pointer form flows against saved HTML fixtures.

v1.0.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Offline, read-only comparison of a declarative keyboard/pointer form journey against a separately exported local fixture trace. “Replay” here means checking recorded evidence, not driving a browser or form. No request is sent, no form is submitted, and no external service is contacted. Requires Node.js 22 or newer; no package dependencies.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.

Run the checked-in example

node bin/form-flow-replay.mjs --root examples/passing --plan plan.json --trace trace.json
node bin/form-flow-replay.mjs --root examples/failing --plan plan.json --trace trace.json
npm run check

Read the result

The examples exit 0 (matching trace) and 1 (broken keyboard focus at step-1). Add --human for a short stderr summary. --out report.json additionally writes the same JSON report within --root; stdout remains JSON. The output parent must already exist. Input and output names are relative to root, and input realpaths must remain inside it. Output symlinks, output-parent escapes, and path or hard-link aliases to either input are refused with exit 2 and empty stdout. An ordinary existing output file may be replaced atomically. Without --out, no file is written.

Where this check stops

Each input file is limited to 1,048,576 bytes. At most 100 plan steps and 100 trace steps, JSON depth 5 (each document root at depth 0), and 5,000 ms of evaluation. Each bound accepts exactly N and returns incomplete at N+1. This tool does not run a browser, move focus, trigger validation, submit a form, compare screenshots, or contact a mock or real endpoint. It reports only on the exported local trace, even when a field is named mockSubmit.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.