Skip to content

2025 12 30 exzg#44

Merged
Vamsi-o merged 3 commits into
mainfrom
2025-12-30-exzg
Dec 30, 2025
Merged

2025 12 30 exzg#44
Vamsi-o merged 3 commits into
mainfrom
2025-12-30-exzg

Conversation

@Vamsi-o

@Vamsi-o Vamsi-o commented Dec 30, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation

    • Comprehensive README overhaul with architecture overview, getting started guide, tech stack details, project structure, development workflow, microservices documentation, roadmap, and contribution guidelines.
  • New Features

    • Added sheet tabs retrieval functionality with authentication and parameter validation.
  • Bug Fixes

    • Updated CORS origin configuration.
    • Enhanced authentication checks in workflow creation endpoint.
  • UI/UX Improvements

    • Enhanced workflow interface with visual controls and background rendering.
    • Refined Google Sheet node handling and form rendering logic.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 30, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR makes multiple changes across the BuildFlow project: comprehensive README rewrite introducing new branding and documentation structure, backend CORS configuration update, new Google Sheets route addition, route refactoring with authentication guards, React Flow component improvements with Background and Controls, enhanced error handling in credential hooks, and worker logging refinement.

Changes

Cohort / File(s) Summary
Documentation
README.md
Complete rewrite from shadcn/ui monorepo template to BuildFlow-branded documentation; added architecture diagrams, tech stack, project structure, database schema, getting started guide, development workflow, microservices details, roadmap, and contribution sections.
Backend Server Configuration
apps/http-backend/src/index.ts
Updated CORS allowed origins from ['http://localhost:3000', 'http://localhost:3001'] to ['http://localhost:3000', 'http://localhost:300/']; affects cross-origin request validation.
Backend Routes
apps/http-backend/src/routes/google_callback.ts, apps/http-backend/src/routes/nodes.routes.ts, apps/http-backend/src/routes/userRoutes/userMiddleware.ts, apps/http-backend/src/routes/userRoutes/userRoutes.ts
Added new /getSheets/:cred/:sheetId route with authentication and parameter validation; refactored route definitions with multi-line syntax; added authentication guard to create/workflow route; removed /empty/workflow route; adjusted status codes and messages; commented out debug logging in middleware.
Backend Build Metadata
apps/http-backend/tsconfig.tsbuildinfo
Updated path metadata reflecting directory structure changes for userRoutes files (case adjustments).
Frontend Components
apps/web/app/components/nodes/CreateWorkFlow.tsx
Added imports for Background and Controls from @xyflow/react; integrated Background and Controls as ReactFlow children; refactored useEffect to simplify workflow initialization logic; removed nodeIDType state; refined Google Sheet node handling; updated GoogleSheetFormClient rendering.
Frontend Hooks & Configuration
apps/web/app/hooks/useCredential.ts, apps/web/app/workflow/lib/config.ts
Enhanced error handling with explicit early returns and improved logging in useCredential hook; refined conditional logic for credential responses; formatting adjustments (spacing, semicolons) in config file.
Worker Logging
apps/worker/src/index.ts
Added topic field to logged message object in eachMessage handler alongside partition, offset, and value.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • TejaBudumuru3

Poem

🐰 A hop through flows, where sheets now gleam,
With CORS paths and routes supreme,
Controls and background draw the view,
BuildFlow branded, fresh and true!
From docs to workers, error-free,
The workflow flourishes—joyfully! 🎯

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title '2025 12 30 exzg' is vague and generic, using non-descriptive terms that don't convey meaningful information about the extensive changes across multiple files. Provide a descriptive title that summarizes the main changes, such as 'Fix CORS config, add sheets endpoint, update Prisma schema, and enhance UI components' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b86252e and 6bed702.

📒 Files selected for processing (3)
  • apps/http-backend/src/routes/userRoutes/userRoutes.ts
  • apps/http-backend/tsconfig.tsbuildinfo
  • apps/web/app/components/nodes/CreateWorkFlow.tsx

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 and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 6

🧹 Nitpick comments (13)
apps/http-backend/src/routes/google_callback.ts (1)

24-24: Remove extra whitespace.

There's an extra space in the destructuring assignment.

🔎 Proposed fix
-        const { tokens }  = await oauth2.getToken(code);
+        const { tokens } = await oauth2.getToken(code);
apps/http-backend/tsconfig.tsbuildinfo (1)

1-1: Consider excluding build artifacts from version control.

The tsconfig.tsbuildinfo file is a TypeScript build artifact that's regenerated on each build. Committing it can lead to unnecessary merge conflicts.

Add to .gitignore:

*.tsbuildinfo
apps/http-backend/src/routes/userRoutes/userMiddleware.ts (1)

24-24: Consider removing commented code.

Instead of commenting out debug code, remove it entirely to keep the codebase clean.

🔎 Proposed fix
-    // console.log(req.cookies);
     const payload = await getToken({ req, secret: SECRET });
README.md (1)

34-58: Add language specifiers to fenced code blocks.

Several code blocks are missing language identifiers, which affects syntax highlighting and accessibility. As flagged by static analysis (MD040).

🔎 Proposed fix
-```
+```text
 ┌─────────────┐     ┌──────────────┐     ┌─────────────┐

For the project structure block:

-```
+```text
 BuildFlow/
 ├── apps/

For the workflow status lifecycle:

-```
+```text
 Start → Pending → InProgress → Completed

Also applies to: 114-166, 475-479

packages/db/prisma/schema.prisma (2)

57-57: Relation field naming deviates from convention.

The relation field Node uses PascalCase, which is unconventional for Prisma relation fields. Typically, relation fields use camelCase and plural form for one-to-many relations (e.g., nodes).

🔎 Suggested naming
-  Node        Node[]
+  nodes       Node[]

82-82: Consider making isEmpty non-nullable.

The isEmpty field is defined as Boolean? (nullable) with a default of true. Since it has a default value, it could be non-nullable Boolean to simplify queries and avoid null checks.

🔎 Proposed change
-  isEmpty     Boolean?            @default(true)
+  isEmpty     Boolean             @default(true)
apps/web/app/workflow/lib/config.ts (1)

35-38: Remove unused variable and excessive logging.

The Data variable on line 37 is assigned but never used. Additionally, the console.log statements appear to be debug artifacts.

🔎 Proposed cleanup
 export const getCredentials = async (type: string) => {
   try {
     const response = await axios.get(
       `${BACKEND_URL}/user/getCredentials/${type}`,
       {
         withCredentials: true,
       }
     );
-    console.log("response from config: ", response);
-
-    const Data = JSON.stringify(response.data.Data);
     return response.data.Data;
   } catch (e) {
     console.error("Error fetching credentials:", e);
     throw e;
   }
 };
apps/web/app/hooks/useCredential.ts (3)

5-7: Avoid any types; define proper interfaces.

Using any for state and return types defeats TypeScript's benefits and can hide bugs at runtime.

