Skip to content

[bug] Setup wizard drops an embedding provider added while Continue saves #4883

Open

Description

@Quick104

What happened

On the setup wizard's Features step, an embedding provider added through the Add provider dialog can be left out of the step's save. The dialog can be closed while Add is still pending. If the admin then presses Continue and Add finishes while that save is in flight, the new provider is staged after the save already captured its values. The step advances with the previous provider binding, and the new selection is never saved.

Steps to reproduce

Not reproduced live; found by source trace.

  1. Start the setup wizard and reach the Features step with recommendations on.
  2. Open the embedding provider field's Add provider dialog, fill it in, and press Add.
  3. While Add is pending, close the dialog (Escape or the overlay).
  4. Press Continue before Add finishes.

Expected behavior

The step saves the provider the admin just added, or holds Continue until the new selection is staged.

Silo version / commit

main at 41e1749

Deployment

Source trace only; no deployment involved.

Clients affected

Web (setup wizard). The admin AI settings page uses the same dialog through EmbeddingProviderField, but that page has no step that advances on save.

Relevant logs

No logs available.

Technical notes

  • web/src/pages/admin-settings/AIProviders.tsx AddAIProviderDialog: <Dialog open={open} onOpenChange={onOpenChange}> closes with no check for a pending create.
  • AddAIProviderSteps save() awaits create.mutateAsync(draft), then calls onCreated(created). That call still runs after the dialog closes.
  • EmbeddingProviderField passes onCreated={(provider) => onChange(provider.id)}. On the Features step, onChange is form.setValue(EMBEDDING_PROVIDER_KEY, id).
  • web/src/pages/setup-wizard/useStep.ts finish() saves the dirty values as of the click, then calls markDone. A value staged after that point stays dirty and is dropped when the step unmounts.

Possible repairs: keep the dialog open (and its Add button the only way out) while the create is pending, or have Continue wait until no create is pending.

#4870 locks a step's own fields during the save. It doesn't cover this callback, which lands from outside the step body.

Defect: Silo-Server/silo-server web/src/pages/admin-settings/AIProviders.tsx AddAIProviderDialog

AI assistance

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code; Codex (review)
  • Model(s): gpt-6.2-sol (found it in review); claude-opus-5-5 (confirmed the trace and wrote this issue)
  • Involvement: Fully AI-generated; not yet human verified
  • Independent review: found by an adversarial review and checked against the source by a second model

Confirmations

  • I searched existing issues for this problem.
  • I reproduced this on a real deployment.

Source: found in review of #4870

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

    bugSomething isn't workingpriority: P2Limited scope, workaround exists, or polish

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions