Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/http-backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ app.use(cookieParser());

app.use("/user" , userRouter)
app.use('/node', sheetRouter)
app.use('/auth/google', googleAuth)
app.use('/oauth/google', googleAuth)
app.use('/execute', execRouter)

const PORT= 3002
Expand Down
2 changes: 1 addition & 1 deletion apps/http-backend/src/routes/google_callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ googleAuth.get(
// Redirect to workflow page if workflowId is provided, otherwise to general workflow page
const redirectUrl = workflowId
? `http://localhost:3000/workflows/${workflowId}`
: "http://localhost:3000/workflow";
: "http://localhost:3000/workflows";
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The error redirect URL on line 148 still uses the old path /workflow instead of /workflows. This inconsistency means that if the OAuth token exchange fails, users will be redirected to the wrong URL. Update this line to use /workflows to match the successful redirect path on line 135.

Copilot uses AI. Check for mistakes.
console.log(' Redirecting to:', redirectUrl);
return res.redirect(redirectUrl);
} catch (err: any) {
Expand Down
6 changes: 3 additions & 3 deletions apps/http-backend/src/routes/userRoutes/userRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,13 @@ router.put(
message: "Invalid input",
});
}
const { credentialId, ...restConfig } = dataSafe.data.Config;
// const { credentialId, ...restConfig } = dataSafe.data.Config;
const updateNode = await prismaClient.node.update({
where: { id: dataSafe.data.NodeId },
data: {
position: dataSafe.data.position,
config: restConfig,
CredentialsID: credentialId
config: dataSafe.data.Config ,
CredentialsID: dataSafe.data.Config?.credentialId || null
Comment on lines +577 to +583
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Inconsistency between create and update: credentialId handling in config.

The create handler (line 527) destructures credentialId out of Config so it's stored only in CredentialsID, not in the config JSON column. The update handler now stores the full Config (including credentialId) in the config column and extracts it into CredentialsID. This means:

  1. After create: config has no credentialId, CredentialsID is set.
  2. After update: config contains credentialId, CredentialsID is also set.

This divergence can cause bugs if downstream code reads credentialId from config (it'll be missing on freshly created nodes) or leads to stale data if only one location is updated.

Consider either stripping credentialId from Config in both handlers, or keeping it in both — but be consistent.

Option: Strip credentialId in the update handler too (consistent with create)
-      // const { credentialId, ...restConfig } = dataSafe.data.Config;
+      const { credentialId, ...restConfig } = dataSafe.data.Config ?? {};
       const updateNode = await prismaClient.node.update({
         where: { id: dataSafe.data.NodeId },
         data: {
           position: dataSafe.data.position,
-          config: dataSafe.data.Config ,
-          CredentialsID: dataSafe.data.Config?.credentialId || null
+          config: restConfig || {},
+          CredentialsID: credentialId || null
         },
       });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// const { credentialId, ...restConfig } = dataSafe.data.Config;
const updateNode = await prismaClient.node.update({
where: { id: dataSafe.data.NodeId },
data: {
position: dataSafe.data.position,
config: restConfig,
CredentialsID: credentialId
config: dataSafe.data.Config ,
CredentialsID: dataSafe.data.Config?.credentialId || null
const { credentialId, ...restConfig } = dataSafe.data.Config ?? {};
const updateNode = await prismaClient.node.update({
where: { id: dataSafe.data.NodeId },
data: {
position: dataSafe.data.position,
config: restConfig || {},
CredentialsID: credentialId || null
🤖 Prompt for AI Agents
In `@apps/http-backend/src/routes/userRoutes/userRoutes.ts` around lines 577 -
583, The update path is inconsistent with the create handler: it persists
dataSafe.data.Config (including credentialId) into the JSON config and also sets
CredentialsID, causing duplication; modify the prismaClient.node.update call to
strip credentialId from dataSafe.data.Config before saving (same approach as the
create handler) so config does not contain credentialId and only CredentialsID
holds it — locate the update logic around prismaClient.node.update, reference
dataSafe.data.Config and CredentialsID, remove/exclude credentialId from the
config object prior to passing it into the data: { config: ..., CredentialsID:
... } payload.

Comment on lines +582 to +583
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

There is an inconsistency between the node creation and update logic. The create endpoint (line 527) destructures credentialId from Config and stores it separately, while this update now keeps credentialId in Config. This means newly created nodes will have Config without credentialId, but updated nodes will have Config with credentialId. For consistency, either both should remove credentialId from Config, or both should keep it. Based on line 37 in executionRoutes.ts which uses config.credentialId as a fallback, keeping it in Config seems intentional. Consider also updating the create endpoint (line 527) to match this behavior.

Copilot uses AI. Check for mistakes.
},
});

Expand Down
2 changes: 1 addition & 1 deletion apps/http-backend/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/index.ts","./src/routes/google_callback.ts","./src/routes/nodes.routes.ts","./src/routes/userroutes/usermiddleware.ts","./src/routes/userroutes/userroutes.ts","./src/scheduler/token-scheduler.ts","./src/services/token-refresh.service.ts"],"version":"5.7.3"}
{"root":["./src/index.ts","./src/routes/google_callback.ts","./src/routes/sheet.routes.ts","./src/routes/userRoutes/executionRoutes.ts","./src/routes/userRoutes/userMiddleware.ts","./src/routes/userRoutes/userRoutes.ts","./src/scheduler/token-scheduler.ts","./src/services/token-refresh.service.ts"],"version":"5.7.3"}
2 changes: 1 addition & 1 deletion apps/worker/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/index.ts","./src/types.ts","./src/engine/executor.ts","./src/engine/registory.ts","./src/tests/create-execution.ts","./src/tests/setup-test.ts","./src/tests/test.ts","./src/tests/update-node.ts"],"version":"5.7.3"}
{"root":["./src/index.ts","./src/engine/executor.ts"],"version":"5.7.3"}
2 changes: 1 addition & 1 deletion packages/common/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/index.ts"],"version":"5.7.3"}
{"root":["./src/index.ts","./src/interpolation.ts"],"version":"5.7.3"}
2 changes: 1 addition & 1 deletion packages/nodes/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/index.ts","./src/common/google-oauth-service.ts","./src/gmail/gmail.executor.ts","./src/gmail/gmail.node.ts","./src/gmail/gmail.service.ts","./src/google-sheets/google-sheets.executor.ts","./src/google-sheets/google-sheets.node.ts","./src/google-sheets/google-sheets.service.ts","./src/google-sheets/test.ts","./src/registry/node-registry.ts"],"version":"5.7.3"}
{"root":["./src/index.ts","./src/common/google-oauth-service.ts","./src/gmail/gmail.executor.ts","./src/gmail/gmail.node.ts","./src/gmail/gmail.service.ts","./src/google-sheets/google-sheets.executor.ts","./src/google-sheets/google-sheets.node.ts","./src/google-sheets/google-sheets.service.ts","./src/google-sheets/test.ts","./src/registry/Execution.config.types.ts","./src/registry/execution.registory.ts","./src/registry/node-registry.ts"],"version":"5.7.3"}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.