Skip to content

figma-transformer: improve FSE responsive parity#482

Open
chubes4 wants to merge 183 commits into
trunkfrom
fix/fig-fse-perfection-wave-20260702
Open

figma-transformer: improve FSE responsive parity#482
chubes4 wants to merge 183 commits into
trunkfrom
fix/fig-fse-perfection-wave-20260702

Conversation

@chubes4

@chubes4 chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extract responsive breakpoint media diffing and node matching into dedicated collaborators
  • improve standalone HTML responsiveness with fluid breakpoint widths, safe auto-height flow containers, and shrinkable prose text boxes
  • preserve component-clone vector composition offsets, source-local clone child offsets, and negative-ink SVG overflow for footer/logo parity
  • harden static HTML semantics, form validity, explicit list marker rendering, and descendant-aware layout stacking around the FSE conversion path
  • keep repeated card/content lists semantic without injecting visual bullets unless the source carries explicit list-marker evidence

Testing

  • git diff --check
  • php -l figma-transformer/src/Html/BreakpointMediaDiffBuilder.php
  • php -l figma-transformer/src/Html/ResponsiveNodeMatcher.php
  • php -l figma-transformer/src/Html/LayoutIntentClassifier.php
  • php -l figma-transformer/src/Html/StaticHtmlEmitter.php
  • php -l figma-transformer/src/Scenegraph/ScenegraphNormalizer.php
  • php -l figma-transformer/tests/contract/run.php
  • cd figma-transformer && composer test:contract
  • full FSE fixture generation with configured zstd command: status=success_with_warnings, page_count=5, file_count=34
  • generated HTML validity scan for nested anchors, buttons inside anchors, and nested forms

Notes

  • The FSE fixture now exercises the standalone HTML path through five generated pages and shared CSS.
  • Wave 9 improves homepage card/list marker behavior, footer/newsletter stacking, font materialization evidence, paragraph responsiveness, and the About page ordered-list structure.
  • Remaining fidelity work is preserving explicit marker color/inline marker styling from visual list-marker nodes and synthesizing mobile-only hamburger/menu variant DOM.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI gpt-5.5 via OpenCode, with parallel coding/research agents
  • Used for: Investigating FSE .fig conversion defects, drafting transformer changes and contracts, running verification, and preparing this PR.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Added a second diagnostics/data wave in 1ab1b6c.

What changed:

  • component clone non-emission diagnostics now report counts, omission reasons, and sample nodes
  • decoded text and asset-bearing nodes now include structured omission reasons in transform diagnostics
  • rectangleCornerRadiiIndependent is preserved through Kiwi decode, instance overrides, and normalized figma_box metadata
  • contract docs and contract coverage were updated for the new diagnostic shapes

Verification:

  • git diff --check
  • php -l on touched PHP files
  • cd figma-transformer && composer test:contract
  • full FSE fixture generation with configured zstd command: status=success_with_warnings, page_count=5, file_count=34

Remaining known issue:

  • The Trending section placement defect is still not fixed here. The fanout confirmed the collapse happens upstream of CSS/emission: 4166:4961/4166:4896 is already normalized with y=0, while the comparable sibling/source layout preserves the content frame at y=80. A safe fix needs to preserve variant/source child offsets before selected-frame source-map normalization collapses them; I did not keep a late clone-merge workaround because it did not fix the real trace and would be too sample-shaped.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Added the clone-offset normalization fix in 3095d91.

Root cause:

  • The FSE Trending section instance resolves from component variant source 4166:4927.
  • Source child 4166:4896 has parent-local y=80 in raw/source geometry.
  • The instance derivedSymbolData reports that same source child with transform.m12=0.
  • The normalizer treated that as an override and collapsed the source-local child offset to y=0.

Fix:

  • Preserve source-identified local component clone coordinates when an override collapses a non-zero source coordinate to zero.
  • Added contract coverage for component-source clone child offsets through normalization, emitted CSS, and visual diagnostics.
  • Refined clone omission diagnostics to include visible area and classify composed vector children as composed-into-parent.

Verification:

  • git diff --check
  • PHP syntax checks on touched files
  • cd figma-transformer && composer test:contract
  • full FSE fixture generation with configured zstd command: status=success_with_warnings, page_count=5, file_count=34
  • real FSE output now emits 4166:4961/4166:4896 as top:80px

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Static-site viability wave pushed in 46b337451e3bcda1f03cc27b4e19ff34fd5c45a3.

What changed:

  • Responsive breakpoint matching keeps source-identity mappings for reordered component children, with structural fallback matching for desktop/mobile variants using different source IDs.
  • Full-width component sections and newsletter instances get fluid mobile widths from breakpoint geometry instead of remaining desktop-fixed.
  • Static-site routing infers logo, nav, card-title, and pagination links from the page plan when Figma prototype links are absent.
  • Search/newsletter/comment regions emit semantic form controls with stable static actions and no nested forms.
  • Decorative generic vector layers are hidden from the accessibility tree while logo/brand vectors remain labeled.
  • Multi-page output links shared style.css, and source-backed head metadata/canonical/social tags are supported.

Verification:

  • git diff --check
  • cd figma-transformer && composer test:contract
  • Full FSE fixture generation: status=success_with_warnings, page_count=5, file_count=34
  • Generated artifact check: no nested <form> elements detected.

Residual scale gaps remain around browser-level visual QA, broader fixture-matrix coverage, and source-backed image/SEO metadata beyond fields explicitly supplied by callers.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Next static-site viability wave pushed in d7aeec424894effd7e9a2c715cef44354c62c525.

What changed:

  • Prevented nested anchors by propagating link context during recursive emission.
  • Converted linked button-like controls to structural elements inside anchors instead of emitting invalid a > button.
  • Emits linked list items as li > a, preserving valid ul > li structure.
  • Tightened form detection so large sections containing a search field are not accidentally emitted as giant search forms.
  • Added semantic/accessibility improvements for explicit blockquote/comment containers, sibling-label form controls, and decorative generic Icon vectors.
  • Added responsive safety fallbacks for unmatched header/nav/footer/newsletter shell nodes that otherwise kept desktop absolute geometry.
  • Corrected omitted-text diagnostics so text under omitted parents is not misclassified as form-control conversion.

Verification:

  • git diff --check
  • cd figma-transformer && composer test:contract
  • Full FSE fixture generation: status=success_with_warnings, page_count=5, file_count=34
  • DOM validity scan across generated HTML: no nested anchors, no anchor-wrapped buttons, no nested forms, no direct non-li children under ul, and no accidental giant search form.

Residual scale gaps:

  • Header/mobile visual quality still needs actual viewport/browser review.
  • TOC/list/card semantics need stronger source context before converting more structures safely.
  • Broader arbitrary-file confidence still needs fixture-matrix coverage beyond this FSE Pilot file.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Static layout parity wave pushed in e16182125288537ce8cdcadcf7b4136bc7c73ca4.

What changed:

  • Footer legal text now stays paragraph/legal copy across pages instead of being promoted to page-relative headings.
  • Generic footer responsive safety handles absolute newsletter/footer-row shells more consistently across pages.
  • Responsive centered flex/grid containers keep margin-left:auto;margin-right:auto, fixing archive card-grid/content centering when width becomes calc(100% - gutter).
  • Overlapping child stacks get source/layer-order z-index and isolated parents, so newsletter artwork, featured images, and overlay stacks no longer rely on fragile DOM paint order.
  • Source-backed FILL image crop transforms emit explicit background-size, background-position, and background-repeat:no-repeat when image transform/crop metadata is present.

Verification:

  • git diff --check
  • cd figma-transformer && composer test:contract
  • Full FSE fixture generation: status=success_with_warnings, page_count=5, file_count=34
  • Footer legal node 4184:7891 emits as p on all five pages.
  • Archive card grid .figma-node-4194-1555-frame-16 emits width:calc(100% - 48px);max-width:1440px;margin-left:auto;margin-right:auto.
  • Archive footer newsletter and row emit mobile-safe rules including height:auto, left:24px, and relative wrapping footer row.

Residual risks:

  • Pages without responsive variants still rely on responsive-safety fallbacks instead of true cross-page source-id media propagation.
  • Some hero images still use cover/center when the source has no explicit crop transform.
  • Browser viewport review is still required before calling this production-grade visual parity.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Wave 5 update pushed in 45941f2.

Verification:

  • cd figma-transformer && composer test:contract passed.
  • Full FSE Pilot .fig transform completed with status=success_with_warnings, page_count=5, file_count=34.
  • Generated What Sets Us Apart section emits semantic <ol><li> content with marker-capable display:list-item CSS.
  • Affected body list text is mixed case; inherited uppercase transform is not emitted on the list paragraph classes.
  • Generated HTML scan passed for nested anchors, buttons inside anchors, and nested forms.
  • Mixed absolute/flow containers create a local stacking context with isolation:isolate for safer layering.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Refactor/abstraction fanout pushed in 45e6bfb.

What changed:

  • Extracted responsive breakpoint node matching into ResponsiveNodeMatcher, preserving source-ID matching while adding unique structural signatures for reordered children with changed source IDs.
  • Moved semantic content-list recognition, chrome-list context detection, ordered marker recognition, and local stacking/isolation predicates into LayoutIntentClassifier.
  • Reduced StaticHtmlEmitter list/layout decision code to classifier-backed delegation.
  • Preserved textCase through instance overrides so text normalization can generically clear stale inherited uppercase transforms.
  • Added reusable contract helpers for CSS rule assertions and strengthened contracts for semantic lists, glyph SVG preservation, mixed-case overrides, responsive matching, and mixed absolute/flow stacking.

Verification:

  • cd figma-transformer && composer test:contract passed.
  • PHP syntax checks passed for changed production files.
  • Full FSE Pilot .fig transform completed with status=success_with_warnings, page_count=5, file_count=34.
  • Generated What Sets Us Apart section still emits semantic <ol><li> with marker-capable display:list-item and list marker CSS.
  • Generated HTML scan passed for nested anchors, buttons inside anchors, and nested forms.

Note:

  • The first full transform attempt used the default 120s shell timeout and was killed before writing output; the same command completed successfully with a longer timeout.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Wave 8 evidence

  • Fixed the homepage/archive regression where semantic list restoration used display:list-item and clobbered card layout display/positioning.
  • Semantic list markers now render through pseudo markers, preserving the original list item layout and absolute-child positioning context.
  • Pagination/control lists are excluded from content-list marker CSS so page controls do not inherit bullets or marker spacing.
  • Full FSE generation completed with status=success_with_warnings, page_count=5, file_count=34.

Verification:

  • cd figma-transformer && composer test:contract
  • php -l figma-transformer/src/Html/LayoutIntentClassifier.php
  • php -l figma-transformer/src/Html/StaticHtmlEmitter.php
  • php -l figma-transformer/tests/contract/run.php
  • git diff --check
  • generated HTML validity scan for nested anchors, buttons inside anchors, and nested forms

Latest local artifact for operator review:

  • /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/fse-static-viability-wave8-20260702/site

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Wave 9 evidence

Ten focused minions investigated the next defect wave. This pass landed the safe, contract-backed fixes from that fanout:

  • Homepage/archive repeated card lists stay semantic but no longer get implicit bullets or display:list-item layout side effects.
  • Footer/newsletter sibling stacking now uses descendant visual bounds, so protruding footer underlays do not paint above the newsletter card.
  • Prose text boxes in normal flow emit width:100%, intrinsic max-width, shrinkable flex behavior, and avoid derived desktop soft-wrap content/CSS.
  • About page visual numbered-list rows emit semantic <ol><li> with generated counters and body paragraphs without baked word-split line breaks.
  • Font materialization is present in the generated CSS; Wave 9 result reports missing_font_css: 0 for generated pages.

Verification:

  • cd figma-transformer && composer test:contract
  • php -l figma-transformer/src/Html/LayoutIntentClassifier.php
  • php -l figma-transformer/src/Html/StaticHtmlEmitter.php
  • php -l figma-transformer/tests/contract/run.php
  • git diff --check
  • generated HTML validity scan for nested anchors, buttons inside anchors, and nested forms
  • full FSE generation: status=success_with_warnings, page_count=5, file_count=34

Latest local artifact for operator review on this machine:

  • /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/fse-static-viability-wave9-20260702/site

Known remaining fidelity gaps:

  • Preserve explicit marker color/inline marker styling from visual list-marker nodes.
  • Emit or synthesize mobile-only hamburger/menu variant DOM instead of only diffing CSS for nodes present in the desktop base DOM.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Wave 10 evidence: arbitrary .fig scale pass

Ran a second real-world .fig through the same standalone HTML path:

  • Source: /Users/chubes/Downloads/Yotako - Figma to WordPress - Playground (Autolayout demo).fig
  • Output: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/yotako-autolayout-wave2-20260702/site
  • Result: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/yotako-autolayout-wave2-20260702-result.json

What changed:

  • Responsive grouping now treats _1440 / _375 suffixes as breakpoint tokens, so 6_Blog_1440 + 6_Blog_375 collapse into one responsive 6-blog.html page instead of separate desktop/mobile pages.
  • Centered desktop page canvases with centered auto-layout now emit width:100%; max-width:1440px; margin-left:auto; margin-right:auto, preventing full-width output from pinning to the viewport's left edge.
  • Landmark classification now treats explicit names as candidates, not unconditional tags. Page roots do not become landmarks, menu-item components do not become nested nav, and article-heavy bottom regions do not become footer just because they contain links/legal text deeper in the subtree.

Verification:

  • cd figma-transformer && composer test:contract
  • php -l figma-transformer/src/Scenegraph/ScenegraphFrameInspector.php
  • php -l figma-transformer/src/Html/StaticHtmlEmitter.php
  • php -l figma-transformer/tests/contract/run.php
  • git diff --check
  • DOM validity scans for Yotako and FSE generated HTML
  • Yotako generation: status=success_with_warnings, page_count=2, both pages breakpoint_count=2, missing_font_css=0
  • FSE generation: status=success_with_warnings, page_count=5, file_count=34, missing_font_css=0

Known remaining scale gap:

  • Yotako still surfaces unsupported_vector_network_blob diagnostics. Parser evidence confirms the Kiwi fields are preserved; this is renderer coverage for vector-network blobs, not a page-structure blocker.

@chubes4

chubes4 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Wave 11 evidence: full-bleed root correction

The Yotako scale pass proved responsive grouping and centering evidence, but the first root-centering fix capped the outer page frame at 1440px, which letterboxed full-bleed bands on wider viewports.

This correction keeps the document model generic:

  • viewport/root stays full bleed: page roots emit width:100% without inferred max-width:1440px
  • desktop artboard width remains layout evidence, not a root clamp
  • centered content should be recognized on inner content shells/bands, not by constraining the outer page root
  • responsive grouping and landmark gating from Wave 10 remain intact

Verification:

  • cd figma-transformer && composer test:contract
  • php -l figma-transformer/src/Html/StaticHtmlEmitter.php
  • php -l figma-transformer/tests/contract/run.php
  • git diff --check
  • DOM validity scans for Yotako and FSE generated HTML
  • Yotako generation: status=success_with_warnings, page_count=2, both pages breakpoint_count=2, roots are full bleed with no inferred max-width:1440px
  • FSE generation: status=success_with_warnings, page_count=5, file_count=34, missing_font_css=0

Latest local artifacts:

  • Yotako: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/yotako-autolayout-wave3-20260702/site
  • FSE: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/fse-static-viability-wave11-20260702/site

Remaining generic work from the minion trace:

  • FSE Recent Posts/newsletter spacing needs a content-bearing flex/absolute-layout rule so text/card sections reserve real flow height instead of relying on fixed Figma boxes.
  • FSE About image needs ordered image-layer diagnostics and crop reporting; the asset is present, but diagnostics should identify the top rendered layer and cover-crop behavior.

@chubes4

chubes4 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Refactor wave: HTML/CSS -> Kiwi evidence-chain cleanup

Integrated five parallel minion commits focused on scalable .fig -> legitimate standalone HTML generation:

  • 38c812d figma-transformer: sanitize emitted layout gaps
  • 57ae192 figma-transformer: flag invalid css artifacts
  • 2ea3d34 figma-transformer: extract layout frame role classifier
  • 7c8fbf5 figma-transformer: materialize typography tokens
  • 413fcec figma-transformer: centralize image visual evidence

Evidence chain used by minions:

  • Started from emitted site artifacts, especially Yotako invalid CSS such as gap:NaNpx 130px and negative gap output.
  • Traced affected nodes back through figma-node-trace.php against the raw Yotako .fig to confirm normalized layout evidence carried item_spacing / counter_axis_spacing data.
  • Fixed generically at the pattern/contract layer instead of node-specific CSS patches.
  • Added contracts so non-finite CSS numeric tokens become artifact-quality failures instead of allowing generated sites to report clean/pass.

Verification:

  • php -l changed PHP files passed.
  • cd figma-transformer && composer test:contract passed.
  • Regenerated arbitrary Yotako .fig successfully:
    • artifact: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/yotako-refactor-wave-20260702/site
    • result: /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/yotako-refactor-wave-20260702-result.json
    • status=success_with_warnings
    • page_count=2
    • missing_font_css=0
    • artifact quality clean/pass
    • invalid CSS numeric tokens 0
    • direct generated CSS scan found invalid_css_matches=0 for NaN, Infinity, INF, and negative gap tokens.

FSE note:

  • Full FSE regeneration hit local shell timeouts at 120s and 300s during this run and produced no result JSON. Given the contract suite and Yotako full generation passed, I am treating that as local pressure/inconclusive rather than evidence of a transformer failure.

@chubes4

chubes4 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Wave 27/28 update

Pushed the latest data-parity fixes plus the accepted StaticHtmlEmitter refactor extraction.

Included

  • FSE About hero layering remains fixed: yellow strip z-index:1, hero image z-index:2.
  • FSE list/body text casing override remains present via text-transform:none for list body paragraphs.
  • Accepted emitter refactors are integrated:
    • StaticHtmlCssRuleSet
    • TextStyleDeclarationResolver
    • StaticHtmlLinkState
    • StaticHtmlEmissionDiagnostics
  • Rejected callback-heavy/tiny seams were not included:
    • StaticHtmlTextStyleResolver
    • StaticHtmlLinkEmitter
    • SyntheticFormControlRenderer

Verification

  • php -l passed for touched PHP files.
  • cd figma-transformer && composer test:contract passed.
  • git diff --check passed.
  • Regenerated all four reference artifacts.
  • CSS invalid-token scan found no NaN, Infinity, INF, or gap:-.

Artifact metrics

Fixture Status Quality Pages Files Assets Vector placeholders Missing font CSS
Dr Aarti success_with_warnings warn 10 27 16 0 0
Peter Attia success_with_warnings warn 25 41 15 0 0
Yotako success_with_warnings pass 2 70 67 0 0
FSE success_with_warnings warn 5 34 28 0 0

Remaining warning signals

  • Dr Aarti: large_css_offsets:12, decoded_text_not_emitted:1, suspicious_absolute_to_flow_conversion:6, source_loss_coverage_gap:1.
  • Peter Attia: off_canvas_left_css:1, large_css_offsets:19, off_canvas_visual_nodes:2, clipped_visual_area:11, large_absolute_offsets:2.
  • FSE: overlarge_inline_svg_ratio, suspicious_absolute_to_flow_conversion:3.
  • Yotako: aggregate quality is clean/pass.

AI assistance disclosure for this update: GPT-5.5 via OpenCode integrated the refactor commits, resolved conflicts, and ran verification; Chris remains responsible for review and acceptance.

@chubes4

chubes4 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 29 data-mining integration

Integrated the selected generic improvements from the 12-agent .fig/Kiwi data-mining fleet.

Included

  • Better source-loss accounting for image nodes: missing render asset bytes no longer automatically count as source loss when the source node is emitted or intentionally suppressed.
  • Peter diagnostic precision: suppresses large_css_offsets for visual rects fully contained by their parent, so tall in-page sections stop polluting off-canvas diagnostics.
  • Non-finite layout dimensions from Kiwi are clamped into deterministic zero-dimension diagnostics instead of producing negative-dimension noise.
  • Responsive decision traces now preserve CSS class and source evidence, including matched_breakpoint_variant vs class_safety_fallback and absolute-to-flow conversion flags.
  • FSE inline SVG pressure is reduced by a per-document generated SVG inline budget; later generated vectors are externalized once the budget would be exceeded.
  • Kiwi decode/schema lookup caches and skipped-field inventory JSON hardening improve large-file analysis stability.
  • Node trace component clone evidence is richer for raw symbolData / derivedSymbolData investigations.

Verification

  • php -l passed for changed PHP files.
  • cd figma-transformer && composer test:contract passed.
  • git diff --check passed.
  • Regenerated Dr Aarti, Peter Attia, Yotako, and FSE artifacts.
  • CSS invalid-token scan found no NaN, Infinity, INF, or gap:-.

Final Wave29 artifact metrics

Fixture Status Quality Pages Files Assets Vector placeholders Missing font CSS Remaining signals
Dr Aarti success_with_warnings warn 10 116 105 0 0 decoded_text_not_emitted:1, suspicious_absolute_to_flow_conversion:6, source_loss_coverage_gap:1
Peter Attia success_with_warnings warn 25 85 59 0 0 off_canvas_left_css:1, large_css_offsets:2, off_canvas_visual_nodes:2, clipped_visual_area:11, large_absolute_offsets:3, source_loss_coverage_gap:1
Yotako success_with_warnings pass 2 164 161 0 0 none
FSE success_with_warnings warn 5 48 42 0 0 suspicious_absolute_to_flow_conversion:3

