fix(integrations): keep a simulated connection's accounts on reconnect
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- next.js, playwright, react, typescript
Direzione di ricerca
Start with src/lib/adapters/simulated/index.ts and trace how exchangeCode gets its seed during reconnect, then read the reconnect flow in src/app/api/dev/fake-provider/authorize/route.ts. Update the simulated webhook setup in src/lib/adapters/simulated/webhooks.ts and Polar twin in src/lib/adapters/simulated/polar.ts; run npx vitest run src/lib/adapters/simulated. Finish by covering the refusal path in e2e/webhook-setup-polar.spec.ts with the keyboard and verifying reconnect preserves the included accounts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
Found while fixing the Fable review of #525 (Polar webhooks, #429).
A simulated provider's exchangeCode (src/lib/adapters/simulated/index.ts) mints a fresh seed for every grant ("A fresh seed per grant, so two simulated connections never share accounts or events"), and the twin's accounts are named after that seed (Polar's sim-org-<seed>). A reconnect, such as the write access consent of automatic webhook setup, is a new grant. So connect.ts upserts a second account with a new seed and leaves the first one included. Observed in an e2e run on #525: after the consent, the simulated Polar connection held sim-org-402df0db and sim-org-0f23f197, both included. The stale account no longer belongs to the grant, so the twin's sync refuses it ("Simulated has no such account").
The cost is concrete for #525. Polar's automatic setup needs a connection that includes exactly one organization (AutomaticWebhookSetup.accounts: "one"). Polar's twin therefore does not forward that limit (src/lib/adapters/simulated/polar.ts), or every simulated automatic setup would be refused after its own consent. The one-organization refusal is unit tested but cannot run end to end against the twin.
Plan
- Keep the seed on a reconnect of a simulated connection, for example by carrying the stored credential's seed through the reconnect state to the simulated consent screen and into the code
exchangeCodereads. - With the seed kept, forward
accountsinsimulatedConnectionSetup(src/lib/adapters/simulated/webhooks.ts), and drop the note insimulated/polar.ts. - Add the one-organization refusal to
e2e/webhook-setup-polar.spec.ts: seed a second included organization, choose automatic setup, and assert no consent screen and the refusal banner.
Acceptance criteria
- Reconnecting a simulated connection leaves its accounts unchanged.
- Polar's twin carries
accounts: "one", and its automatic setup still succeeds after the consent. - Unit test for the reconnect seed; Playwright: the refusal path in
e2e/webhook-setup-polar.spec.ts, with the keyboard.
Files and areas
src/lib/adapters/simulated/index.ts,src/lib/adapters/simulated/webhooks.ts,src/lib/adapters/simulated/polar.ts,src/app/api/dev/fake-provider/authorize/route.ts,e2e/webhook-setup-polar.spec.ts.- Non-goals: what a real provider's reconnect does with accounts it no longer lists.
Verification
npx vitest run src/lib/adapters/simulated- the Polar webhook setup spec through the guarded runner
Branch: <issue-number>-simulated-reconnect-seed
Closes with a Closes #<issue-number> footer on the commit or pull request.
Model: anthropic/claude-opus-5-5 | Reasoning effort: not reported by the harness
- Lingua principale
- TypeScript
- Stelle
- 13
- Fork
- 2
- Merge medio
- 5h 20m
- PR unite (30g)
- 287
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eddiejaoude/StackDash#798 ·
I maintainer di solito rispondono entro 1 giorno
-
area: ops documentation priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
eddiejaoude/StackDash#796 ·
I maintainer di solito rispondono entro 1 giorno
-
area: docs documentation impact: low priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
eddiejaoude/StackDash#790 ·
I maintainer di solito rispondono entro 1 giorno
-
area: ops bug impact: low priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
eddiejaoude/StackDash#785 ·
I maintainer di solito rispondono entro 1 giorno
-
area: connections enhancement impact: low priority: P3 size: XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
eddiejaoude/StackDash#768 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eddiejaoude/StackDash
Issue simili
-
bot:ai-assisted component:midnight-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
midnightntwrk/midnight-js#1790 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDApertacheck:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
effort/l priority/p1 risk/high triage/core
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
iflytek/skillhub#1188 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno