-
Notifications
You must be signed in to change notification settings - Fork 57
(DO NOT MERGE) - To get Changelogs #984
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
base: release-20250916
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ 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 |
Summary of ChangesHello @Prasad2291, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a suite of significant improvements across the application, enhancing both developer experience and user functionality. It standardizes commit practices, refines deployment strategies for core services like Vespa and Prometheus, and expands the frontend's ability to display diverse document types. The workflow builder is now more robust with dynamic agent creation and better change management, while new features for user and API key administration provide greater control and security. A core focus has also been placed on improving the accuracy and relevance of AI interactions through comprehensive timezone awareness. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a wide range of significant features and refactorings across the deployment, frontend, and backend. Key changes include the integration of Commitizen for standardized commits, major enhancements to deployment scripts for better configuration and robustness, and a complete overhaul of the PDF viewer on the frontend for improved performance and features. The backend sees substantial updates with new user management APIs, API key scope enforcement for security, and more sophisticated handling of data context in chat and agent interactions, including timezone awareness. While the overall changes are impressive and move the project forward, I've identified a critical issue in the workflow logic where AI agents are created on every execution, which needs to be addressed. I've also noted a few areas for improvement in code clarity and potential performance optimizations.
| if (tool.type === "ai_agent") { | ||
| processedConfig = { | ||
| ...processedConfig, | ||
| inputType: "form" | ||
| try { | ||
| Logger.info(`Creating agent for AI agent tool: ${JSON.stringify(tool.value)}`) | ||
|
|
||
| // Extract agent data from tool configuration | ||
| const agentData: CreateAgentPayload = { | ||
| name: tool.value?.name || `Workflow Agent - ${template.name}`, | ||
| description: tool.value?.description || "Auto-generated agent for workflow execution", | ||
| prompt: tool.value?.systemPrompt || "You are a helpful assistant that processes workflow data.", | ||
| model: tool.value?.model || "googleai-gemini-2-5-flash", // Use model from tool config | ||
| isPublic: false, // Workflow agents are private by default | ||
| appIntegrations: [], // No app integrations for workflow agents | ||
| allowWebSearch: false, // Disable web search for workflow agents | ||
| isRagOn: false, // Disable RAG for workflow agents | ||
| uploadedFileNames: [], // No uploaded files for workflow agents | ||
| docIds: [], // No document IDs for workflow agents | ||
| userEmails: [] // No additional users for permissions | ||
| } | ||
|
|
||
| Logger.info(`Creating agent with data: ${JSON.stringify(agentData)}`) | ||
|
|
||
| // Create the agent using createAgentForWorkflow | ||
| const newAgent: SelectAgent = await createAgentForWorkflow(agentData, userId, workspaceInternalId) | ||
|
|
||
| Logger.info(`Successfully created agent: ${newAgent.externalId} for workflow tool`) | ||
|
|
||
| // Store the agent ID in the tool config for later use | ||
| processedConfig = { | ||
| ...processedConfig, | ||
| inputType: "form", | ||
| agentId: newAgent.externalId, // ← This replaces the hardcoded agent ID | ||
| createdAgentId: newAgent.externalId, // Store backup reference | ||
| agentName: newAgent.name, | ||
| dynamicallyCreated: true // Flag to indicate this was auto-created | ||
| } | ||
|
|
||
| Logger.info(`Tool config updated with agent ID: ${newAgent.externalId}`) | ||
|
|
||
| } catch (agentCreationError) { | ||
| Logger.error(agentCreationError, `Failed to create agent for workflow tool, using fallback config`) | ||
|
|
||
| // Fallback to original behavior if agent creation fails | ||
| processedConfig = { | ||
| ...processedConfig, | ||
| inputType: "form", | ||
| agentCreationFailed: true, | ||
| agentCreationError: agentCreationError instanceof Error ? agentCreationError.message : String(agentCreationError) | ||
| } | ||
| } | ||
| } |
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.
A new AI agent is created every time this tool is executed in a workflow. This will lead to a large number of agents being created, which is inefficient and will quickly pollute the agents table. This could also incur unnecessary costs and management overhead.
Consider implementing a strategy to reuse agents. For example, you could create a single, dedicated agent for this workflow tool when the workflow template is created, and then reuse that agent's ID for all subsequent executions. Alternatively, you could search for an existing agent with a specific name or tag before creating a new one.
| // Ensure unique names per owner (excluding soft-deleted items) | ||
| uniqueOwnerName: uniqueIndex( | ||
| "unique_owner_collection_name_not_deleted", | ||
| ) | ||
| .on(table.workspaceId, table.name) | ||
| .on(table.ownerId, table.name) | ||
| .where(sql`${table.deletedAt} IS NULL`), |
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.
The unique constraint for collection names has been changed from (workspaceId, name) to (ownerId, name). This is a significant semantic change. It implies that collection names must now be unique per user across the entire system, rather than unique within a workspace. This could prevent different users in the same workspace from creating collections with the same name (e.g., "My Documents"). Please confirm if this change was intentional, as it might impact user experience.
| {isNumericChild ? !(citation && citation.title?.endsWith(".pdf") && citation.chunkIndex !== undefined) ? ( | ||
| <span | ||
| className="inline-flex items-center justify-center min-w-[18px] h-[18px] px-[6px] py-[2px] mx-[2px] bg-gray-200 hover:bg-gray-300 dark:bg-gray-900 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 rounded-full text-[10px] font-mono font-medium cursor-pointer transition-colors duration-150 no-underline" | ||
| style={{ textDecoration: "none" }} | ||
| > | ||
| {children} | ||
| </span> | ||
| ) : ( | ||
| children | ||
| )} | ||
| ) : undefined : ( children )} |
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.
The nested ternary operator here makes the logic difficult to follow. Consider refactoring this for better readability by extracting the condition into a boolean variable. This will make the component's rendering logic clearer and easier to maintain.
const shouldRenderStyledCitation = isNumericChild && !(citation && citation.title?.endsWith(".pdf") && citation.chunkIndex !== undefined);
return shouldRenderStyledCitation ? (
<span
className="inline-flex items-center justify-center min-w-[18px] h-[18px] px-[6px] py-[2px] mx-[2px] bg-gray-200 hover:bg-gray-300 dark:bg-gray-900 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 rounded-full text-[10px] font-mono font-medium cursor-pointer transition-colors duration-150 no-underline"
style={{ textDecoration: "none" }}
>
{children}
</span>
) : ( children );
| const collectionitems = await getAllCollectionAndFolderItems( | ||
| collectionFolderIds, | ||
| db, | ||
| ) | ||
| const collectionPgFileIds = collectionitems.fileIds | ||
| const collectionPgFolderIds = collectionitems.folderIds | ||
|
|
||
| if (collectionFolderIds.length > 0) { | ||
| const ids = await getCollectionFilesVespaIds(collectionFileIds, db) | ||
| const vespaIds = ids | ||
| const ids = await getCollectionFilesVespaIds(collectionPgFileIds, db) | ||
| const vespaFileIds = ids | ||
| .filter((item) => item.vespaDocId !== null) | ||
| .map((item) => item.vespaDocId!) | ||
| fileIds.push(...vespaIds) | ||
| fileIds.push(...vespaFileIds) | ||
| const folderVespaIds = await getCollectionFoldersItemIds( | ||
| collectionPgFolderIds, | ||
| db, | ||
| ) | ||
|
|
||
| const vespaFolderIds = folderVespaIds | ||
| .filter((item) => item.id !== null) | ||
| .map((item) => item.id!) | ||
| collectionIds.push(...vespaFolderIds) | ||
| } |
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.
This function recursively fetches all items within specified folders. For deeply nested or very large collections, this could lead to performance issues due to multiple database queries in a loop. Consider adding safeguards like a depth limit or fetching items in a more optimized way, perhaps with a recursive CTE if the database supports it, to prevent potential performance bottlenecks.
| const toEmail = emailConfig.to_email || emailConfig.recipients || [] | ||
| const fromEmail = emailConfig.from_email || "[email protected]" | ||
| const subject = emailConfig.subject || "Workflow Results" | ||
|
|
||
| const contentType = emailConfig.content_type || "html" | ||
| const [execution] = await db | ||
| .select() | ||
| .from(workflowExecution) | ||
| .where(eq(workflowExecution.id, executionId)) | ||
|
|
||
| const workflowName = execution?.name || "Unknown Workflow" | ||
| const subject = emailConfig.subject || `Results of Workflow: ${workflowName}` |
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.
Feat/paddle
* build(scripts): add circular dependency check to dev and build workflows - Introduce `check-deps` script using madge to detect circular imports. - Wire `check-deps` into the default `dev` and `build` npm scripts. - Add `check-deps:unsafe` variants that skip the circular dependency check for optional bypass. * refactor(server): centralise shared services - Extract PgBoss queue client into `boss.ts` and replace duplicated configuration in `queue/index.ts` and other files with a single exported instance. - Create `vespaService.ts` that provides a shared Vespa service, imported by `search/vespa.ts` and `search/utils.ts`. - Remove repeated configuration and schema imports across modules. - Simplify dependency management and reduce code duplication throughout the server. * fix: XYN-302 addressed bot comments * refactor(config): centralise database URL extraction - Replace placeholder DB URL in config.ts with real Postgres connection string - Expose getDatabaseUrl() to provide the connection string - Update boss.ts to use getDatabaseUrl() instead of hard‑coded URL - Keeps queue configuration DRY and provides a single source of truth for the DB URL
…#1021) * fix(agentPathSupport): path referenced folder are now consider as source to that agent * fix(agentPathSupport): resolved comments * fix(agentPathSupport): resolved comments * fix(agentPathSupport): resolved comments
* fix(livekit-script): added livekit script in infra * fix(livekit-script): made the suggested changes * fix(livekit-script): made the suggested changes
* fix(file-upload): trigger upload of file on file select * chore(file-upload): resolved comments * chore(file-upload): resolved comments * chore(file-upload): resolved comments * chore(file-upload): resolved comments --------- Co-authored-by: Ravishekhar Yadav <[email protected]>
* fix(fileProcessing-status): updated backend for upload-status * fix(fileProcessing-status): quick changes * fix(fileProcessing-status): quick changes * fix(fileProcessing-status): quick changes
* feat(metadataPaddle): resolving commentsD * feat(paddle): removing selectedFiles * Update vespa package * feat(paddle): resolving comments --------- Co-authored-by: Junaid <[email protected]>
#1029) Co-authored-by: Ravishekhar Yadav <[email protected]>
* fix(upload-state): frontend changes to catter poll * fix(upload-state): frontend changes to catter poll
## [3.23.7](v3.23.6...v3.23.7) (2025-10-29) ### Bug Fixes * **migrate-datasource:** Migrate datasource to knowledgeBase ([#1136](#1136)) ([3fa075b](3fa075b))
…djust proxy settings (#1146) - Raise NGINX `client_max_body_size` to 1 GB. - Expand CSP to allow Google Fonts and generic WebSocket/HTTPS connections. - Switch main application backend from env‑controlled port 3001 to hard‑coded port 3002. - Remove upstream documentation and location blocks. - Update proxy settings for primary app routes: 600‑second timeouts, buffering disabled. - Simplify backend configuration and improve handling of heavy or streaming requests.
## [3.23.8](v3.23.7...v3.23.8) (2025-10-30) ### Bug Fixes * **nginx:** increase upload limit, update CSP, switch backend port, adjust proxy settings ([#1146](#1146)) ([a8181a0](a8181a0))
* fix: XYNE-254 fixed followup in kb chat * chore: XYNE-254 resolved comments * chore: XYNE-254 resolved comments --------- Co-authored-by: Ravishekhar Yadav <[email protected]>
## [3.23.9](v3.23.8...v3.23.9) (2025-10-30) ### Bug Fixes * XYNE-254 fixed followup in kb chat ([#1170](#1170)) ([a1ba643](a1ba643))
…1172) * feat: XYN-263 implented enhanced chatting and notification mechanism * feat(directMessages): made the suggested changes
# [3.24.0](v3.23.9...v3.24.0) (2025-10-30) ### Features * XYN-263 implented enhanced chatting and notification mechanism ([#1172](#1172)) ([6beb54f](6beb54f))
* chore: XYNE-112 Modified server/health files for paddleOCRHealthcheck * chore: XYNE-112 modified files for paddle health check * chore: XYNE-112 Modified code for health check * chore: XYNE-112 added code * fix: XYNE-112 Modified code WRT PR comments * chore: XYNE-112 Modified server/health files for paddleOCRHealthcheck * chore: XYNE-112 modified files for paddle health check * chore: XYNE-112 Modified code for health check * chore: XYNE-112 added code * fix: XYNE-112 Modified code WRT PR comments * chore: XYNE-112 Made change WRT PR comments
…tion post oauth (#1171) Co-authored-by: Chinmay Singh <[email protected]>
## [3.24.1](v3.24.0...v3.24.1) (2025-10-31) ### Bug Fixes * XYNE-260 fixed the UI to show correct button during google ingestion post oauth ([#1171](#1171)) ([8a641a3](8a641a3)), closes [Chinmay-Sin#FQX1](https://github.com/Chinmay-Sin/issues/FQX1)
…app (#1168) * feat: Add endpoint for handling Apple Login * feat: Refactor validateAppleToken using jose * fix: Fix handleAppleAppValidation AI comments * fix: Resolve comments
# [3.25.0](v3.24.1...v3.25.0) (2025-10-31) ### Features * **apple-signin:** Add Apple Sign-in validation endpoint for mobile app ([#1168](#1168)) ([40810a8](40810a8))
## [3.25.1](v3.25.0...v3.25.1) (2025-10-31) ### Bug Fixes * XYNE-156 tool box disappear fix ([#1157](#1157)) ([ae16427](ae16427))
## [3.25.2](v3.25.1...v3.25.2) (2025-10-31) ### Bug Fixes * **kb:** XYNE-270 fixed chat button state in basis of poll status ([#1177](#1177)) ([43d516f](43d516f))
* fix: XYNE-259 fixed chunk index load error * fix: XYNE-259 fixed import
## [3.25.3](v3.25.2...v3.25.3) (2025-10-31) ### Bug Fixes * XYNE-259 fixed chunk index load error ([#1178](#1178)) ([6e79a73](6e79a73))
* fix(search): Add attendees email if display name is empty * fix(event): changes based on comment
## [3.25.4](v3.25.3...v3.25.4) (2025-10-31) ### Bug Fixes * **search:** Add attendees email if display name is empty ([#1167](#1167)) ([c861801](c861801))
* fix: XYNE-218 fixed rag on pdf tables * fix: XYNE-218 resolved ai comments * fix: XYNE-218 removed dead code and added a length guard n
#1071) * feat: Webhook Registration and execution service with dynamic webhook handlers and UI * feat: Webhook authentication handling for basic bearer and api-key with none * feat: Webhook handler and api security reforms * feat: comments resolved * feat: HTTP Node addition in Workflow Xyne * feat: Credentials fixed webhook url workflow added and changes * feat: Webhook E2E working form not working completely * feat: Webhook E2E working with all types of workflows * remove the void methods --------- Co-authored-by: Aman Asrani <[email protected]>
# [3.26.0](v3.25.4...v3.26.0) (2025-10-31) ### Features * Webhook Registration and execution service with dynamic webhook… ([#1071](#1071)) ([5478db1](5478db1))
* fix(fix/Sync-1): inserting single user job in queue * fix(fix/Sync-1): inserting single user job in queue-2 * fix(fix/Sync-1): inserting single user job in queue-3 * fix(fix/Sync-1): inserting single user job in queue-4 --------- Co-authored-by: Mohd Shoaib <[email protected]>
## [3.26.1](v3.26.0...v3.26.1) (2025-10-31) ### Bug Fixes * **fix/Sync-1:** inserting single user job in queue ([#1175](#1175)) ([8c8008d](8c8008d))
…plicate dependencies (#1180) * fix: XYNE-284 removed caret from breaking dependencies and removed duplicate dependencies * fix: XYNE-284 added bun.lock for build --------- Co-authored-by: Chinmay Singh <[email protected]>
## [3.26.2](v3.26.1...v3.26.2) (2025-11-03) ### Bug Fixes * XYNE-284 removed caret from breaking dependencies and removed duplicate dependencies ([#1180](#1180)) ([76f6095](76f6095))
* feat(langfuse): Initial langfuse testing (UAT) * feat(langfuse): Initial langfuse testing (UAT)w * feat(langfuse): Initial langfuse testing (UAT)w
# [3.27.0](v3.26.2...v3.27.0) (2025-11-03) ### Features * **langfuse:** Initial langfuse testing (UAT) ([#1182](#1182)) ([5e6b8b3](5e6b8b3))
Description
Testing
Additional Notes