Skip to content

refactor(react): restructure sources list and sources-add container#191

Open
mrzmyr wants to merge 5 commits intoRhysSullivan:mainfrom
mrzmyr:mrzmyr/source-forms-05-sources-page
Open

refactor(react): restructure sources list and sources-add container#191
mrzmyr wants to merge 5 commits intoRhysSullivan:mainfrom
mrzmyr:mrzmyr/source-forms-05-sources-page

Conversation

@mrzmyr
Copy link
Copy Markdown
Contributor

@mrzmyr mrzmyr commented Apr 11, 2026

5 of 5 — source-forms refactor split from #169. Stacks on #190.

  • pages/sources.tsx: restructures the list to use <CardStack> entries with title cards, moves connected sources to the top, and drops the old built-in section header (built-ins live exclusively in the sidebar now).
  • pages/sources-add.tsx: wraps the add-source container in a relative positioning wrapper so <FloatActions> can render as a sticky bottom bar inside the form without escaping the layout.

Stack

  1. feat(react): add UI primitives for source forms #187 feat(react): add UI primitives for source forms
  2. feat(react): add <AuthenticationSection> primitive #188 feat(react): add <AuthenticationSection> primitive
  3. refactor(mcp): adopt shared primitives in Add/Edit source forms #189 refactor(mcp): adopt shared primitives in Add/Edit source forms
  4. refactor(sources): standardize openapi, graphql, google-discovery, onepassword forms #190 refactor(sources): standardize openapi, graphql, google-discovery, onepassword forms
  5. (this PR) refactor(react): restructure sources list and sources-add container

Until the earlier PRs merge, this PR's diff includes their changes.

mrzmyr added 5 commits April 11, 2026 12:24
Introduces four shared UI primitives that the upcoming source-form refactor
relies on, keeping the refactor PR focused on wiring rather than new atoms:

- <FilterTabs> — compact tab selector used by the shared auth section.
- <FloatActions> — sticky bottom action bar for save/cancel on long forms
  (Claude / ElevenLabs-style editing UX).
- <IOSSpinner> — iOS-style blade spinner for subtle inline loading states,
  paired with a new keyframe in globals.css.
- <Textarea> — adds an optional maxRows prop so source-form preview/error
  panels can cap their height without bespoke wrappers.

No consumers updated in this PR; follow-up PRs adopt them.
Introduces a shared auth block that every source plugin's Add/Edit form can
reuse instead of rolling its own None / Bearer / Header / Basic UI. The
section handles field-level validation via <FieldLabel> / <FieldError> and
exposes a <FilterTabs>-based picker for the auth method.

Also refreshes secret-header-auth.tsx to render errors inline on the field
through <FieldGroup> / <FieldLabel> / <FieldError>, matching the new
primitive's error style.

No plugin consumers updated in this PR; follow-up PRs adopt it.
Replaces the hand-rolled auth/URL/headers UI with <AuthenticationSection>, wraps the save/cancel row in <FloatActions>, and uses <IOSSpinner> + <Textarea maxRows> for probe status and previews. The biggest single form in the source-form suite — isolated here so reviewers can focus on it without context-switching between plugins.
…epassword forms

Adopts <AuthenticationSection> + <FloatActions> + <IOSSpinner> + <Textarea maxRows> across the remaining source-form surfaces:

- openapi: Add/Edit forms pick up the shared auth block; sdk/preview exposes a new PreviewOperation class and sdk/index re-exports it so the Add form can render search + an opacity-50 operation list.
- graphql: Add/Edit forms adopt the shared primitives.
- google-discovery: Add form rewritten to match the standard shape; the API probe (api/group, sdk/plugin) now also returns a list of operations (path + method + description) so the form can display them inline.
- onepassword: settings form picks up the shared <Field> components for consistency with the other plugin forms.
- pages/sources.tsx: restructures the list to use CardStack entries with
  title cards, moves connected sources to the top, and drops the old
  built-in section header (built-ins live exclusively in the sidebar now).
- pages/sources-add.tsx: wraps the add-source container in a relative
  positioning wrapper so FloatActions can render as a sticky bottom bar
  inside the form without escaping the layout.
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