Skip to content

arch: extract LoadingButton wrapper; revert vendored button.tsx loading patch #282

Description

@cursor

Problem

The coss-vendored Button in packages/ui/src/components/button.tsx has been hand-modified to add loading-state behavior:

  • Imports @vibest/ui/components/spinner
  • Adds data-loading variant classes and a loading indicator slot
  • Exposes a loading prop

Per ADR 0001, edits inside packages/ui/src/components/* are discarded on registry refresh.

Why it matters

Loading behavior will silently disappear or merge-conflict on the next @coss/ui --overwrite pull.

Suggested fix

Extract a thin LoadingButton wrapper in packages/ui/src/ai-elements/loading-button.tsx that composes vendored Button + Spinner. Revert button.tsx to the registry version.

Affected files

  • packages/ui/src/components/button.tsx

Severity

P3

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions