Skip to content

Preserve auto-layout semantics when scaling component instances #1085

Description

@chubes4

Problem

Resized instances of mixed-content auto-layout components can lose the source component layout and scale every descendant as if the component were vector-only. The result is unresolved local geometry, absolute overlapping children, and oversized icons.

Fresh Fisiostetic evidence:

  • Source WhatsApp button 20:264 is a 258.97 × 69.83 flex row with a 34.92px icon.
  • Footer instance 24:184 is 491.03 × 72.89, but emits without flex/button semantics.
  • Its cloned icon 24:184/20:266 becomes 77.14 × 77.14, larger than the parent height, at top:-2.125px.
  • Both the icon and vector descendants report geometry_confidence: unresolved_component_local.
  • ComponentSourceCloneGeometry::mergeRefreshed() applies _component_source_clone_scale through scaleVectorChildren() without first proving the refreshed component is vector-only, and clone layout replacement can discard source auto-layout fields.

Owning contract

Vector-only components may scale descendant geometry with the instance. Mixed-content auto-layout components retain source child sizes and layout semantics; resizing the outer instance changes available layout space rather than raster-scaling text and controls.

Acceptance

  • Mixed text/vector button instances inherit missing source flex layout fields.
  • Mixed-content descendants are not passed through vector-only scaling.
  • Vector-only icon components continue to scale correctly when their own instances resize.
  • Fisiostetic footer WhatsApp icon fits inside the button and no longer overlaps its label.
  • Add deterministic component clone contracts for mixed and vector-only scaling.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode captured the combined fixture, traced the unresolved component-local geometry and scaling paths, and helped formulate the generic contract. Chris Huber remains responsible for the resulting change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions