refactor(instagram): align publishing with codebase patterns - #6270
refactor(instagram): align publishing with codebase patterns#6270BillLeoutsakosvl346 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryCursor Bugbot is generating a summary for commit b706259. Configure here. |
Greptile SummaryThis PR standardizes Instagram publishing operations on canonical Sim file inputs and consolidates server-only media resolution and Graph publishing helpers into a provider-local module.
Confidence Score: 5/5The PR appears safe to merge, with no changed-code-triggered correctness or security failures identified. The canonical file shapes remain consistent across block normalization, tool request construction, API contract validation, route handling, file resolution, and Graph publishing, while relocated publishing helpers preserve base-branch behavior.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/tools/instagram/server-utils.ts | Consolidates server-only file resolution and Graph publishing helpers while preserving the existing publishing lifecycle. |
| apps/sim/lib/api/contracts/tools/instagram.ts | Replaces publishing URL/string input schemas with shared canonical RawFileInput schemas and bounded file arrays. |
| apps/sim/blocks/blocks/instagram.ts | Aligns publishing block parameters with canonical file inputs and keeps all Instagram operations registered. |
| apps/sim/tools/instagram/publish_carousel.ts | Passes canonical file arrays directly through the carousel publishing request. |
| apps/sim/tools/instagram/types.ts | Updates publishing parameter types to use canonical single-file and file-array representations. |
Sequence Diagram
sequenceDiagram
participant Workflow as Workflow executor
participant Tool as Instagram publish tool
participant Route as Publishing API route
participant Files as Sim file storage
participant Meta as Instagram Graph API
Workflow->>Tool: Canonical Sim file input
Tool->>Route: Authenticated publish request
Route->>Files: Resolve file to signed HTTPS URL
Files-->>Route: Signed media URL
Route->>Meta: Create media container
loop Until ready
Route->>Meta: Read container status
Meta-->>Route: IN_PROGRESS or FINISHED
end
Route->>Meta: Publish container
Meta-->>Route: Published media ID
Route-->>Tool: Container ID, media ID, status
Reviews (1): Last reviewed commit: "fix(instagram): remove stale cover strin..." | Re-trigger Greptile
Summary
Why
Instagram had accumulated provider-specific input formats and duplicated server plumbing that differed from established Sim integration patterns. Because the integration is unreleased, the cleanup can remove those compatibility formats without migrations or aliases.
Validation
No Instagram triggers or shared platform changes are included.