Skip to content

date: 2026-06-23 tags: [vrt, reg-suit, reg-viz, reporting] status: active graduated_to:

reg's report is a directory tree keyed by file path — the path IS the label, there's no display-name field

Symptom — wanted the VRT report grouped (not one long flat list) and with readable item names like "Alert Error / Dark (Desktop)" instead of alerterror/dark__desktop.

Root cause — reg-viz (the reg-cli/reg-suit report) builds a collapsible directory tree by splitting each image's path on /, and prints that path verbatim as the item's label. There is no separate display-name field (reg-cli's only report flags are -J/-R/--junit/-F). So both the grouping and the names come entirely from the snapshot file paths.

Fix — shape the path in scripts/vrt-capture.mjs:87-104 (PR #726): drive the output path off each story's Storybook title, Title-Case + CamelCase-split each segment, and put the viewport in parens — Components/Alert Error/Dark (Desktop).png. Spaces and parens are valid in the filenames / S3 keys and load fine in the report (verified: zero image-load failures through them).

Guard — the pretty() + outPathFor() helpers in vrt-capture.mjs. Two consequences worth remembering: to group the report, nest the snapshots in folders; to rename an item, rename its file (the .png extension always shows — reg can't strip it). Worth a line in docs/agents/storybook.md if the scheme changes again.