Skip to content

Done flow#34

Merged
Vamsi-o merged 1 commit into
mainfrom
flow-ui
Dec 7, 2025
Merged

Done flow#34
Vamsi-o merged 1 commit into
mainfrom
flow-ui

Conversation

@Vamsi-o

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

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added new UI components: Select dropdowns, Sheet panels, Labels, and Input fields
    • Enabled cross-origin request support
  • Bug Fixes

    • Fixed backend URL configuration
  • Chores

    • Updated UI dependencies

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

Copilot AI review requested due to automatic review settings December 7, 2025 14:46
@Vamsi-o Vamsi-o merged commit 93268ad into main Dec 7, 2025
2 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Dec 7, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces CORS middleware to the HTTP backend, migrates Prisma client configuration from generated to official package with singleton pattern, fixes a backend URL typo, refactors user routes with enhanced validation and error handling, and adds new Radix UI-based input, label, select, and sheet components to the UI library.

Changes

Cohort / File(s) Summary
Backend CORS & Server Setup
apps/http-backend/package.json, apps/http-backend/src/index.ts
Added cors and @types/cors dependencies; configured CORS middleware with localhost:3000 allowed origin and credentials enabled in Express server.
Backend Route Refactoring
apps/http-backend/src/routes/userRoutes/userRoutes.ts
Reformatted and enhanced user routes with improved error handling; added input validation via AvailableTriggers.safeParse to createTriggers; enhanced logging and consistent error responses; moved getAvailableNodes and updated getAvailableTriggers behavior.
Database & Prisma Client
packages/db/prisma/schema.prisma, packages/db/src/index.ts
Removed output path configuration from Prisma generator; migrated from generated client to official @prisma/client with singleton pattern via global instance stored on globalForPrisma.
Configuration & Build
apps/http-backend/tsconfig.tsbuildinfo, packages/common/src/index.ts
Updated tsbuildinfo paths to reflect renamed TypeScript files; fixed BACKEND_URL typo from "http:localhost:3002" to "http://localhost:3002".
Node Registry
packages/nodes/src/registry/node-registry.ts
Cosmetic formatting changes (spacing and semicolons) with no functional impact to NodeDefinition interface or NodeRegistry class methods.
UI Components & Dependencies
packages/ui/package.json, packages/ui/src/components/input.tsx, packages/ui/src/components/label.tsx, packages/ui/src/components/select.tsx, packages/ui/src/components/sheet.tsx
Added Radix UI dependencies (@radix-ui/react-dialog, @radix-ui/react-label, @radix-ui/react-select); introduced new wrapper components (Input, Label, Select with 10+ subcomponents, Sheet with 10+ subcomponents) that apply consistent styling and data-slot attributes around Radix primitives.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • packages/ui/src/components/select.tsx: Multiple exported functions (10+) with varied signatures; verify consistent prop forwarding and styling patterns across all subcomponents
  • packages/ui/src/components/sheet.tsx: Extensive wrapper component setup with position variants and animation classes; verify side prop handling and default close button behavior
  • packages/db/src/index.ts: Prisma client singleton pattern and global instance initialization; verify lazy initialization and thread-safety assumptions
  • apps/http-backend/src/routes/userRoutes/userRoutes.ts: New validation logic and error response codes; verify safeParse usage and HTTP status code correctness
  • apps/http-backend/src/index.ts: CORS middleware configuration; verify allowed origins and credentials settings align with frontend requirements

Possibly related PRs

Suggested reviewers

  • TejaBudumuru3

Poem

🐰 CORS gates opened wide, Prisma finds its home so bright,
Fresh UI shapes in Radix dance, wrapped in slots of styled delight,
Backend routes stand tall and true, input labels select with care—
A rabbit's web of components fair! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch flow-ui

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99ebc38 and b470d4c.

⛔ Files ignored due to path filters (2)
  • packages/db/src/generated/libquery_engine-debian-openssl-3.0.x.so.node is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • apps/http-backend/package.json (1 hunks)
  • apps/http-backend/src/index.ts (1 hunks)
  • apps/http-backend/src/routes/userRoutes/userRoutes.ts (1 hunks)
  • apps/http-backend/tsconfig.tsbuildinfo (1 hunks)
  • packages/common/src/index.ts (1 hunks)
  • packages/db/prisma/schema.prisma (0 hunks)
  • packages/db/src/index.ts (1 hunks)
  • packages/nodes/src/registry/node-registry.ts (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/components/input.tsx (1 hunks)
  • packages/ui/src/components/label.tsx (1 hunks)
  • packages/ui/src/components/select.tsx (1 hunks)
  • packages/ui/src/components/sheet.tsx (1 hunks)

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.

Copilot AI 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.

Pull request overview

This PR implements the "Done flow" feature by adding new UI components, fixing backend issues, and updating dependencies. The changes include several new Radix UI components for dialogs, selects, and labels, CORS configuration for the backend, and various bug fixes.

Key changes:

  • Added UI components (Sheet, Select, Label, Input) using Radix UI primitives
  • Fixed critical BACKEND_URL typo in common package
  • Configured CORS middleware in the backend
  • Refactored database client imports and Prisma configuration
  • Fixed code formatting in node-registry.ts

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
pnpm-lock.yaml Added dependencies for Radix UI components (dialog, select, label), CORS, and related utilities; contains deprecated Next.js version and incorrect react-dialog links
packages/ui/src/components/sheet.tsx New Sheet component using Radix UI dialog primitives for side panel functionality
packages/ui/src/components/select.tsx New Select component with dropdown functionality and scroll controls
packages/ui/src/components/label.tsx New Label component wrapping Radix UI label primitive with consistent styling
packages/ui/src/components/input.tsx New Input component with comprehensive styling and accessibility features
packages/ui/package.json Added Radix UI dependencies and incorrect react-dialog link
packages/nodes/src/registry/node-registry.ts Code formatting improvements (whitespace, semicolons)
packages/db/src/index.ts Changed Prisma import from generated client to @prisma/client; removed Prisma export
packages/db/prisma/schema.prisma Removed custom output path for Prisma client generation
packages/common/src/index.ts Fixed BACKEND_URL from "http:localhost:3002" to "http://localhost:3002"
apps/http-backend/tsconfig.tsbuildinfo Updated file references to reflect corrected casing in route file names
apps/http-backend/src/routes/userRoutes/userRoutes.ts Reformatted routes, added debug logging, and removed user-specific filtering from getAvailableTriggers
apps/http-backend/src/index.ts Added CORS configuration with localhost:3000 as allowed origin
apps/http-backend/package.json Added cors and @types/cors dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

});
const Data = await prismaClient.availableTrigger.findMany();
return res.status(statusCodes.OK).json({
message: "Availabe Triggers Fetched Succesfuuly",

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

Typo in log message: "Succesfuuly" should be "Successfully".

Copilot uses AI. Check for mistakes.
e
);
return res.status(statusCodes.INTERNAL_SERVER_ERROR).json({
message: "Internal server error in Createring Triggers",

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

Typo in console log: "Createring" should be "Creating".

Suggested change
message: "Internal server error in Createring Triggers",
message: "Internal server error in Creating Triggers",

Copilot uses AI. Check for mistakes.
userMiddleware,
async (req: AuthRequest, res: Response) => {
try {
console.log("RequestRecieved from the frontend");

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

Typo in console log: "Recieved" should be "Received".

Suggested change
console.log("RequestRecieved from the frontend");
console.log("RequestReceived from the frontend");

Copilot uses AI. Check for mistakes.
Comment thread pnpm-lock.yaml
Comment on lines +344 to +346
react-dialog:
specifier: link:@types/@radix-ui/react-dialog
version: link:@types/@radix-ui/react-dialog

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

Duplicate incorrect dependency entry: "react-dialog": "link:@types/@radix-ui/react-dialog". This should be removed or corrected to a valid local path. This is the same issue that appears in the web app's dependencies.

Suggested change
react-dialog:
specifier: link:@types/@radix-ui/react-dialog
version: link:@types/@radix-ui/react-dialog

Copilot uses AI. Check for mistakes.
const Data = await prismaClient.availableTrigger.findMany({
where : userId
});
const Data = await prismaClient.availableTrigger.findMany();

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

The removed where: userId clause has been deleted but was replaced with findMany() without a filter. This change removes user-specific filtering of triggers. If this was intentional (e.g., to return all available triggers instead of user-specific ones), it should be documented. If not, this is a bug that could expose data to unauthorized users.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +16
const allowedOrigins = ['http://localhost:3000'];
app.use(cors({
origin: allowedOrigins,
credentials: true,
}));

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

The CORS configuration only allows 'http://localhost:3000' as an origin. In production environments, this will need to be updated to include the actual production domain(s). Consider using environment variables for the allowed origins to make this configuration more flexible across different environments.

Copilot uses AI. Check for mistakes.
Comment thread pnpm-lock.yaml
Comment on lines 2945 to +2948
next@15.4.5:
resolution: {integrity: sha512-nJ4v+IO9CPmbmcvsPebIoX3Q+S7f6Fu08/dEWu0Ttfa+wVwQRh9epcmsyCPjmL2b8MxC+CkBR97jgDhUUztI3g==}
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
deprecated: This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/CVE-2025-66478 for more details.

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

The Next.js version 15.4.5 is marked as deprecated due to security vulnerability CVE-2025-66478. This should be upgraded to a patched version as soon as possible to address the security concern.

Suggested change
next@15.4.5:
resolution: {integrity: sha512-nJ4v+IO9CPmbmcvsPebIoX3Q+S7f6Fu08/dEWu0Ttfa+wVwQRh9epcmsyCPjmL2b8MxC+CkBR97jgDhUUztI3g==}
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
deprecated: This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/CVE-2025-66478 for more details.
next@15.4.6:
resolution: {integrity: sha512-REPLACE_WITH_ACTUAL_HASH_FOR_15.4.6}
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}

Copilot uses AI. Check for mistakes.
Comment thread pnpm-lock.yaml
Comment on lines +167 to +169
react-dialog:
specifier: link:@types/@radix-ui/react-dialog
version: link:@types/@radix-ui/react-dialog

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

This dependency entry "react-dialog": "link:@types/@radix-ui/react-dialog" appears to be incorrectly configured. The link: protocol should point to a local file path, not to a type definition path. This looks like it should either be removed (since @radix-ui/react-dialog is already a dependency) or corrected to a valid local path.

Suggested change
react-dialog:
specifier: link:@types/@radix-ui/react-dialog
version: link:@types/@radix-ui/react-dialog

Copilot uses AI. Check for mistakes.
Comment thread packages/ui/package.json
"lucide-react": "^0.475.0",
"next-themes": "^0.4.6",
"react": "^19.1.1",
"react-dialog": "link:@types/@radix-ui/react-dialog",

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

The same incorrect dependency "react-dialog": "link:@types/@radix-ui/react-dialog" is added to the package.json. This should be removed entirely, as @radix-ui/react-dialog is already declared as a dependency on line 10.

Suggested change
"react-dialog": "link:@types/@radix-ui/react-dialog",

Copilot uses AI. Check for mistakes.
try {
const Data = await prismaClient.availableNode.findMany();
return res.status(statusCodes.OK).json({
message: "Availabe Nodes Fetched Succesfuuly",

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

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

Typo in log message: "Succesfuuly" should be "Successfully".

Suggested change
message: "Availabe Nodes Fetched Succesfuuly",
message: "Availabe Nodes Fetched Successfully",

Copilot uses AI. Check for mistakes.
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.

2 participants