Data conclusions

  • Quality improved, but this still is not perfect/parity-complete: Dr, Peter, and FSE remain warn.
  • Peter warnings are now much sharper: large CSS offset noise dropped substantially, leaving real off-canvas/clipping/large-absolute cases to investigate.
  • FSE no longer reports overlarge inline SVG ratio after generated SVG budget externalization.
  • Yotako remains clean/pass despite raw unsupported vector-network blobs because painted/rendered vectors have alternate decoded geometry.
  • Agentic Commerce remains the major parser scalability blind spot: the .fig is ~318MB with ~314MB image bytes and exhausts memory during raw Kiwi decode before page/node limits can apply.

AI assistance disclosure for this update: GPT-5.5 via OpenCode coordinated Wave29 subagents, integrated selected generic fixes, resolved conflicts, and ran verification; Chris remains responsible for review and acceptance.

@chubes4

chubes4 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 30 large .fig / Kiwi data primitives

Pushed the selected Wave30 improvements from the targeted fleet.

Included

  • Source-loss diagnostics are now sharper:
    • Dr Aarti no longer reports the single decoded-text/source-loss gap caused by an intentionally suppressed off-canvas text node.
    • Peter no longer reports the hidden-parent image source-loss gap.
  • Peter geometry diagnostics classify intended background/crop/decorative bleed instead of treating all large geometry as equally actionable.
  • Source-loss coverage was extracted into SourceLossCoverageBuilder to reduce duplicated accounting logic.
  • Large .fig handling is safer:
    • archive preflight records embedded asset volume and omits huge asset byte payloads by default.
    • zstd command adapter has bounded output preflight.
    • Kiwi selective decode supports bounded repeated fields so diagnostics can proceed without materializing every nodeChanges[] entry.
    • fatal-scale raw decode now returns a structured unsupported envelope instead of crashing for the Agentic Commerce file.
  • Raw Kiwi metadata preservation improved:
    • paint variable/interpolation fields are selectively decoded and surfaced in normalized paint metadata/diagnostics.
    • component override metadata such as overrideKey, proportionsConstrained, and derived symbol layout version is preserved/traced without guessing rendering semantics.
  • Data-mining scripts now share safer CLI helpers for exact paths, bounded summaries, JSON sanitization, and --self-check.

Verification

  • php -l passed for changed PHP files.
  • cd figma-transformer && composer test:contract passed.
  • git diff --check passed.
  • Regenerated Dr Aarti, Peter Attia, Yotako, and FSE artifacts.
  • CSS invalid-token scan found no NaN, Infinity, INF, or gap:-.
  • Agentic Commerce no longer fatals under the tested path; it returns a structured unsupported_decoder_pending envelope.

Final Wave30 artifact metrics

Fixture Status Quality Pages Files Assets Vector placeholders Missing font CSS Remaining signals
Dr Aarti success_with_warnings warn 10 116 105 0 0 suspicious_absolute_to_flow_conversion:6
Peter Attia success_with_warnings warn 25 85 59 0 0 off_canvas_left_css:1, large_css_offsets:2, off_canvas_visual_nodes:2, clipped_visual_area:11, large_absolute_offsets:3
Yotako success_with_warnings pass 2 164 161 0 0 none
FSE success_with_warnings warn 5 48 42 0 0 suspicious_absolute_to_flow_conversion:3

Agentic Commerce probe

Source: /Users/chubes/Downloads/Agentic Commerce WIP.fig

  • Input bytes: 318,474,638.
  • Embedded asset count: 363.
  • Embedded asset bytes omitted by preflight: 314,087,978.
  • Largest embedded asset: 20,058,241 bytes.
  • zstd-inflated Kiwi message bytes: 45,215,359.
  • Result status: unsupported_decoder_pending.
  • Key diagnostics: figma_transformer_archive_asset_content_omitted_size, figma_transformer_kiwi_message_decode_skipped_preflight, figma_transformer_decoded_scenegraph_missing.
  • Bounded parser-parity probe under 512M completed at about 86MB max RSS with a summary envelope instead of fataling.

Memory stance

The goal is not to force every full-fidelity transform under 512M. A ~1GB+ ceiling is reasonable for serious .fig imports, especially with embedded assets. The important change here is that large files now have bounded diagnostics and preflight failure envelopes instead of unbounded fatal memory paths. Full-fidelity Agentic Commerce still needs early page/node-gated decode or streaming scenegraph consumption.

AI assistance disclosure for this update: GPT-5.5 via OpenCode coordinated Wave30 subagents, integrated selected generic fixes, resolved contracts, and ran verification; Chris remains responsible for review and acceptance.

@chubes4

chubes4 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 31 page planning + gated decode

Pushed the selected Wave31 integration.

Included

  • Peter page planning now emits richer candidate-decision evidence: emitted primary pages, responsive variants, filtered candidates, slug collision info, scores, route identity, device hints, and canonical frame IDs.
  • Added generic cross-canvas exploration filtering for duplicate full-page drafts across design/reference canvases while preserving unique reference-only pages.
  • Added route identity reporting tool and compact Peter route report evidence.
  • Added gated Kiwi decode planning for large .fig files:
    • --kiwi-gated-decode
    • selected nodeChanges[] filtering from gate-plan IDs
    • bounded decode contracts
  • Added parser parity operator flag/docs for --max-kiwi-selective-message-decode-bytes and large .fig memory guidance.
  • Kept the responsive hierarchy matcher out of this push because it regressed existing responsive contracts; that remains research, not shipped behavior.

Verification

  • php -l passed for changed PHP files.
  • cd figma-transformer && composer test:contract passed.
  • git diff --check passed.
  • Regenerated Peter artifact.
  • CSS invalid-token scan found no NaN, Infinity, INF, or gap:- in Peter CSS.
  • Ran Agentic Commerce gated decode under 512M.

Peter Wave31 metrics

Fixture Status Quality Pages Files Assets Vector placeholders Missing font CSS Remaining signals
Peter Attia success_with_warnings warn 15 74 58 0 0 off_canvas_left_css:1, large_css_offsets:2, off_canvas_visual_nodes:2, clipped_visual_area:11, large_absolute_offsets:1

Peter page-planner decision evidence:

Decision / reason Count
emitted_primary:selected_for_emission 15
emitted_responsive_variant:selected_for_emission 2
omitted_filtered:cross_canvas_exploration_frame 11
omitted_filtered:design_system_role 40
omitted_filtered:duplicate_draft_frame 3
omitted_filtered:duplicate_route_draft_frame 20
omitted_filtered:internal_only_scope 9
omitted_filtered:low_confidence_route_frame 1
omitted_filtered:page_size_gate 24
omitted_unselected:not_selected_after_ranking_or_route_filters 44

Agentic Commerce gated decode

Source: /Users/chubes/Downloads/Agentic Commerce WIP.fig

Command shape:

php -d memory_limit=512M figma-transformer/bin/figma-transformer \
  "/Users/chubes/Downloads/Agentic Commerce WIP.fig" \
  --zstd-command="/opt/homebrew/bin/zstd" \
  --kiwi-gated-decode \
  --max-pages=1 \
  --max-nodes=200

Result:

  • Status: success_with_warnings.
  • Runtime: 9.50s.
  • Max RSS: 316,030,976 bytes (~301 MiB).
  • Peak memory footprint: 299,582,112 bytes.
  • Output: 2 files, 1 page, 37 reported nodes in the final transform envelope, 19 text nodes.

Data conclusion

Peter’s duplicate/alternative pages are now much clearer: they are mostly versioned design-canvas drafts, reference scopes, design-system frames, or duplicate route drafts. Agentic Commerce is no longer just a fatal-scale black box; selected gated decode can produce a bounded artifact under 512M, while full-fidelity import still needs dependency expansion for selected subtrees.

AI assistance disclosure for this update: GPT-5.5 via OpenCode coordinated Wave31 subagents, integrated selected generic fixes, dropped an unsafe responsive matcher change after contract failures, and ran verification; Chris remains responsible for review and acceptance.

@chubes4

chubes4 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 31 fixture regression sweep

Ran the full-transform regression sweep after the Wave31 page-planning/gated-decode push.

Command shape for each fixture:

php -d memory_limit=1536M figma-transformer/bin/figma-transformer <fixture.fig> \
  --zstd-command="/opt/homebrew/bin/zstd" \
  --multi-page \
  --max-pages=50 \
  --max-nodes=5000

CSS invalid-token scans found no NaN, Infinity, INF, or gap:- across Dr, Yotako, FSE, or Peter regenerated artifacts.

Fixture Status Quality Pages Files Assets Vector placeholders Missing font CSS Signals
Dr Aarti success_with_warnings warn 10 116 105 0 0 suspicious_absolute_to_flow_conversion:6
Yotako success_with_warnings pass 2 164 161 0 0 none
FSE success_with_warnings warn 5 48 42 0 0 suspicious_absolute_to_flow_conversion:3
Peter Attia success_with_warnings warn 15 74 58 0 0 off_canvas_left_css:1, large_css_offsets:2, off_canvas_visual_nodes:2, clipped_visual_area:11, large_absolute_offsets:1

Conclusion: Dr/Yotako/FSE stay on the expected Wave30 baseline after Wave31. Peter keeps the intended page-planning improvement and now has explicit candidate decision evidence instead of noisy duplicate/versioned page emission.

@chubes4

chubes4 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 31 extra community .fig validation

Ran two newly downloaded community Figma files through the current PR head.

Command shape:

php -d memory_limit=1536M figma-transformer/bin/figma-transformer <fixture.fig> \
  --zstd-command="/opt/homebrew/bin/zstd" \
  --multi-page \
  --max-pages=50 \
  --max-nodes=5000
Fixture Status Quality Pages Files Assets Vector placeholders Missing font CSS Artifact-quality signals
Whitepace - SaaS Landing Page (Community) success_with_warnings pass 3 10 6 0 0 none
Positivus Landing Page Design (Community) success_with_warnings pass 7 15 7 0 0 none

CSS invalid-token scans found no NaN, Infinity, INF, or gap:- in either generated site artifact.

Non-blocking diagnostic notes observed:

  • Whitepace includes route/page-planning and residual geometry instrumentation such as low_confidence_route_frame_filtered, responsive_group_formed, large_absolute_offsets, and large_css_offsets, but no artifact-quality signal crossed the failure/warn threshold.
  • Positivus includes source/normalization instrumentation such as zero-dimension source nodes, local style paint conflicts, component clone transform preservation, and unsupported vector blob accounting, while artifact quality still passed with zero vector placeholders.

Conclusion: these two extra community files do not expose a new landing blocker for this PR.

@chubes4

chubes4 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 31 deeper fidelity follow-up

Pushed a follow-up after reviewing the new Whitepace and Positivus community files visually.

What changed

  • Page selection now keeps explicit front-page device-named frames like Landing page V1 / desktop / 1920px instead of filtering them as low-confidence utility/device frames.
  • Page-sized Home frames can override a design-system scope when the frame itself clearly represents the front page. This fixes Positivus selecting Tools instead of Home as the entrypoint.
  • Document-mode normalization now applies --max-nodes per selected document_frame_ids root instead of slicing the first N nodes in document order. This fixes hollow selected responsive pages when a large community file has many nodes before the selected page subtree.
  • Component placeholder text exactly Label is suppressed for unresolved component instance/source-clone paths, matching existing Button Label placeholder suppression.
  • HTML artifact diagnostics now detect desktop-canvas pages with no responsive breakpoints and surface that warning through multi-page artifact quality.

Verification

  • PHP syntax checks passed for changed files.
  • cd figma-transformer && composer test:contract passed.
  • git diff --check passed.
  • Regenerated Whitepace and Positivus artifacts.
  • CSS invalid-token scans stayed clean.

New community file evidence

Whitepace improved materially after selected-subtree normalization:

Fixture Quality Pages Files Assets Vector placeholders Missing fonts
Whitepace pass 5 523 517 0 0

Before the subtree fix, the same run emitted 226 files / 220 assets because the selected page subtrees were pruned by the global --max-nodes=5000 slice.

Positivus now surfaces the real limitation instead of reporting a clean top-level artifact:

Fixture Quality Pages Files Assets Key signals
Positivus warn 8 78 69 off_canvas_left_css, off_canvas_visual_nodes, large_absolute_offsets, desktop_canvas_without_responsive_breakpoints

The Positivus Home source appears to be one large desktop artboard, not a responsive sibling group. The transformer now reports that honestly. The next generic step is responsive synthesis from a desktop/canvas-like source, not more page selection work.

Why this matters

This follow-up shifts the bar from “selected files produced HTML” toward “the artifact quality surface catches visual-fidelity risks reviewers can actually see.” Whitepace now preserves far more selected-page content, and Positivus no longer gets a misleading pass when it is still a fixed desktop canvas.

AI assistance disclosure for this update: GPT-5.5 via OpenCode helped inspect generated artifacts, mine source/HTML/CSS diagnostics, implement generic fixes, add contracts, and run verification; Chris remains responsible for review and acceptance.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant