Skip to content

Conversation

@nxglabs
Copy link
Collaborator

@nxglabs nxglabs commented Nov 20, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 20, 2025 06:50
@vercel
Copy link

vercel bot commented Nov 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
open-sign Error Error Nov 20, 2025 6:50am

@nxglabs nxglabs merged commit f8987a5 into main Nov 20, 2025
14 of 15 checks passed
Copy link

Copilot AI left a comment

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 upgrades to version 2.31.0 and includes dependency updates, new signature management features, email template customization improvements, widget drag-and-drop enhancements, and various bug fixes.

Key Changes:

  • Added new cloud functions for signature and email template management
  • Enhanced SMTP configuration to support optional authentication
  • Improved widget drag-and-drop with boundary validation and visual preview
  • Added document hash generation for completed PDFs
  • Upgraded dependencies and removed touch backend support

Reviewed Changes

Copilot reviewed 57 out of 59 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
apps/OpenSignServer/package.json Updated dependencies including AWS SDK, axios, mongodb (downgraded), and dev tools
apps/OpenSignServer/index.js Modified SMTP config to make auth optional when credentials are missing
apps/OpenSignServer/cloud/parsefunction/*.js Added new functions for signature/email template management and decline notifications
apps/OpenSignServer/cloud/parsefunction/pdf/PDF.js Added document hash generation for completed PDFs and certificate updates
apps/OpenSign/package.json Removed react-dnd-touch-backend dependency
apps/OpenSign/src/pages/*.jsx Improved widget drag-and-drop with boundary checks and removed unused imports
apps/OpenSign/src/components/pdf/*.jsx Refactored drag-and-drop to use custom hook and added drag preview component
apps/OpenSign/public/locales/*/translation.json Added translations for new email/SMTP settings features
.github/workflows/Docker.yml Added multi-architecture (amd64/arm64) Docker build support

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

Comment on lines +209 to +210
subject = _tenantRes?.CompletionSubject ? tenant?.CompletionSubject : subject;
body = _tenantRes?.CompletionBody ? tenant?.CompletionBody : body;
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

In the sendCompletedMail function, there's a typo in the variable reference. Line 209 and 210 incorrectly reference tenant?.CompletionSubject and tenant?.CompletionBody instead of _tenantRes?.CompletionSubject and _tenantRes?.CompletionBody. The variable tenant is not defined in this scope - it should be _tenantRes which contains the parsed tenant data.

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +8
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Cannot save signature for the current user.');
}
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The error message on line 7 has a grammar issue. "Cannot save signature for the current user" should be "Cannot save signature for another user" or "Can only save signature for the current user" to better reflect the validation logic being performed (checking if userId matches the current user's ID).

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +27
if (userPtr) {
signatureCls.set('UserId', userPtr);
}
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The condition if (userPtr) at line 25 is redundant. The variable userPtr is always defined at line 10, so this check will always be true. Consider removing this condition or add a proper validation if needed.

Copilot uses AI. Check for mistakes.
"mailgun.js": "^12.1.0",
"mongodb": "^6.20.0",
"mailgun.js": "^12.1.1",
"mongodb": "^5.9.2",
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The version "^5.9.2" for mongodb package appears to be a downgrade from "^6.20.0". MongoDB driver v6 includes breaking changes and improvements. Unless this is an intentional downgrade for compatibility reasons, this could introduce issues or lose functionality available in v6.

Copilot uses AI. Check for mistakes.
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Missing userId parameter.');
}
if (userId !== request.user?.id) {
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Cannot save signature for the current user.');
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The error message on line 8 has a grammar issue. "Cannot save signature for the current user" should be "Cannot save signature for another user" or "Can only save signature for the current user" to better reflect the validation logic being performed (checking if userId matches the current user's ID).

Copilot uses AI. Check for mistakes.
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Missing userId parameter.');
}
if (userId !== request.user?.id) {
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'Cannot save signature for the current user.');
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The error message on line 8 has a grammar issue. "Cannot save signature for the current user" should be "Cannot save signature for another user" or "Can only save signature for the current user" to better reflect the validation logic being performed (checking if userId matches the current user's ID).

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +21
if (userPtr) {
signatureCls.set('UserId', userPtr);
}
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The condition if (userPtr) at line 19 is redundant. The variable userPtr is always defined at line 10, so this check will always be true. Consider removing this condition or add a proper validation if needed.

Copilot uses AI. Check for mistakes.

// to avoid negative position values (half portion of widget should not be out of pdf container)
const calculateWidth = getXPosition + getWidth - containerRect.width;
const calculateHeight = getYPosition + getWidth - containerRect.height;
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

In the calculateHeight calculation on line 407, the height is incorrectly calculated using getWidth instead of getHeight. This should be getYPosition + getHeight - containerRect.height to properly validate the widget's vertical boundary.

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.

3 participants