Skip to content

feat(app): cloud providers import automatically — no Import button - #3519

Closed
benjaminshafii wants to merge 2 commits into
devfrom
feat/cloud-provider-auto-import
Closed

feat(app): cloud providers import automatically — no Import button#3519
benjaminshafii wants to merge 2 commits into
devfrom
feat/cloud-provider-auto-import

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

What

Org-managed (cloud) providers now land in the workspace with zero clicks. The silent auto-import machinery (performCloudProviderSync) already ran on sign-in/app-launch/app-resume/new-chat/model-picker; this PR makes the settings surface drive that same sync and removes the manual affordances it made redundant:

  • Settings → AI Providers / Cloud Providers triggers the full sync on mount and on Refresh (previously the AI tab never synced and Refresh only refetched lists, stranding providers under "Available" behind an Import button).
  • Import and Sync row buttons are gone. Rows are status displays; the not-yet-imported group is labeled "Importing…".
  • runCloudProviderSync now resolves a typed outcome (synced | failed | handled_server_side); the view surfaces failed inline in the section error notice, and Refresh retries.
  • Mount sync is guarded by a per-user.id::orgId key so snapshot-driven re-renders can't re-trigger it; the sync callback is passed as a stable store method.
  • Section hint copy updated to describe automatic import.

Approved voice-over (demo-driven): admin publishes a provider in OpenWork Cloud → member's desktop shows it Imported with nothing to click → its models are immediately usable → later model-list changes reconcile automatically (no Sync button, Refresh just re-runs the sync).

Evidence

evals/specs/cloud-provider-auto-import.slow.test.ts (new, @openwork/testkit) encodes the narration end-to-end against a cold-booted local Den + Electron: provider created via Den API → settings shows the row Imported with an exact-match assertion that no button labeled "Import" or "Sync" existsgpt-5.4 selectable in the composer → admin PATCHes the model list → after Refresh the row is still Imported, "Out of sync" never demands action, and gpt-5.4-mini becomes selectable. Tape: 7/7 frames, 11/11 expectations passed (published as a comment below).

Narration frame 5 (a genuinely blocked import explains itself) is covered by the inline error surface + a unit test asserting runCloudProviderSync resolves { outcome: "failed", message }; deterministically faulting Den mid-session for an e2e frame isn't in the tape.

Tests run

  • bun test --isolate tests/cloud-provider-sync-{gateway,triggers}.test.ts tests/cloud-provider-{reimport,credentials}.test.ts (apps/app) — 16 pass, 0 fail (includes new synced/failed outcome coverage; gateway handled_server_side shape unchanged)
  • pnpm typecheck (apps/app) — pass
  • OPENWORK_EVAL_APP_SPECS=1 vitest --project stack specs/cloud-provider-auto-import.slow.test.ts1 passed (76.7s, cold local server() + Docker MySQL)
  • pnpm run spec (evals PR lane) — 3 passed, 1 skipped (skill-grant-access env skip)

Notes for review

  • connectCloudProvider (store) is untouched and still powers the provider-auth modal's cloud method.
  • Now-unused i18n keys (e.g. den.import_provider for providers) are left in place per existing precedent (den.import_all); den.import_provider is still used by plugin import.
  • New shared behavior openCloudProvidersSurface mirrors openConnectionsSurface (settings route-rewrite race).

Org-managed providers already sync silently on sign-in/app-resume; the
settings surface now drives that same sync on mount and Refresh instead of
stranding rows behind manual Import/Sync buttons. runCloudProviderSync
resolves a typed outcome so the view surfaces failures inline.
Adds the app-driving spec for the auto-import journey, a shared
openCloudProvidersSurface behavior (settings route-rewrite race, same
pattern as openConnectionsSurface), and updates the section hint copy to
describe automatic import.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview Aug 4, 2026 6:18pm
openwork-den Ready Ready Preview Aug 4, 2026 6:18pm
openwork-den-worker-proxy Ready Ready Preview Aug 4, 2026 6:18pm
openwork-diagnostics Ready Ready Preview Aug 4, 2026 6:18pm
openwork-landing Ready Ready Preview, v0 Aug 4, 2026 6:18pm

@benjaminshafii

Copy link
Copy Markdown
Member Author

Photo roll — org-providers-import-themselves-settings-never-shows-an-import-button — 3/3 frames passed · 4 facts

3/3 frames passed · 4 facts · 11 expectations passed · 0 failed

ℹ️ FACT — 1. The admin published an organization provider

Auto Import Proof grants gpt-5.4 to member om_01kz6zxjxpf21rd7d44cv91hrx.

  • PASS The admin published an organization provider — Auto Import Proof grants gpt-5.4 to member om_01kz6zxjxpf21rd7d44cv91hrx.

ℹ️ FACT — 2. No Import button exists on the Cloud providers surface

Exact button labels: ["Back to app","openwork-admin-1785867478002","Settings","Preferences","Permissions","Library","Advanced","AI Providers","Appearance","Environment","Updates","Recovery","Account","","Toggle Sidebar","1","","Refresh","Imported1"]

  • PASS No Import button exists on the Cloud providers surface — Exact button labels: ["Back to app","openwork-admin-1785867478002","Settings","Preferences","Permissions","Library","Advanced","AI Providers","Appearance","Environment","Updates","Recovery","Account","","Toggle Sidebar","1","","Refresh","Imported1"]

✅ PASS — 3. The organization provider is visibly Imported in Cloud providers settings

  • PASS The organization provider is visibly Imported in Cloud providers settings — The Cloud providers list shows “Auto Import Proof” with a green “Imported” badge.
  • PASS No Import or Sync button is visible in the providers list — The expanded providers list contains provider details and an Imported badge, with no Import or Sync button visible.
  • PASS No 'Something went wrong' crash message is visible — The settings page renders normally, and no “Something went wrong” message is visible.

The organization provider is visibly Imported in Cloud providers settings

✅ PASS — 4. The organization's model is selected and selectable in the composer

  • PASS The organization's model is selected and selectable in the composer — The composer shows “GPT-5.4” selected with a dropdown chevron.
  • PASS No 'Something went wrong' crash message is visible — The normal “New session” interface is visible, with no “Something went wrong” message.

The organization's model is selected and selectable in the composer

ℹ️ FACT — 5. The model list change reconciled without any manual Sync

The row remained Imported; exact button labels: ["Back to app","openwork-admin-1785867478002","Settings","Preferences","Permissions","Library","Advanced","AI Providers","Appearance","Environment","Updates","Recovery","Account","","Toggle Sidebar","1","","Refresh","Imported1"].

  • PASS The model list change reconciled without any manual Sync — The row remained Imported; exact button labels: ["Back to app","openwork-admin-1785867478002","Settings","Preferences","Permissions","Library","Advanced","AI Providers","Appearance","Environment","Updates","Recovery","Account","","Toggle Sidebar","1","","Refresh","Imported1"].

ℹ️ FACT — 6. The newly added organization model became selectable without any manual action

Available after refresh: ["gpt-5.5","gpt-5.5-fast","gpt-5.5-pro","chatgpt-image-latest","gpt-4.1","gpt-4.1-mini","gpt-4o","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-fast","gpt-5.4-mini","gpt-5.4-mini-fast","gpt-5.4-nano","gpt-5.4-pro","gpt-5.6","gpt-5.6-fast","gpt-5.6-luna","gpt-5.6-luna-fast","gpt-5.6-luna-pro","gpt-5.6-pro","gpt-5.6-sol","gpt-5.6-sol-fast","gpt-5.6-sol-pro","gpt-5.6-terra","gpt-5.6-terra-fast","gpt-5.6-terra-pro","gpt-image-1-mini","gpt-image-1.5","gpt-image-2","gpt-realtime-2.1","o3","o3-pro","text-embedding-3-large","text-embedding-3-small","text-embedding-ada-002","gpt-5.4","gpt-5.4-mini"]

  • PASS The newly added organization model became selectable without any manual action — Available after refresh: ["gpt-5.5","gpt-5.5-fast","gpt-5.5-pro","chatgpt-image-latest","gpt-4.1","gpt-4.1-mini","gpt-4o","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-fast","gpt-5.4-mini","gpt-5.4-mini-fast","gpt-5.4-nano","gpt-5.4-pro","gpt-5.6","gpt-5.6-fast","gpt-5.6-luna","gpt-5.6-luna-fast","gpt-5.6-luna-pro","gpt-5.6-pro","gpt-5.6-sol","gpt-5.6-sol-fast","gpt-5.6-sol-pro","gpt-5.6-terra","gpt-5.6-terra-fast","gpt-5.6-terra-pro","gpt-image-1-mini","gpt-image-1.5","gpt-image-2","gpt-realtime-2.1","o3","o3-pro","text-embedding-3-large","text-embedding-3-small","text-embedding-ada-002","gpt-5.4","gpt-5.4-mini"]

✅ PASS — 7. The composer is visibly ready with a model selected

  • PASS The composer is visibly ready with a model selected — The composer is visible with the selected model “GPT-5.4 mini” and a “Run task” button.
  • PASS No manual Sync prompt or 'Something went wrong' crash message is visible — No Sync prompt or “Something went wrong” message is visible; only a success notification says “Loaded 1 cloud provider for OpenWork Eval msezd2qn85m.”

The composer is visibly ready with a model selected


Roll created 2026-08-04T18:17:18.605Z · Source: evals/results/rolls/2026-08-04T18-17-18-605Z-org-providers-import-themselves-settings-never-shows-an-import-button/roll.json · Repro: pnpm fraimz:publish -- --pr 3519 --roll 2026-08-04T18-17-18-605Z-org-providers-import-themselves-settings-never-shows-an-import-button

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No new security issues found in this diff (dae94bc15f8c241941dece4d50106d86e1ed2ebb). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@benjaminshafii

Copy link
Copy Markdown
Member Author

Superseded by #3525, which shipped a more complete version of this feature (per-provider status states, terminal conflicts, model-picker modal cleanup, full locale coverage, den-api access parity). The server-side follow-up lives in #3526, now rebased onto dev.

@benjaminshafii
benjaminshafii deleted the feat/cloud-provider-auto-import branch August 5, 2026 11:30
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