Skip to content

v2.30.0#1994

Merged
prafull-opensignlabs merged 1 commit intostagingfrom
updates-18555669223
Oct 16, 2025
Merged

v2.30.0#1994
prafull-opensignlabs merged 1 commit intostagingfrom
updates-18555669223

Conversation

@nxglabs
Copy link
Collaborator

@nxglabs nxglabs commented Oct 16, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 16, 2025 08:48
@vercel
Copy link

vercel bot commented Oct 16, 2025

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

Project Deployment Preview Comments Updated (UTC)
open-sign Ready Ready Preview Comment Oct 16, 2025 8:49am

@prafull-opensignlabs prafull-opensignlabs merged commit e8b3c7f into staging Oct 16, 2025
5 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 OpenSign to version 2.30.0, introducing significant improvements to document conversion, widget management, and code quality. Key changes include a rewritten DOCX-to-PDF conversion endpoint with concurrency controls, enhanced widget validation in signature flows, and numerous code optimizations across the codebase.

  • Server: Improved DOCX-to-PDF conversion with memory-based processing, concurrency limiting, and timeout handling
  • Frontend: Enhanced widget validation, formula support for number widgets, improved accessibility, and code refactoring
  • Dependencies: Updated multiple packages including AWS SDK, Parse Server, and development tools

Reviewed Changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
apps/OpenSignServer/package.json Version bump to 2.30.0 and dependency updates
apps/OpenSignServer/index.js Added security configuration for authentication adapters
apps/OpenSignServer/cloud/parsefunction/saveAsTemplate.js Reset widget response field when saving templates
apps/OpenSignServer/cloud/customRoute/docxtopdf.js Complete rewrite with memory storage, concurrency limiting, and improved error handling
apps/OpenSign/src/utils/widgetUtils.js Added applyNumberFormulasToPages utility function
apps/OpenSign/src/primitives/Tooltip.jsx Added focus outline for accessibility
apps/OpenSign/src/pages/TemplatePlaceholder.jsx Refactored widget position handling and added formula recalculation
apps/OpenSign/src/pages/SignyourselfPdf.jsx Enhanced widget validation with guided tours for unsigned widgets
apps/OpenSign/src/pages/PlaceHolderSign.jsx Code refactoring and formula recalculation integration
apps/OpenSign/src/pages/PdfRequestFiles.jsx Fixed trailing comma formatting
apps/OpenSign/src/constant/saveFileSize.js Extracted common headers and removed console.log statements
apps/OpenSign/src/constant/Utils.js Multiple improvements including widget order changes, formula support, and code cleanup
apps/OpenSign/src/components/pdf/* Various UI improvements, refactoring, and bug fixes across PDF components
apps/OpenSign/public/locales/*/translation.json Added translations for formula-related features
apps/OpenSign/package.json Version bump to 2.30.0 and ESLint update

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

checkSigned = requiredWidgets[i]?.options?.response;
if (!checkSigned) {
const checkSignUrl = requiredWidgets[i]?.pos?.SignUrl;
const checkSignUrl = requiredWidgets[i]?.SignUrl;
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The code now references requiredWidgets[i]?.SignUrl but the structure has been flattened from requiredWidgets[i]?.pos?.SignUrl. The pos property was removed, which could cause this check to fail if widgets still have the nested structure, potentially allowing unsigned widgets to pass validation.

Suggested change
const checkSignUrl = requiredWidgets[i]?.SignUrl;
const checkSignUrl = requiredWidgets[i]?.SignUrl || requiredWidgets[i]?.pos?.SignUrl;

Copilot uses AI. Check for mistakes.
// (tracks how many images have finished loading)
setLoadedImages((prev) => prev + 1);
}
setImageLoaders({});
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

This line clears all image loaders immediately after incrementing loadedImages, which could cause the loading spinner to disappear prematurely for other images that are still loading. The loader state should only be cleared for the specific image that finished loading, not all loaders.

Suggested change
setImageLoaders({});
setImageLoaders((prevLoaders) => {
const newLoaders = { ...prevLoaders };
delete newLoaders[key];
return newLoaders;
});

Copilot uses AI. Check for mistakes.
return "/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/";
case "number":
return "/^\\d+$/";
return "^\\d+(?:\\.\\d+)?$"; // "/^\\d+$/";
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The regex pattern for number validation is missing the leading and trailing slashes that are present in other regex patterns in this switch statement. While the current pattern works with RegexParser, this inconsistency could cause confusion. Either add the slashes for consistency or document why this pattern differs from others.

Suggested change
return "^\\d+(?:\\.\\d+)?$"; // "/^\\d+$/";
return "/^\\d+(?:\\.\\d+)?$/";

Copilot uses AI. Check for mistakes.
props.pos.type
)
) {
if (props?.data?.Role !== "prefill") {
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The condition for showing the page copy modal has been changed from checking specific widget types to checking if Role is not 'prefill'. This means the copy functionality is now available for ALL widgets in non-prefill roles, including those that may not have been intended to support copying (like dropdowns, radios, etc.). This could be intentional but represents a significant behavior change that should be verified.

Suggested change
if (props?.data?.Role !== "prefill") {
// Only allow copy modal for specific widget types and non-prefill role
const allowedCopyTypes = ["text", "signature", "date", "checkbox"]; // Add/remove types as needed
if (
props?.data?.Role !== "prefill" &&
allowedCopyTypes.includes(props?.pos?.type)
) {

Copilot uses AI. Check for mistakes.
);
//condiiton is used to store copied prefill image base64 url in redux for display image
if (props?.data?.Role === "prefill") {
if (props?.pos?.type === "image") {
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

This condition was changed from checking if props?.data?.Role === 'prefill' to checking if props?.pos?.type === 'image'. This means prefill images for other widget types (signature, stamp, etc.) will no longer be stored in Redux, which could break image display for those widget types when copied.

Suggested change
if (props?.pos?.type === "image") {
if (props?.data?.Role === "prefill") {

Copilot uses AI. Check for mistakes.
Comment on lines +62 to +80
export const applyNumberFormulasToPages = (pages = []) => {
// Guard: if not an array or empty, just return as-is
if (!Array.isArray(pages) || pages.length === 0) {
return pages;
}

// Clone pages and each widget.options so we do not mutate caller's data.
// (Shallow clone is sufficient for our current usage since we only touch `options`.)
const clonedPages = pages.map((page) => ({
...page,
pos: (page?.pos || []).map((widget) => ({
...widget,
options: { ...widget.options }
}))
}));

// Return the cloned, updated pages
return clonedPages;
};
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The applyNumberFormulasToPages function is documented as applying number formulas but currently only clones the data structure without actually implementing any formula calculation logic. This is called throughout the codebase expecting formula evaluation, but it's not performing that operation. This appears to be an incomplete implementation.

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