Skip to content

Nodebase corsair - #80

Open
Mayank-saraswal wants to merge 20 commits into
mainfrom
nodebase-corsair
Open

Nodebase corsair#80
Mayank-saraswal wants to merge 20 commits into
mainfrom
nodebase-corsair

Conversation

@Mayank-saraswal

Copy link
Copy Markdown
Owner

No description provided.

Add self-hosted Corsair foundation (KEK, multi-tenant client, Prisma
tables, connect APIs) and migrate Gmail node ops behind a feature-flagged
adapter with full unit coverage and legacy fallback.
Register @corsair-dev/googlesheets, map every Nodebase GoogleSheetsOp
through a feature-flagged adapter with edge-case validation and unit
tests; dual-path executor keeps the legacy REST path as fallback.
Add tenant_id on workflow/execution/node runs with backfill, stamp
tenant and operation strings during Inngest execution, and introduce a
code registry for Gmail/Sheets ops (aliases, no new Prisma op enums).
…, Google Drive

- Add registry-driven runIntegration runner with tenant isolation, op validation,
  and dual-path safe tryRunIntegration for Gmail / Sheets / Drive executors
- Expand Gmail adapter to full @corsair-dev/gmail endpoints (delete, batchModify,
  untrash, drafts CRUD, threads, labels CRUD) with alias-preserving dispatch
- Complete Sheets Corsair ops (appendOrUpdate, delete sheet, spreadsheet CRUD)
- Ship Google Drive vertical: package, client plugin, registry, adapter, matrix,
  dual-path executor, completeness + unit tests
- Product TS enums for Drive/Gmail extras; do NOT grow Prisma op enums (Option C)
- Completeness tests enforce registry ops cover Corsair public endpoints
- Comment unknown JSON boundaries; no implicit any in new code
Type safety:
- Unify NodeExecutor + node data types under executions/types/ (fix shadowing)
- Add asString/asBoolean/asNumber helpers; no implicit any in migration paths
- Fix Gmail/Sheets/Drive/Slack executors for Record JSON config narrowing
- Executor registry variance cast; Prisma InputJsonValue for node data writes
- Full project tsc --noEmit is clean (0 errors)

Gmail + Sheets verification:
- Gmail attachment MIME walk typed; upload opts require string path segments
- Sheets tests for CREATE_SPREADSHEET, LIST_SPREADSHEETS, APPEND_OR_UPDATE, DELETE_SHEET

Slack (next plugin after Drive):
- @corsair-dev/slack package, client registration, registry + completeness
- Full adapter for messages/channels/users/reactions/files/stars
- Dual-path executor; webhook/schedule/lookupByEmail stay legacy-only
- Unit tests for ops + legacy-only detection

93 integration/corsair unit tests passing.
Dialogs:
- Gmail: full Corsair op selector (drafts/threads/labels/batch/delete),
  type-safe credential list, new fields (messageIds, labelId), output hints
- Sheets: APPEND_OR_UPDATE, DELETE_SHEET, spreadsheet CRUD, list spreadsheets,
  conditional spreadsheetId, no implicit any
- Slack: MESSAGE_SEARCH, history/rename/open, FILE_LIST, presence; default MESSAGE_SEND;
  type-safe prefill/save

GitHub Corsair:
- Install @corsair-dev/github; register plugin
- Registry + adapter covering full package surface (issues, PRs, repos, releases,
  workflows, discussions, forks, comments, events, users)
- Dual-path executor: Corsair when op mapped, else legacy REST modules
- Completeness + unit tests (97 integration tests green)

tsc --noEmit clean.
GitHub dialog:
- Wire onSubmit/defaultValues from canvas node (was a no-op save)
- Type-safe credential select; Corsair badges on mapped ops
- Extra fields for username/commentId/releaseId; clearer output help

Notion Corsair:
- @corsair-dev/notion package + client registration
- Full registry/adapter surface (databases, databasePages, pages, blocks, users)
- Dual-path executor; unit + completeness tests

Notion dialog:
- Full op selector for Corsair surface (list/search databases, create page, …)
- Type-safe prefill/save; variable name + output hints

Rule: polish dialog with each plugin before moving on.

105 integration tests green; tsc clean.
… dialog

Edge cases (tests):
- GitHub: owner/repo required, issue/PR numbers, CLOSE/REOPEN state, CSV labels,
  comment/workflow/path/tag/username validation
- Notion: invalid JSON filter/properties, empty parents/ids, JSON vs plain blocks,
  filter+sorts passthrough, blockId fallback to pageId

HubSpot (@corsair-dev/hubspot):
- Registry + adapter for ALL nested endpoints (contacts, companies, deals, tickets,
  engagements, contactLists)
- Unit tests covering create/search/delete/lists/engagements + edge JSON
- Dual-path executor (Corsair when mapped; legacy OAuth otherwise)
- Dialog polish: Corsair badges, type-safe defaults, working save

147 integration tests green; tsc clean.
Registry, adapter, and completeness tests cover all @corsair-dev/telegram
endpoints (messages, media, chat, callback, file, me, updates, webhook).
Dual-path executor tries Corsair first and falls back to legacy sendMessage.
Dialog polished with operation groups and conditional fields. Plugin registers
with bot_token auth (no permissions mode on TelegramPluginOptions).
Registry, adapter, and tests cover all @corsair-dev/discord endpoints
(messages, threads, reactions, guilds, channels, members). Dual-path
executor uses Corsair bot API when channel ops are configured; legacy
inbound webhook URL path remains. Dialog groups ops with conditional fields.
Covers all @corsair-dev/twitter endpoints (tweets.create, createReply).
Dual-path prefers Corsair OAuth unless legacy OAuth1 keys are on the node.
Dialog supports post/reply fields and optional legacy keys.
Registry and adapter cover all @corsair-dev/razorpay endpoints (orders,
payments, refunds, customers, payouts, settlements, subscriptions). Dual-path
executor prefers Corsair for package ops; invoices/payment links/signature
verify stay on legacy credential REST. Dialog lists new Corsair ops.
Amounts remain in paise. Completeness + unit tests included.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 287 files, which is 187 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e5a471a3-d6f2-43a1-862d-a3966d7afc81

📥 Commits

Reviewing files that changed from the base of the PR and between 4bfbab4 and ad5e77e.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • public/logos/github.svg is excluded by !**/*.svg
📒 Files selected for processing (314)
  • .env.example
  • AGENTS.md
  • NODEBASE_AI_AGENT.md
  • docs/architecture/OPTION_C_SCALABLE_MULTI_TENANT.md
  • package.json
  • prisma/schema/ai-agent.prisma
  • prisma/schema/auth.prisma
  • prisma/schema/core.prisma
  • prisma/schema/corsair.prisma
  • prisma/schema/enums.prisma
  • prisma/schema/migrations/20260605191517_add_ai_agent_schema/migration.sql
  • prisma/schema/migrations/20260605212826_ai/migration.sql
  • prisma/schema/migrations/20260716180000_add_corsair_core/migration.sql
  • prisma/schema/migrations/20260716190000_option_c_tenant_id/migration.sql
  • prisma/schema/nodes_commerce.prisma
  • prisma/schema/nodes_crm.prisma
  • prisma/schema/nodes_flow_control.prisma
  • prisma/schema/nodes_github.prisma
  • prisma/schema/nodes_google.prisma
  • prisma/schema/nodes_messaging.prisma
  • prisma/schema/nodes_utility.prisma
  • query.ts
  • scripts/gen-stripe-openai-registry.mjs
  • src/app/(dashboard)/(rest)/ai-agent/page.tsx
  • src/app/(dashboard)/(rest)/integrations/connect/page.tsx
  • src/app/api/auth/github/callback/route.ts
  • src/app/api/auth/github/start/route.ts
  • src/app/api/corsair/[[...path]]/route.ts
  • src/app/api/inngest/route.ts
  • src/app/api/integrations/connect/resolve/route.ts
  • src/app/api/integrations/oauth/callback/route.ts
  • src/components/app-sidebar.tsx
  • src/components/github-connect-button.tsx
  • src/config/node-components.ts
  • src/features/ai-agent/components/chat-panel.tsx
  • src/features/ai-agent/components/conversation-list.tsx
  • src/features/ai-agent/components/credential-wizard.tsx
  • src/features/ai-agent/components/floating-chat-panel.tsx
  • src/features/ai-agent/components/message-bubble.tsx
  • src/features/ai-agent/components/provider-selector.tsx
  • src/features/ai-agent/components/workflow-preview.tsx
  • src/features/ai-agent/config/constants.ts
  • src/features/ai-agent/config/providers.ts
  • src/features/ai-agent/inngest/channels.ts
  • src/features/ai-agent/inngest/generate-workflow.ts
  • src/features/ai-agent/lib/conversation.ts
  • src/features/ai-agent/lib/generator.ts
  • src/features/ai-agent/lib/guardrail-responses.ts
  • src/features/ai-agent/lib/guardrails.ts
  • src/features/ai-agent/lib/provider-gateway.ts
  • src/features/ai-agent/lib/rate-limiter.ts
  • src/features/ai-agent/lib/refinement.ts
  • src/features/ai-agent/lib/workflow-validator.ts
  • src/features/ai-agent/registry/node-capabilities.ts
  • src/features/ai-agent/registry/templates.ts
  • src/features/ai-agent/schemas/workflow-generation.ts
  • src/features/credentials/components/credential.tsx
  • src/features/credentials/hooks/use-credentials.ts
  • src/features/credentials/server/routers.ts
  • src/features/editer/components/editor.tsx
  • src/features/executions/components/aggregate/actions.ts
  • src/features/executions/components/aggregate/dialog.tsx
  • src/features/executions/components/aggregate/executor.ts
  • src/features/executions/components/aggregate/node.tsx
  • src/features/executions/components/ai/dialog.tsx
  • src/features/executions/components/ai/executor.ts
  • src/features/executions/components/anthropic/executor.ts
  • src/features/executions/components/base-execution-node.tsx
  • src/features/executions/components/cashfree/dialog.tsx
  • src/features/executions/components/cashfree/executor.ts
  • src/features/executions/components/code/dialog.tsx
  • src/features/executions/components/code/executor.ts
  • src/features/executions/components/deepseek/dialog.tsx
  • src/features/executions/components/deepseek/executor.ts
  • src/features/executions/components/discord/dialog.tsx
  • src/features/executions/components/discord/executor.ts
  • src/features/executions/components/discord/node.tsx
  • src/features/executions/components/error-trigger/executor.ts
  • src/features/executions/components/filter/dialog.tsx
  • src/features/executions/components/filter/executor.ts
  • src/features/executions/components/filter/node.tsx
  • src/features/executions/components/freshdesk/dialog.tsx
  • src/features/executions/components/freshdesk/executor.ts
  • src/features/executions/components/freshdesk/node.tsx
  • src/features/executions/components/gemini/dialog.tsx
  • src/features/executions/components/gemini/executor.ts
  • src/features/executions/components/github/components/operation-groups.ts
  • src/features/executions/components/github/components/repo-fields.tsx
  • src/features/executions/components/github/dialog.tsx
  • src/features/executions/components/github/executor.ts
  • src/features/executions/components/github/executors/issues-prs.ts
  • src/features/executions/components/github/executors/repository.ts
  • src/features/executions/components/github/executors/search-misc.ts
  • src/features/executions/components/github/executors/users-orgs.ts
  • src/features/executions/components/github/executors/workflows.ts
  • src/features/executions/components/github/node.tsx
  • src/features/executions/components/github/types.ts
  • src/features/executions/components/gmail/dialog.tsx
  • src/features/executions/components/gmail/executor.ts
  • src/features/executions/components/gmail/node.tsx
  • src/features/executions/components/google-drive/dialog.tsx
  • src/features/executions/components/google-drive/executor.ts
  • src/features/executions/components/google-sheets/dialog.tsx
  • src/features/executions/components/google-sheets/executor.ts
  • src/features/executions/components/google-sheets/node.tsx
  • src/features/executions/components/groq/executor.ts
  • src/features/executions/components/http-request/dialog.tsx
  • src/features/executions/components/http-request/executor.ts
  • src/features/executions/components/http-request/node.tsx
  • src/features/executions/components/hubspot/dialog.tsx
  • src/features/executions/components/hubspot/executor.ts
  • src/features/executions/components/hubspot/node.tsx
  • src/features/executions/components/loop/dialog.tsx
  • src/features/executions/components/loop/executor.ts
  • src/features/executions/components/media-upload/dialog.tsx
  • src/features/executions/components/media-upload/executor.ts
  • src/features/executions/components/media-upload/node.tsx
  • src/features/executions/components/merge/dialog.tsx
  • src/features/executions/components/merge/executor.ts
  • src/features/executions/components/merge/node.tsx
  • src/features/executions/components/msg91/dialog.tsx
  • src/features/executions/components/msg91/executor.ts
  • src/features/executions/components/notion/dialog.tsx
  • src/features/executions/components/notion/executor.ts
  • src/features/executions/components/notion/node.tsx
  • src/features/executions/components/openai/dialog.tsx
  • src/features/executions/components/openai/executor.ts
  • src/features/executions/components/perplexity/dialog.tsx
  • src/features/executions/components/perplexity/executor.ts
  • src/features/executions/components/postgres/actions.ts
  • src/features/executions/components/postgres/dialog.tsx
  • src/features/executions/components/postgres/executor.ts
  • src/features/executions/components/postgres/node.tsx
  • src/features/executions/components/razorpay/dialog.tsx
  • src/features/executions/components/razorpay/executor.ts
  • src/features/executions/components/set-variable/dialog.tsx
  • src/features/executions/components/set-variable/executor.ts
  • src/features/executions/components/shiprocket/dialog.tsx
  • src/features/executions/components/shiprocket/executor.ts
  • src/features/executions/components/slack/dialog.tsx
  • src/features/executions/components/slack/executor.ts
  • src/features/executions/components/sort/dialog.tsx
  • src/features/executions/components/sort/executor.ts
  • src/features/executions/components/sort/node.tsx
  • src/features/executions/components/stripe/dialog.tsx
  • src/features/executions/components/stripe/executor.ts
  • src/features/executions/components/switch/dialog.tsx
  • src/features/executions/components/switch/executor.ts
  • src/features/executions/components/switch/node.tsx
  • src/features/executions/components/telegram/dialog.tsx
  • src/features/executions/components/telegram/executor.ts
  • src/features/executions/components/wait/dialog.tsx
  • src/features/executions/components/wait/executor.ts
  • src/features/executions/components/whatsapp/dialog.tsx
  • src/features/executions/components/whatsapp/executor.ts
  • src/features/executions/components/workday/executor.ts
  • src/features/executions/components/x/dialog.tsx
  • src/features/executions/components/x/executor.ts
  • src/features/executions/components/x/node.tsx
  • src/features/executions/components/xai/executor.ts
  • src/features/executions/components/zoho-crm/dialog.tsx
  • src/features/executions/components/zoho-crm/executor.ts
  • src/features/executions/enums.ts
  • src/features/executions/lib/executor-registry.ts
  • src/features/executions/types.ts
  • src/features/executions/types/index.ts
  • src/features/executions/types/node-data.ts
  • src/features/integrations/README.md
  • src/features/integrations/adapters/_shared/__tests__/llm-edges.test.ts
  • src/features/integrations/adapters/_shared/llm-edges.ts
  • src/features/integrations/adapters/_shared/resolve-fields.ts
  • src/features/integrations/adapters/deepseek/OP_MATRIX.md
  • src/features/integrations/adapters/deepseek/__tests__/operations.test.ts
  • src/features/integrations/adapters/deepseek/adapter.ts
  • src/features/integrations/adapters/deepseek/operations.ts
  • src/features/integrations/adapters/discord/OP_MATRIX.md
  • src/features/integrations/adapters/discord/__tests__/operations.test.ts
  • src/features/integrations/adapters/discord/adapter.ts
  • src/features/integrations/adapters/discord/operations.ts
  • src/features/integrations/adapters/gemini/OP_MATRIX.md
  • src/features/integrations/adapters/gemini/__tests__/operations.test.ts
  • src/features/integrations/adapters/gemini/adapter.ts
  • src/features/integrations/adapters/gemini/operations.ts
  • src/features/integrations/adapters/github/OP_MATRIX.md
  • src/features/integrations/adapters/github/__tests__/operations.test.ts
  • src/features/integrations/adapters/github/adapter.ts
  • src/features/integrations/adapters/github/operations.ts
  • src/features/integrations/adapters/gmail/OP_MATRIX.md
  • src/features/integrations/adapters/gmail/__tests__/adapter.test.ts
  • src/features/integrations/adapters/gmail/__tests__/operations.test.ts
  • src/features/integrations/adapters/gmail/adapter.ts
  • src/features/integrations/adapters/gmail/mime.ts
  • src/features/integrations/adapters/gmail/operations.ts
  • src/features/integrations/adapters/google-drive/OP_MATRIX.md
  • src/features/integrations/adapters/google-drive/__tests__/operations.test.ts
  • src/features/integrations/adapters/google-drive/adapter.ts
  • src/features/integrations/adapters/google-drive/operations.ts
  • src/features/integrations/adapters/google-sheets/OP_MATRIX.md
  • src/features/integrations/adapters/google-sheets/__tests__/operations.test.ts
  • src/features/integrations/adapters/google-sheets/adapter.ts
  • src/features/integrations/adapters/google-sheets/helpers.ts
  • src/features/integrations/adapters/google-sheets/operations.ts
  • src/features/integrations/adapters/hubspot/OP_MATRIX.md
  • src/features/integrations/adapters/hubspot/__tests__/operations.test.ts
  • src/features/integrations/adapters/hubspot/adapter.ts
  • src/features/integrations/adapters/hubspot/operations.ts
  • src/features/integrations/adapters/notion/OP_MATRIX.md
  • src/features/integrations/adapters/notion/__tests__/operations.test.ts
  • src/features/integrations/adapters/notion/adapter.ts
  • src/features/integrations/adapters/notion/operations.ts
  • src/features/integrations/adapters/openai/OP_MATRIX.md
  • src/features/integrations/adapters/openai/__tests__/operations.test.ts
  • src/features/integrations/adapters/openai/adapter.ts
  • src/features/integrations/adapters/openai/operations.ts
  • src/features/integrations/adapters/perplexity/OP_MATRIX.md
  • src/features/integrations/adapters/perplexity/__tests__/operations.test.ts
  • src/features/integrations/adapters/perplexity/adapter.ts
  • src/features/integrations/adapters/perplexity/operations.ts
  • src/features/integrations/adapters/razorpay/OP_MATRIX.md
  • src/features/integrations/adapters/razorpay/__tests__/operations.test.ts
  • src/features/integrations/adapters/razorpay/adapter.ts
  • src/features/integrations/adapters/razorpay/operations.ts
  • src/features/integrations/adapters/slack/OP_MATRIX.md
  • src/features/integrations/adapters/slack/__tests__/operations.test.ts
  • src/features/integrations/adapters/slack/adapter.ts
  • src/features/integrations/adapters/slack/operations.ts
  • src/features/integrations/adapters/stripe/OP_MATRIX.md
  • src/features/integrations/adapters/stripe/__tests__/operations.test.ts
  • src/features/integrations/adapters/stripe/adapter.ts
  • src/features/integrations/adapters/stripe/operations.ts
  • src/features/integrations/adapters/telegram/OP_MATRIX.md
  • src/features/integrations/adapters/telegram/__tests__/operations.test.ts
  • src/features/integrations/adapters/telegram/adapter.ts
  • src/features/integrations/adapters/telegram/operations.ts
  • src/features/integrations/adapters/twitter/OP_MATRIX.md
  • src/features/integrations/adapters/twitter/__tests__/operations.test.ts
  • src/features/integrations/adapters/twitter/adapter.ts
  • src/features/integrations/adapters/twitter/operations.ts
  • src/features/integrations/registry.ts
  • src/features/integrations/registry/__tests__/completeness.test.ts
  • src/features/integrations/registry/__tests__/resolve.test.ts
  • src/features/integrations/registry/index.ts
  • src/features/integrations/registry/integrations/deepseek.ts
  • src/features/integrations/registry/integrations/discord.ts
  • src/features/integrations/registry/integrations/gemini.ts
  • src/features/integrations/registry/integrations/github.ts
  • src/features/integrations/registry/integrations/gmail.ts
  • src/features/integrations/registry/integrations/google-drive.ts
  • src/features/integrations/registry/integrations/google-sheets.ts
  • src/features/integrations/registry/integrations/hubspot.ts
  • src/features/integrations/registry/integrations/notion.ts
  • src/features/integrations/registry/integrations/openai.ts
  • src/features/integrations/registry/integrations/perplexity.ts
  • src/features/integrations/registry/integrations/razorpay.ts
  • src/features/integrations/registry/integrations/slack.ts
  • src/features/integrations/registry/integrations/stripe.ts
  • src/features/integrations/registry/integrations/telegram.ts
  • src/features/integrations/registry/integrations/twitter.ts
  • src/features/integrations/registry/node-data.ts
  • src/features/integrations/registry/resolve.ts
  • src/features/integrations/registry/types.ts
  • src/features/integrations/runner/__tests__/run-integration.test.ts
  • src/features/integrations/runner/index.ts
  • src/features/integrations/runner/run-integration.ts
  • src/features/integrations/server/connect.router.ts
  • src/features/integrations/types.ts
  • src/features/integrations/webhooks/process-route.ts
  • src/features/triggers/components/base-trigger-node.tsx
  • src/features/triggers/components/if-else/dialog.tsx
  • src/features/triggers/components/if-else/executor.ts
  • src/features/triggers/components/if-else/node.tsx
  • src/features/triggers/components/if-else/types.ts
  • src/features/workflows/server/routers.ts
  • src/inngest/channels/stripe.ts
  • src/inngest/functions.ts
  • src/inngest/utils.ts
  • src/lib/corsair/client.ts
  • src/lib/corsair/config.ts
  • src/lib/corsair/errors.ts
  • src/lib/corsair/index.ts
  • src/lib/corsair/pool.ts
  • src/lib/corsair/tenant.test.ts
  • src/lib/corsair/tenant.ts
  • src/lib/github-auth.ts
  • src/lib/tenant.ts
  • src/server/routers/aggregate.router.ts
  • src/server/routers/ai-agent.router.ts
  • src/server/routers/ai.router.ts
  • src/server/routers/cashfree.router.ts
  • src/server/routers/code.router.ts
  • src/server/routers/filter.router.ts
  • src/server/routers/freshdesk.router.ts
  • src/server/routers/github.router.ts
  • src/server/routers/gmail.router.ts
  • src/server/routers/google-drive.router.ts
  • src/server/routers/google-sheets.router.ts
  • src/server/routers/hubspot.router.ts
  • src/server/routers/if-else.router.ts
  • src/server/routers/loop.router.ts
  • src/server/routers/media-upload.router.ts
  • src/server/routers/merge.router.ts
  • src/server/routers/msg91.router.ts
  • src/server/routers/notion.router.ts
  • src/server/routers/postgres.router.ts
  • src/server/routers/razorpay.router.ts
  • src/server/routers/set-variable.router.ts
  • src/server/routers/shiprocket.router.ts
  • src/server/routers/slack.router.ts
  • src/server/routers/sort.router.ts
  • src/server/routers/switch.router.ts
  • src/server/routers/wait.router.ts
  • src/server/routers/whatsapp.router.ts
  • src/server/routers/zoho-crm.router.ts
  • src/trpc/routers/_app.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nodebase-corsair

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Stripe: all 20 @corsair-dev/stripe endpoints (balance, charges, coupons,
customers, paymentIntents, prices, sources, tokens) with validation edges
and dual-path-ready executor/dialog.

OpenAI: all 129 @corsair-dev/openai nested endpoints via registry + generic
path invoker; convenience ops CHAT/EMBED/IMAGE/MODERATE/TTS; dual-path
openAiExecutor (Corsair then legacy aiExecutor); polished dialog.

Completeness tests assert registry ⊇ package trees. 233 integration tests green.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b82bac6e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)

const handleSave = () => {
const upsertMutation = { isPending: false, mutate: (args?: any) => {}, mutateAsync: async (args?: any) => {} } as any;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Persist If/Else settings instead of no-oping saves

When configuring an IF/ELSE node, handleSave now only calls this stubbed mutation and there is no parent onSubmit/setNodes path for the dialog, while the executor was changed to read conditions from node.data. In practice, new or edited IF/ELSE nodes never store field, operator, value, or conditionsJson, so branching remains unconfigured and workflow control flow takes the default/false path.

Useful? React with 👍 / 👎.

}
}
}, [deleteCode, deleteGmail, deleteGoogleDrive, deleteGoogleSheets, deleteIfElse, deleteLoop, deleteNotion, deleteRazorpay, deleteSetVariable, deleteSlack, deleteSwitch, deleteWhatsapp, deleteWait, deleteMerge, deleteErrorTrigger, deleteRazorpayTrigger, deleteWhatsappTrigger, deleteMsg91, deleteShiprocket, deleteZohoCrm, deleteHubspot, deleteFreshdesk, deleteFilter, deleteCashfree])
}, [deleteErrorTrigger]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove webhook trigger records when deleting nodes

After this change, deleting nodes from the canvas only retains the Error Trigger cleanup; the Razorpay/WhatsApp trigger delete mutations and switch cases were removed, but those trigger rows are keyed by nodeId and only cascade when the whole workflow is deleted. Since the public webhook routes look up RazorpayTrigger/WhatsAppTrigger by webhookId and execute when isActive, deleting one of these trigger nodes leaves its old webhook URL active and able to run the workflow.

Useful? React with 👍 / 👎.

{ enabled: open && !!nodeId }
)
)
const config = undefined as any;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hydrate Code node data before resetting the dialog

Because config is hard-coded to undefined, opening an existing Code node always runs the reset-to-starter-template path instead of loading the node's saved data; the save path only sends code through onSubmit(code) and the mutation below is a no-op, while the executor now reads timeout, allowed domains, variable name, and continue-on-fail from data. Reopening and saving a configured Code node can therefore wipe the code/settings back to defaults and make executions use the wrong configuration.

Useful? React with 👍 / 👎.

Comment on lines +59 to +61
const safeReturnUrl = (stateData.returnUrl ?? "/credentials").startsWith("/")
? stateData.returnUrl
: "/credentials"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject protocol-relative GitHub return URLs

For an authenticated user who starts GitHub OAuth with returnUrl=//evil.example, this check accepts the value as “relative”; the callback then builds new URL(safeReturnUrl, baseUrl), which treats //evil.example as an external URL and redirects there with the OAuth success query parameters. Require a single-slash path or enforce same-origin parsing so the OAuth flow cannot be used as an open redirect.

Useful? React with 👍 / 👎.

Gemini (@corsair-dev/gemini): all 8 endpoints — generateContent, countTokens,
embedContent, generateImage, generateVideos, getVideosOperation, waitForVideo,
listModels — with validation edges and dual-path geminiExecutor.

DeepSeek (@corsair-dev/deepseek): all 4 endpoints — chat.createCompletion,
anthropic.createMessage, user.getBalance, models.list — with dual-path
deepseekExecutor and polished dialogs.

Completeness + unit tests cover every package op. 257 integration tests green.
…ypesafety

@corsair-dev/perplexityai exposes chat.completions only — registry, adapter,
and completeness cover that endpoint with product aliases CHAT/SEARCH_CHAT.
Edge validation: messages shape, roles, JSON, temperature/top_p/max_tokens
ranges, stream=true rejected. Dual-path executor (Corsair then legacy AI),
polished dialog, tenant-scoped runner path, no implicit any.
…/DeepSeek

Extract shared llm-edges helpers (messages roles/content, empty arrays,
params JSON, temperature/top_p/max_tokens ranges, stream=true reject,
missing client surface). Wire into OpenAI, Gemini, DeepSeek, and Perplexity
operations with expanded unit tests. 301 integration tests green.
…sair ops

OpenAI/DeepSeek chat now use openai-chat/deepseek-chat modes: roles include
tool/function, tool_calls preserved, multimodal content arrays allowed, tools
via paramsJson. Strict-chat kept for Perplexity package schema. Edges remain:
empty messages, bad JSON, sampling ranges, stream=true reject, client surface.
All package endpoints still registered (OpenAI 129). 305 tests green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant