-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Airtop component fixes #18652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airtop component fixes #18652
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughUpdates two Airtop actions and the package version. The create-window action now uses response.windowId instead of response.id and bumps its version. The query-page action flattens certain configuration fields into the top-level payload and bumps its version. Package.json version is incremented. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CreateWindow as Create-Window Action
participant AirtopAPI as Airtop API
User->>CreateWindow: run()
CreateWindow->>AirtopAPI: POST /windows
AirtopAPI-->>CreateWindow: { windowId, ... }
CreateWindow-->>User: summary uses windowId (not id)
sequenceDiagram
autonumber
actor User
participant QueryPage as Query-Page Action
participant AirtopAPI as Airtop API
Note over QueryPage: Payload flattened
User->>QueryPage: run({ followPaginationLinks, costThresholdCredits, timeThresholdSeconds, ... })
QueryPage->>AirtopAPI: POST /query with top-level fields
AirtopAPI-->>QueryPage: { results, ... }
QueryPage-->>User: results
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
components/airtop/actions/create-window/create-window.mjs
(2 hunks)components/airtop/actions/query-page/query-page.mjs
(2 hunks)components/airtop/package.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
🔇 Additional comments (4)
components/airtop/package.json (1)
3-3
: LGTM!The patch version bump is appropriate for the bug fixes applied to the action modules in this PR.
components/airtop/actions/query-page/query-page.mjs (1)
7-7
: LGTM!Version bump is appropriate for the payload structure correction.
components/airtop/actions/create-window/create-window.mjs (2)
7-7
: LGTM!Version bump is appropriate for the response property correction.
64-64
: Approve change: useresponse.windowId
The Airtop create-window API returnswindowId
, notid
, so this update is correct.
data: { | ||
prompt, | ||
configuration: { | ||
followPaginationLinks, | ||
costThresholdCredits, | ||
timeThresholdSeconds, | ||
}, | ||
followPaginationLinks, | ||
costThresholdCredits, | ||
timeThresholdSeconds, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the flattened payload structure matches the Airtop API specification.
The fields are now passed at the top level of the data
object instead of nested under a configuration object. This appears to be a correction to align with the API spec.
🌐 Web query:
What is the correct request payload structure for the Airtop page query API endpoint? Specifically, should followPaginationLinks, costThresholdCredits, and timeThresholdSeconds be at the top level or nested under a configuration object?
💡 Result:
They belong inside the request's configuration object (i.e., nested under "configuration"), not at the top level. See the page-query and related endpoint docs showing costThresholdCredits, timeThresholdSeconds and followPaginationLinks documented as properties of the configuration object. [1][2]
Sources:
[1] Airtop "Query a page" API docs.
[2] Airtop "Query a page with pagination" / "type" docs.
Nest pagination and threshold fields under configuration
Move followPaginationLinks
, costThresholdCredits
, and timeThresholdSeconds
into data.configuration
in components/airtop/actions/query-page/query-page.mjs (lines 64–69) to match the Airtop API spec.
🤖 Prompt for AI Agents
In components/airtop/actions/query-page/query-page.mjs around lines 64 to 69,
the pagination and threshold fields are currently top-level in the request data;
move followPaginationLinks, costThresholdCredits, and timeThresholdSeconds under
a nested data.configuration object to match the Airtop API spec. Update the data
payload so it includes configuration: { followPaginationLinks,
costThresholdCredits, timeThresholdSeconds } while leaving prompt at the
top-level of data; ensure any callers or serialization use the new shape and run
tests or linting to confirm no other references expect the old flat fields.
@luancazarine this was already QA'd, so please merge after approving if it's good to go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @GTFalcao, LGTM! Ready for QA!
Closes #18630
Summary by CodeRabbit
Refactor
Chores