🔎 Proposed typing
+interface Credential {
+  id: string;
+  nodeId?: string;
+  // Add other credential fields as needed
+}
+
+interface UseCredentialsReturn {
+  cred: Credential | undefined;
+  authUrl: string | undefined;
+}
+
-export const useCredentials = (type: string): any => {
-  const [cred, setCred] = useState<any>();
+export const useCredentials = (type: string): UseCredentialsReturn => {
+  const [cred, setCred] = useState<Credential>();
   const [authUrl, setAuthUrl] = useState<string>();

11-11: Remove meaningless return statements inside useEffect.

The return {}, return cred statements inside the async fetchCred function have no effect—useEffect callbacks don't use return values from inner async functions. These are likely leftover from refactoring.

🔎 Proposed cleanup
       try {
-        if (!type) return {};
+        if (!type) return;
         const response = await getCredentials(type);
         if (response) {
           console.log(typeof response);
           if (typeof response === "string") setAuthUrl(response);
           else setCred(response);
-
-          // console.log(response[0].nodeId)
           console.log(response);
-          return cred;
-        } else return {};
+        }
       } catch (e) {

Also applies to: 20-21


22-28: Consider exposing error and loading states.

The hook catches errors but only logs them. Consumers have no way to know if credential fetching failed or is in progress.

🔎 Example enhancement
const [error, setError] = useState<Error | null>(null);
const [loading, setLoading] = useState(false);

// In fetchCred:
setLoading(true);
try {
  // ... fetch logic
} catch (e) {
  setError(e instanceof Error ? e : new Error("Unknown error"));
} finally {
  setLoading(false);
}

return { cred, authUrl, error, loading };
apps/web/app/components/nodes/CreateWorkFlow.tsx (3)

121-123: Incomplete else branch with commented placeholder.

The else branch contains only a commented-out placeholder // const newWorkflow. This suggests unfinished implementation for creating a new workflow when none exists.

Should I help implement the logic to create a new empty workflow when none is found? Or would you prefer to track this as a separate issue?


205-228: Remove async keyword from non-async handler.

The onNodeClick handler is marked async but doesn't await anything. This is unnecessary and can be misleading.

🔎 Proposed fix
-        onNodeClick={async (event, node) => {
+        onNodeClick={(event, node) => {

216-218: Remove debug console.log statements before merging.

Multiple console.log statements remain in the click handler. Consider removing them or using a proper logging utility that can be disabled in production.

🔎 Proposed cleanup
           if (node.data.name === "Google Sheet") {
-              console.log("sheet called");
-              console.log(node.id);
               // setNodeId("550e8400-e29b-41d4-a716-446655440000")
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 206d0ce and b86252e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • README.md
  • apps/http-backend/src/index.ts
  • apps/http-backend/src/routes/google_callback.ts
  • apps/http-backend/src/routes/nodes.routes.ts
  • apps/http-backend/src/routes/userRoutes/userMiddleware.ts
  • apps/http-backend/src/routes/userRoutes/userRoutes.ts
  • apps/http-backend/tsconfig.tsbuildinfo
  • apps/web/app/components/nodes/CreateWorkFlow.tsx
  • apps/web/app/hooks/useCredential.ts
  • apps/web/app/workflow/lib/config.ts
  • apps/worker/src/index.ts
  • package.json
  • packages/db/prisma/schema.prisma
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: Dev-Pross/BuildFlow PR: 0
File: .github/instructions/Guide me.instructions.md:0-0
Timestamp: 2025-12-11T15:32:23.874Z
Learning: Provide architectural and implementation guidance for BuildFlow (N8N clone) project by analyzing all project files and documents; focus on advising what needs to be done without writing code unless explicitly requested
📚 Learning: 2025-12-11T15:32:23.874Z
Learnt from: CR
Repo: Dev-Pross/BuildFlow PR: 0
File: .github/instructions/Guide me.instructions.md:0-0
Timestamp: 2025-12-11T15:32:23.874Z
Learning: Provide architectural and implementation guidance for BuildFlow (N8N clone) project by analyzing all project files and documents; focus on advising what needs to be done without writing code unless explicitly requested

Applied to files:

  • README.md
🧬 Code graph analysis (4)
apps/http-backend/src/routes/nodes.routes.ts (1)
apps/http-backend/src/routes/userRoutes/userMiddleware.ts (2)
  • userMiddleware (18-42)
  • AuthRequest (8-10)
apps/web/app/components/nodes/CreateWorkFlow.tsx (3)
apps/web/app/workflow/lib/dbHandler.ts (1)
  • getEmptyWorkflow (5-15)
apps/web/store/slices/workflowSlice.ts (1)
  • workflowActions (30-30)
apps/web/app/components/nodes/GoogleSheetFormClient.tsx (1)
  • GoogleSheetFormClient (25-300)
apps/web/app/hooks/useCredential.ts (2)
apps/web/app/workflow/lib/config.ts (1)
  • getCredentials (27-43)
packages/nodes/src/common/google-oauth-service.ts (1)
  • getCredentials (77-101)
apps/http-backend/src/routes/userRoutes/userRoutes.ts (1)
apps/http-backend/src/routes/userRoutes/userMiddleware.ts (2)
  • userMiddleware (18-42)
  • AuthRequest (8-10)
🪛 markdownlint-cli2 (0.18.1)
README.md

7-7: Link fragments should be valid

(MD051, link-fragments)


8-8: Link fragments should be valid

(MD051, link-fragments)


9-9: Link fragments should be valid

(MD051, link-fragments)


10-10: Link fragments should be valid

(MD051, link-fragments)


11-11: Link fragments should be valid

(MD051, link-fragments)


12-12: Link fragments should be valid

(MD051, link-fragments)


13-13: Link fragments should be valid

(MD051, link-fragments)


14-14: Link fragments should be valid

(MD051, link-fragments)


15-15: Link fragments should be valid

(MD051, link-fragments)


16-16: Link fragments should be valid

(MD051, link-fragments)


34-34: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


114-114: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


475-475: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


499-499: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (5)
apps/worker/src/index.ts (1)

24-24: LGTM: Helpful logging enhancement.

Adding the topic field to the log output improves debugging visibility for message consumption.

apps/http-backend/src/routes/nodes.routes.ts (1)

7-7: LGTM: Executor instantiation.

The GoogleSheetsNodeExecutor is properly instantiated for reuse across route handlers.

apps/http-backend/src/routes/userRoutes/userRoutes.ts (1)

68-358: LGTM: Consistent formatting applied.

The route definitions have been reformatted to a multi-line style, improving readability while preserving all existing functionality.

package.json (1)

18-18: pnpm@10.26.2 is a valid released version.

apps/web/app/components/nodes/CreateWorkFlow.tsx (1)

4-4: Good UX enhancement with ReactFlow controls.

Adding Background and Controls components improves the workflow editor's usability by providing visual grid reference and zoom/pan controls.

Also applies to: 231-232

const app = express()

const allowedOrigins = ['http://localhost:3000' , 'http://localhost:3001' ];
const allowedOrigins = ['http://localhost:3000' , 'http://localhost:300/' ];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Fix CORS origin typo.

The second allowed origin was changed from 'http://localhost:3001' to 'http://localhost:300/', which appears to be an accidental typo. This will break CORS for any service running on port 3001.

🔎 Proposed fix
-const allowedOrigins = ['http://localhost:3000' , 'http://localhost:300/' ];
+const allowedOrigins = ['http://localhost:3000', 'http://localhost:3001'];
📝 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 allowedOrigins = ['http://localhost:3000' , 'http://localhost:300/' ];
const allowedOrigins = ['http://localhost:3000', 'http://localhost:3001'];
🤖 Prompt for AI Agents
In apps/http-backend/src/index.ts around line 16, the allowedOrigins array
contains a typo: 'http://localhost:300/' was mistakenly used instead of the
intended 'http://localhost:3001'; update that entry to 'http://localhost:3001'
so CORS allows requests from the correct port 3001 origin.

Comment on lines +9 to +54
sheetRouter.get(
"/getDocuments/:cred",
userMiddleware,
async (req: AuthRequest, res: Response) => {
try {
if (!req.user)
return res
.status(statusCodes.BAD_GATEWAY)
.json({ message: "User isnot logged in /not authorized" });
const credId = req.params.cred;
if (!credId) {
return res
.status(statusCodes.BAD_REQUEST)
.json({ message: "credentials id not provided" });
}
const userId = req.user.sub;
console.log("userid from node route: ", userId);
if (!userId)
return res
.status(statusCodes.NOT_FOUND)
.json({ message: "User id not provided" });
const sheets = await sheetExecutor.getSheets({
userId: userId,
credId: credId,
});
if ((sheets as any)?.success === false) {
return res.status(statusCodes.NOT_FOUND).json({
message: "files not found",
files: sheets,
});
}
return res.status(statusCodes.OK).json({
message: "sheets are fetched successfully",
files: (sheets as any)?.data?.data?.files || [],
});
} catch (e) {
console.log(
"Error Fetching the credentials ",
e instanceof Error ? e.message : "Unkown reason"
);
return res
.status(statusCodes.INTERNAL_SERVER_ERROR)
.json({ message: "Internal server from fetching the 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.

⚠️ Potential issue | 🟡 Minor

Fix typo in error message.

Line 47 contains a typo: "Unkown" should be "Unknown".

🔎 Proposed fix
         "Error Fetching the credentials ",
-        e instanceof Error ? e.message : "Unkown reason"
+        e instanceof Error ? e.message : "Unknown reason"
       );
📝 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
sheetRouter.get(
"/getDocuments/:cred",
userMiddleware,
async (req: AuthRequest, res: Response) => {
try {
if (!req.user)
return res
.status(statusCodes.BAD_GATEWAY)
.json({ message: "User isnot logged in /not authorized" });
const credId = req.params.cred;
if (!credId) {
return res
.status(statusCodes.BAD_REQUEST)
.json({ message: "credentials id not provided" });
}
const userId = req.user.sub;
console.log("userid from node route: ", userId);
if (!userId)
return res
.status(statusCodes.NOT_FOUND)
.json({ message: "User id not provided" });
const sheets = await sheetExecutor.getSheets({
userId: userId,
credId: credId,
});
if ((sheets as any)?.success === false) {
return res.status(statusCodes.NOT_FOUND).json({
message: "files not found",
files: sheets,
});
}
return res.status(statusCodes.OK).json({
message: "sheets are fetched successfully",
files: (sheets as any)?.data?.data?.files || [],
});
} catch (e) {
console.log(
"Error Fetching the credentials ",
e instanceof Error ? e.message : "Unkown reason"
);
return res
.status(statusCodes.INTERNAL_SERVER_ERROR)
.json({ message: "Internal server from fetching the credentials" });
}
})
}
);
sheetRouter.get(
"/getDocuments/:cred",
userMiddleware,
async (req: AuthRequest, res: Response) => {
try {
if (!req.user)
return res
.status(statusCodes.BAD_GATEWAY)
.json({ message: "User isnot logged in /not authorized" });
const credId = req.params.cred;
if (!credId) {
return res
.status(statusCodes.BAD_REQUEST)
.json({ message: "credentials id not provided" });
}
const userId = req.user.sub;
console.log("userid from node route: ", userId);
if (!userId)
return res
.status(statusCodes.NOT_FOUND)
.json({ message: "User id not provided" });
const sheets = await sheetExecutor.getSheets({
userId: userId,
credId: credId,
});
if ((sheets as any)?.success === false) {
return res.status(statusCodes.NOT_FOUND).json({
message: "files not found",
files: sheets,
});
}
return res.status(statusCodes.OK).json({
message: "sheets are fetched successfully",
files: (sheets as any)?.data?.data?.files || [],
});
} catch (e) {
console.log(
"Error Fetching the credentials ",
e instanceof Error ? e.message : "Unknown reason"
);
return res
.status(statusCodes.INTERNAL_SERVER_ERROR)
.json({ message: "Internal server from fetching the credentials" });
}
}
);
🤖 Prompt for AI Agents
In apps/http-backend/src/routes/nodes.routes.ts around lines 9 to 54, the catch
block's console.log message contains a typo ("Unkown"); update the string to
"Unknown" so the line reads e.g. e instanceof Error ? e.message : "Unknown
reason". Ensure only the typo is fixed and the rest of the logging/response
remains unchanged.

Comment on lines +56 to +103
sheetRouter.get(
"/getSheets/:cred/:sheetId",
userMiddleware,
async (req: AuthRequest, res: Response) => {
try {
const userId = req.user?.sub;
if (!userId)
return res
.status(statusCodes.BAD_GATEWAY)
.json({ message: "User isnot logged in /not authorized" });
const credId = req.params.cred;
const sheetId = req.params.sheetId;
if (!credId || !sheetId) {
return res
.status(statusCodes.BAD_REQUEST)
.json({ message: `credentials id not provided ` });
}
if (!sheetExecutor) {
return res.status(statusCodes.FORBIDDEN).json({
message: "sheet executor not configured well",
});
}
const sheets = await sheetExecutor.getSheetTabs(
{ userId: userId, credId: credId },
sheetId
);

if ((sheets as any)?.success === false)
return res.status(statusCodes.NOT_FOUND).json({
message: "files not found",
files: sheets,
});

sheetRouter.get('/getSheets/:cred/:sheetId', userMiddleware, async(req: AuthRequest, res: Response)=>{
try{
const userId = req.user?.sub
if (!userId)
return res
.status(statusCodes.BAD_GATEWAY)
.json({ message: "User isnot logged in /not authorized" });
const credId = req.params.cred
const sheetId = req.params.sheetId
if(!credId || !sheetId){
return res
.status(statusCodes.BAD_REQUEST)
.json({message: `credentials id not provided `})
}
if(!sheetExecutor){
return res.status(statusCodes.FORBIDDEN).json({
message: "sheet executor not configured well"
})
}
const sheets = await sheetExecutor.getSheetTabs({userId: userId, credId: credId}, sheetId)

if((sheets as any)?.success === false) return res.status(statusCodes.NOT_FOUND).json({
message: "files not found",
files: sheets
});

return res.status(statusCodes.OK).json({
message: "sheets are fetched successfully",
files: sheets
})
}catch(e){
console.log("Error Fetching the credentials ", e instanceof Error ? e.message : "Unkown reason");
return res.status(statusCodes.OK).json({
message: "sheets are fetched successfully",
files: sheets,
});
} catch (e) {
console.log(
"Error Fetching the credentials ",
e instanceof Error ? e.message : "Unkown reason"
);
return res
.status(statusCodes.INTERNAL_SERVER_ERROR)
.json({ message: "Internal server from fetching the credentials" });
}
}) No newline at end of file
}
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove unnecessary executor check and fix typo.

Two issues in this new route:

  1. Lines 73-77: The check if (!sheetExecutor) is unnecessary. The executor is instantiated at Line 7 as a const, so it will never be falsy.

  2. Line 96: Typo "Unkown" should be "Unknown".

🔎 Proposed fixes

Remove the unnecessary check:

       const sheetId = req.params.sheetId;
       if (!credId || !sheetId) {
         return res
           .status(statusCodes.BAD_REQUEST)
           .json({ message: `credentials id not provided ` });
       }
-      if (!sheetExecutor) {
-        return res.status(statusCodes.FORBIDDEN).json({
-          message: "sheet executor not configured well",
-        });
-      }
       const sheets = await sheetExecutor.getSheetTabs(

Fix the typo:

         "Error Fetching the credentials ",
-        e instanceof Error ? e.message : "Unkown reason"
+        e instanceof Error ? e.message : "Unknown reason"
       );
🤖 Prompt for AI Agents
In apps/http-backend/src/routes/nodes.routes.ts around lines 56 to 103, remove
the unnecessary runtime check for sheetExecutor (delete lines 73-77) since
sheetExecutor is a const instantiated at module load and cannot be falsy, and
fix the typo on the error log at line 96 by changing "Unkown" to "Unknown" so
the catch block logs correct spelling.

setCredType(
node.data.type === "google_sheet" ? "google_oauth" : ""
);
setLoadSheet(!loadSheet);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use functional state update to avoid stale closure.

Using !loadSheet directly can capture a stale value if multiple clicks occur rapidly. Use the functional form of setState.

🔎 Proposed fix
-              setLoadSheet(!loadSheet);
+              setLoadSheet((prev) => !prev);
📝 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
setLoadSheet(!loadSheet);
setLoadSheet((prev) => !prev);
🤖 Prompt for AI Agents
In apps/web/app/components/nodes/CreateWorkFlow.tsx at line 225, the state
toggle uses setLoadSheet(!loadSheet) which can capture a stale value on rapid
clicks; change it to the functional updater form (setLoadSheet(prev => !prev))
so the new state is computed from the previous state and avoids stale closures.

Comment on lines +61 to +70
id String @id @default(uuid())
name String
config Json
position Int
workflowId String?
AvailableNodeID String
credentials Credential[]
AvailableNode AvailableNode @relation(fields: [AvailableNodeID], references: [id])
workflow Workflow? @relation(fields: [workflowId], references: [id])
executions NodeExecution[]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Search for references to the old field name 'AvailabeNodeID' (with typo)
echo "=== Searching for old field name 'AvailabeNodeID' ==="
rg "AvailabeNodeID" --type ts --type js --type tsx --type jsx 2>/dev/null || echo "No matches found"

echo ""
echo "=== Searching for old field name 'AvailabeNodeId' ==="
rg "AvailabeNodeId" --type ts --type js --type tsx --type jsx 2>/dev/null || echo "No matches found"

echo ""
echo "=== Searching for new field name 'AvailableNodeID' to see current usage ==="
rg "AvailableNodeID" --type ts --type js --type tsx --type jsx -c 2>/dev/null || echo "No matches found"

echo ""
echo "=== Checking for migration files ==="
find packages/db/prisma/migrations -name "*.sql" -type f 2>/dev/null | head -20 || echo "Migration directory check completed"

echo ""
echo "=== Checking the current schema file ==="
grep -n "AvailableNodeID\|AvailabeNodeID" packages/db/prisma/schema.prisma

Repository: Dev-Pross/BuildFlow

Length of output: 499


🏁 Script executed:

#!/bin/bash

echo "=== Listing all files in prisma migrations directory ==="
find packages/db/prisma/migrations -type f 2>/dev/null | sort

echo ""
echo "=== Checking for any recent migration files ==="
ls -la packages/db/prisma/migrations/ 2>/dev/null || echo "Migration directory not found"

echo ""
echo "=== Searching for migration files mentioning AvailableNode ==="
find packages/db/prisma/migrations -type f -exec grep -l "AvailableNode" {} \; 2>/dev/null || echo "No migrations mentioning AvailableNode"

echo ""
echo "=== Checking git log for recent schema/migration changes ==="
cd packages/db && git log --oneline -20 -- prisma/ 2>/dev/null || echo "Git log check completed"

Repository: Dev-Pross/BuildFlow

Length of output: 626


Missing Prisma migration for field rename.

The schema contains the renamed field AvailableNodeID, but there is no migration file in packages/db/prisma/migrations/ to support this breaking change. The migrations directory contains only migration_lock.toml with no actual migration files. A Prisma migration must be created and committed to properly handle this schema change across environments.

🤖 Prompt for AI Agents
In packages/db/prisma/schema.prisma around lines 61 to 70, the field was renamed
to AvailableNodeID but no Prisma migration was generated or committed; generate
and commit a proper migration that applies the rename so databases stay in sync.
Run Prisma migrate (e.g., prisma migrate dev --name rename-available-node-id or
prisma migrate diff / create as appropriate for your workflow) to produce a
migration in packages/db/prisma/migrations/, verify the migration performs a
column rename (or uses SQL to rename the column without data loss), update any
shadow DB or seed steps if needed, test applying the migration locally, and
commit the resulting migration folder and updated migration_lock.toml to the
repo.

Comment thread README.md
Comment on lines +7 to +16
- [Overview](#overview)
- [Architecture](#architecture)
- [Tech Stack](#tech-stack)
- [Project Structure](#project-structure)
- [Database Schema](#database-schema)
- [Getting Started](#getting-started)
- [Development](#development)
- [Microservices](#microservices)
- [Key Features](#key-features)
- [Roadmap](#roadmap)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Table of Contents links may not resolve correctly.

The anchor links (e.g., #overview) won't match the actual heading anchors generated from headings with emoji prefixes (e.g., ## 🎯 Overview). GitHub generates anchors like #-overview or #️-overview for emoji-prefixed headings.

🔎 Proposed fix

Either remove emojis from headings or update the ToC links to match the generated anchors:

-- [Overview](#overview)
-- [Architecture](#architecture)
-- [Tech Stack](#tech-stack)
-- [Project Structure](#project-structure)
-- [Database Schema](#database-schema)
-- [Getting Started](#getting-started)
-- [Development](#development)
-- [Microservices](#microservices)
-- [Key Features](#key-features)
-- [Roadmap](#roadmap)
+- [Overview](#-overview)
+- [Architecture](#️-architecture)
+- [Tech Stack](#️-tech-stack)
+- [Project Structure](#-project-structure)
+- [Database Schema](#️-database-schema)
+- [Getting Started](#-getting-started)
+- [Development](#-development)
+- [Microservices](#-microservices)
+- [Key Features](#-key-features)
+- [Roadmap](#️-roadmap)

Alternatively, remove emojis from headings for cleaner anchors.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

7-7: Link fragments should be valid

(MD051, link-fragments)


8-8: Link fragments should be valid

(MD051, link-fragments)


9-9: Link fragments should be valid

(MD051, link-fragments)


10-10: Link fragments should be valid

(MD051, link-fragments)


11-11: Link fragments should be valid

(MD051, link-fragments)


12-12: Link fragments should be valid

(MD051, link-fragments)


13-13: Link fragments should be valid

(MD051, link-fragments)


14-14: Link fragments should be valid

(MD051, link-fragments)


15-15: Link fragments should be valid

(MD051, link-fragments)


16-16: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
In README.md around lines 7 to 16 the Table of Contents links point to plain
anchors like #overview but the corresponding headings include emoji prefixes
(e.g., "## 🎯 Overview") so the generated anchors do not match; fix by either
removing the leading emojis from the headings so anchors become predictable
(e.g., "## Overview"), or update each ToC link to the exact anchor produced by
GitHub for the emoji-prefixed headings (i.e., include the emoji character(s) at
the start of the anchor or regenerate the ToC with a tool that handles emoji),
then verify all links navigate correctly.

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