fix(instagram): integration helpers reorg - #6143
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@greptile review |
|
bugbot run verbose=true |
|
Bugbot request id: serverGenReqId_eff52693-868e-4f0a-a303-2952e4cb48a4 |
PR SummaryLow Risk Overview Publish routes and the OAuth callback only change import paths; OAuth, tool IDs, routes, and media limits are unchanged. New The Instagram block gains four workflow templates (Story queue, carousel campaigns, media archive) plus a test that Reviewed by Cursor Bugbot for commit a371386. Bugbot is set up for automated code reviews on this repo. Configure here. |
Bugbot rules debugNo rules were used for this review. https://cursor.com/docs/bugbot#team-rules Bugbot request id: serverGenReqId_eff52693-868e-4f0a-a303-2952e4cb48a4 |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a371386. Configure here.
Greptile SummaryRefactors Instagram integration ownership without changing its public contracts.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/tools/instagram/resolve-media.ts | Relocates the unchanged media-resolution implementation beside its publishing routes, with all known callers updated. |
| apps/sim/app/api/tools/instagram/resolve-media.test.ts | Adds coverage for URL validation, uploaded files, media limits, carousel parsing, and sequential resolution. |
| apps/sim/blocks/blocks/instagram.ts | Adds valid Story publishing, carousel publishing, and media archive templates backed by registered Instagram tools. |
| apps/sim/tools/instagram/constants.ts | Moves unchanged Instagram Graph constants into the Instagram tool domain. |
| apps/sim/app/api/auth/oauth2/callback/instagram/route.ts | Updates the OAuth callback to import the unchanged Graph base constant from its new location. |
| apps/sim/tools/instagram/utils.ts | Updates Graph utility imports to the relocated constants module. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Workflow[Instagram workflow tool] --> PublishRoute[Instagram publishing API route]
PublishRoute --> Resolver[Co-located media resolver]
Resolver --> Storage[Uploaded-file storage]
Resolver --> Meta[Meta-accessible HTTPS media URL]
PublishRoute --> GraphUtils[Instagram Graph utilities]
GraphConstants[Tool-domain Graph constants] --> GraphUtils
GraphUtils --> Instagram[Instagram Graph API]
Reviews (2): Last reviewed commit: "refactor Instagram integration architect..." | Re-trigger Greptile
Summary
lib/integrationsinto the provider tool domainlib/integrationsWhy
Instagram was the only provider with runtime code under
lib/integrations/<provider>. Mature integrations such as TikTok, Shopify, and Buffer organize the same responsibilities under tools, OAuth, and provider API routes. This keeps Instagram aligned with those existing ownership boundaries without introducing a new abstraction or changing runtime behavior.Compatibility
Tool IDs, API routes, request/response shapes, OAuth scopes, Graph API version, media limits, legacy file inputs, polling, and generated integration metadata are unchanged. Instagram remains hidden from the toolbar.
Validation
git diff --checkpassedintegrations.jsonunchangedFull TypeScript validation currently stops on the unrelated existing
trigger.config.ts:51mismatch wherenode-24is not included in the installed Trigger.dev runtime type union; no Instagram errors were reported.