Skip to content

package check --render can't draw a data-bound widget with data #3992

Closed

Description

@max-sixty

A package widget that reads a data source can't be seen with data in leaf package check --render. The check draws each widget's x-example, and an example can bind a source but can't supply its value, so a data-bound widget is drawn and checked only in its empty or waiting state.

To reproduce:

  1. Make a package with one $data.contracts entry and one widget whose x-data input reads it, drawing a list from the value and a short "waiting" line while the value is null.
  2. Give the widget an x-example that binds the input to a source.
  3. Run leaf package check <package> --render.

The widget draws its waiting line, and checks such as keeps-first-box and grows-with-content never see the populated drawing. Seeing it with data today takes a page, markup that binds the source, and a leaf data set by hand.

Expected: a way for a package to give sample values for an example's sources, so package check --render draws and checks the widget populated.

Seen on leaf f97ce55, installed 2026-10-24T13:56:05-07:00.

This was written by Claude Code on behalf of max-sixty

Activity

  1. added
    enhancement
    on Oct 25, 2026
  2. leaf-agent commented on Oct 25, 2026

    @leaf-agent
    Collaborator

    #3997 merged the sample-data support. Add x-example-data beside x-example, mapping the source IDs bound in the markup to sample JSON values. Package checks validate them against the bound contracts, and --render supplies them through ordinary bound data in both layouts. Omitting a source leaves it unset; examples reusing a source ID keep independent values.

    The browser regression verifies that keeps-first-box measures a populated widget in both layouts. Six focused tests, lint, and the PR's CI passed at the merged head.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions