Skip to content

deck: block-by-block table + component heat map from migrate's component-map.json #291

Description

@JonasJesus42

Part of #288.

The two most useful pages of a client-facing deck are the ones the CLI cannot generate yet:

  1. Block-by-block before/after — one row per legacy block, its target component, a status, and
    a one-line note.
  2. Component heat map — the same blocks grouped by page region (top/nav, buy box, below the
    fold, shelves), tone-coded, with a per-zone score.

The heat map is what people actually read. The table is for whoever wants the detail.

The data mostly exists

parity migrate already writes component-map.json and, for VTEX, manifest.json with
vtex.map: Array<{ vtex, faststore, confidence, count }>. That is the before/after mapping. What
is missing:

  • Status. The mapping says what corresponds to what, not whether the target actually reaches
    parity. Four states are needed: parity, divergent, missing, shipped-this-round. Only the first
    three could be inferred (from visual diff + presence in the candidate DOM); the fourth is
    inherently a human statement about the current round.
  • Page region. component-map.json has no notion of "buy box" vs "below the fold". This could
    come from vertical position in the capture, which is cheap and roughly right, or from a small
    hand-maintained region map per page kind, which is accurate and drifts.
  • The note column. Judgment. Should stay hand-written; the generator should leave it empty
    rather than inventing it.

Suggested split

Generate the skeleton — rows, target components, inferred status, zone grouping — and leave status
overrides and notes to a sidecar the human edits, in the same spirit as migration-plan.json.
A generated table nobody trusts is worse than a hand-written one.

Open question

Whether this belongs to migrate (it owns the mapping) or to the deck renderer (it owns the
presentation). Leaning toward migrate emitting a blocks array in DeckModel shape, so the
renderer stays dumb.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions