Skip to main content
A page can render different components across loads because of lazy content, personalization, rotating promotions, or user interaction. Sightmap stores multiple captures as a view set. This page covers the on-disk layout, the novelty gate, and the commands that compare and prune captures.
capture creates captures; see Snapshot & capture. coverage, multi-coverage, and report read saved view sets; see Coverage commands.

The capture layout

View-set captures live at .sightmap/snapshots/{view}/{stamp}.snap. {stamp} is a UTC timestamp in YYYYMMDDTHHMMSSZ form, so lexical and chronological order match:
.sightmap/snapshots/
Two files per capture:
  • {stamp}.snap contains the human-readable annotated tree.
  • {stamp}.snap.tree.json contains the raw component tree used by coverage, multi-coverage, sel-check, and capture-novelty.
Captures do not have curated state names. To cover an open drawer, a selected tab, or another page state, capture the view in that state. The novelty gate adds it to the set only if it contributes new structure.

A view is a set

capture appends to the view’s set instead of overwriting an existing capture. Each reader handles the set differently:
  • coverage reports tiers for each capture and flags a component dead only when it matches none of the captures.
  • report rolls each set up to one row, with T1/T2 as weighted averages and T3 as the maximum across captures.
  • multi-coverage folds each set into one matrix column whose cells are per-component maximums.
A component can therefore be absent from one capture without being reported as dead for the view.

The novelty gate

The novelty gate keeps a capture only when it adds structure to the view’s existing set:
  • A component type that no existing capture matches.
  • An orphan slot that no existing capture contains. A slot is identified by the node’s role and nearest data-testid or data-component ancestor.
Changes to products, prices, or copy within the same structure do not count. The first capture of a view always writes, and capture --force bypasses the gate. (To write a rendered tree to an arbitrary file outside any view set, use snapshot --out FILE — that path never touches the set or the gate.) Novelty depends on the current corpus. The command re-matches saved captures whenever it compares them. A capture kept for unique orphans can become redundant after new component definitions cover those nodes.

capture-novelty

Reports whether a saved capture adds a component type or orphan slot that does not appear elsewhere in its view’s set. Flags:
A redundant capture reports the opposite verdict:

capture-prune

Re-matches every capture in a view against the current corpus and removes captures whose component types and orphan slots all appear in the remaining set. Pruning runs iteratively, never removes the last capture, and reduces identical captures to one. Pass a view name, or use --all for every view with captures. Flags:
Re-run without --dry-run to delete the listed captures along with their .snap.tree.json siblings.
Run capture-prune --dry-run --all after adding component definitions. Review the proposed removals before running it again without --dry-run.

Typical flow

1

Build the set

capture each relevant page state, such as a fresh load, an open drawer, or a selected tab. The novelty gate keeps captures that add a component type or orphan slot.
2

Check a candidate when in doubt

Run sightmap capture-novelty FILE.snap to see what a capture adds relative to the rest of its set.
3

Author against the union

Follow the coverage loop until every capture has zero T3 orphans. New component definitions may make older captures redundant.
4

Prune the redundant captures

Run sightmap capture-prune --dry-run --all, review the plan, then run it again without --dry-run. The remaining captures preserve the same component types and orphan slots.