Skip to content

Investigation: variant counts differ between baseline and round-trip for 14 components #292

Description

@nathanacurtis

This is an investigation, not a fix. It gates honest reading of the 14 largest diffs in the catalog.

The differ compares variant arrays index-to-index, so a single extra or missing variant misaligns every subsequent row. All the highest difference counts in the run come from components with mismatched counts, and those numbers are mostly shift noise rather than fidelity loss.

Evidence

component baseline round-trip reported differences
FormGroupHeading 1 3 23
ExpandoLink 11 10 87
Avatar 15 12 74
Badge 12 22 102
Button 162

Both directions occur — the round-trip both gains and loses variants — so this is unlikely to be a single filter.

Where

packages/figma-from-specs/src/Variants/Variants.tsresolve() computes the Cartesian product and applies invalid: true and invalidVariantCombinations exclusions. Config is confirmed aligned for this run (include.invalidCombinations and include.emptyVariants match on both sides), so config is not the explanation.

Fixtures — start with the smallest

  • FormGroupHeading — 1 → 3, the smallest possible reproduction
  • Avatar — 15 → 12, loses variants
  • Badge — 12 → 22, gains variants
  • ExpandoLink — 11 → 10, off by one

Four components, two in each direction. Do not run the catalog.

What a resolution looks like

Compare the two sides by variant configuration rather than by index, and report which combinations are extra or missing and why. The outcome may be one or more follow-up issues rather than a code change here.

Part of #281.

Metadata

Metadata

Assignees

No one assigned

    Labels

    generatorspecs-from-figma processing engine

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions