Skip to content

Components chapter always reads "Modified" and its reset does nothing #534

Description

@mehdibha

In the /create control panel, the Components chapter shows the modified dot and reset button on a pristine load, and clicking reset never clears it.

useSectionStatus('components') (www/src/modules/create/panel/schema.tsx) tests Object.keys(designSystem.componentParams).length > 0, but componentParams is never empty: DEFAULTS.componentParams is seeded with every registry item's param defaults, and decodePreset merges defaults back in. Reset writes componentParams: {}, which round-trips through encode/decode straight back to the full defaults.

Fix direction: diff against DEFAULTS.componentParams (the comparison encodePreset's diffNestedRecords already does) instead of testing for emptiness — matching how every other chapter derives its status.

Found reviewing #511.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: builderThe /create builder experiencebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions