Skip to content

v0.9.0

Choose a tag to compare

@iamalvisng iamalvisng released this 06 Oct 13:14
· 108 commits to main since this release

flowfig 0.9.0 adds two commands. flowfig trace lists the calls under a function, so your agent reads less code before
it draws a figure. flowfig coverage finds the figures that fail or are stale, and the code that has no figure. Each
figure is now accessible to screen readers, and it stops moving if the reader asks for reduced motion.

$ npx flowfig trace src/verify.ts#verify
src/verify.ts#verify -> src/verify.ts#verifyReport          src/verify.ts:104
src/verify.ts#verifyReport -> src/source.ts#links           src/verify.ts:49
src/verify.ts#verifyReport -> src/edges.ts#edgeResult       src/verify.ts:81
...
stop    depth 2: 11 symbols not followed
summary: 13 symbols, 12 found, 0 unsure, 0 open, 4 calls outside the repo, 0.1 s

New

  • flowfig trace <file#symbol>. It starts at one function and follows its calls. Each line gives the caller, the
    callee, and the file and line of the call. Each edge passes the same check as verify. If trace cannot name a target,
    it prints an unsure or an open line with the reason, and it does not guess. Ask your coding agent to run it before
    it writes a figure. Then the agent reads only the lines that the trace names. Options: --depth (default 2), --max
    (default 40), --root, --json. It reads TypeScript, JavaScript, Python, Go, Java, C# and Rust.
  • flowfig coverage. It reads each figure in the repo and gives it a state: ok, stale, fail or none. A
    figure is stale if git shows that a linked file changed after the figure. With --entries <glob>, it lists the code
    files that no figure covers. With --strict, it exits 1 if a figure is fail or stale, so you can run it in CI.
  • Accessible figures. Each SVG now has role="img", a title, and a text transcript of the steps for screen
    readers. The <Flow /> player gives the same title and transcript.
  • Reduced motion in the SVG. If the reader asks for reduced motion, the SVG holds a still frame at the end of the
    first step. The transcript covers every step.
  • Alt text. A render prints an alt: line. Use that text in the alt of the <img> tag in your README.

Requirements

  • Node 18 or later.
  • React 18 or later, only for the <Flow /> player.
  • flowfig coverage reads commit dates with git. Without git, it does not check stale.

Upgrade

  • Render your figures again to add the title, the transcript and the reduced-motion frame.
  • A render now prints one more line, alt: ..., after the step lines. If a script reads the render output, check it.
  • If your GitHub workflow uses the flowfig Action, change it to iamalvisng/flowfig@v0.9.0.

Full Changelog: v0.8.4...v0.9.0