feat(app): cloud providers import automatically — no Import button - #3519
feat(app): cloud providers import automatically — no Import button#3519benjaminshafii wants to merge 2 commits into
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 providerAuto Import Proof grants gpt-5.4 to member om_01kz6zxjxpf21rd7d44cv91hrx.
ℹ️ FACT — 2. No Import button exists on the Cloud providers surfaceExact 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 — 4. The organization's model is selected and selectable in the composer
ℹ️ FACT — 5. The model list change reconciled without any manual SyncThe 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 actionAvailable 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
Roll created 2026-08-04T18:17:18.605Z · Source: |
There was a problem hiding this comment.
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



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:runCloudProviderSyncnow resolves a typed outcome (synced | failed | handled_server_side); the view surfacesfailedinline in the section error notice, and Refresh retries.user.id::orgIdkey so snapshot-driven re-renders can't re-trigger it; the sync callback is passed as a stable store method.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" exists →gpt-5.4selectable in the composer → admin PATCHes the model list → after Refresh the row is still Imported, "Out of sync" never demands action, andgpt-5.4-minibecomes 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
runCloudProviderSyncresolves{ 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; gatewayhandled_server_sideshape unchanged)pnpm typecheck(apps/app) — passOPENWORK_EVAL_APP_SPECS=1 vitest --project stack specs/cloud-provider-auto-import.slow.test.ts— 1 passed (76.7s, cold localserver()+ Docker MySQL)pnpm run spec(evals PR lane) — 3 passed, 1 skipped (skill-grant-accessenv skip)Notes for review
connectCloudProvider(store) is untouched and still powers the provider-auth modal's cloud method.den.import_providerfor providers) are left in place per existing precedent (den.import_all);den.import_provideris still used by plugin import.openCloudProvidersSurfacemirrorsopenConnectionsSurface(settings route-rewrite race).