[PR #2411] [MERGED] feat: validate signers have signature fields before distribution #2283

Closed
opened 2026-02-26 20:33:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/2411
Author: @Mythie
Created: 1/26/2026
Status: Merged
Merged: 1/26/2026
Merged by: @Mythie

Base: mainHead: feat/validate-signer-fields-on-distribute


📝 Commits (4)

  • cc1e5a5 feat: validate signers have signature fields before distribution
  • c55ad24 chore: update authorized test
  • de19d75 fix: update tests
  • a354c85 fix: update tests

📊 Changes

19 files changed (+1033 additions, -69 deletions)

View changed files

.agents/plans/clear-amber-light-validate-signer-fields-on-distribute.md (+76 -0)
📝 apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx (+3 -15)
📝 apps/remix/app/components/embed/embed-direct-template-client-page.tsx (+10 -3)
📝 apps/remix/app/components/embed/embed-document-signing-page-v1.tsx (+3 -2)
📝 apps/remix/app/components/embed/multisign/multi-sign-document-signing-view.tsx (+3 -2)
📝 apps/remix/app/components/general/document-signing/document-signing-form.tsx (+3 -2)
📝 apps/remix/app/components/general/envelope-signing/envelope-signer-form.tsx (+3 -2)
📝 packages/api/v1/implementation.ts (+1 -6)
📝 packages/app-tests/e2e/api/v1/document-sending.spec.ts (+294 -1)
📝 packages/app-tests/e2e/api/v1/template-field-prefill.spec.ts (+36 -0)
📝 packages/app-tests/e2e/api/v1/test-unauthorized-api-access.spec.ts (+1 -1)
packages/app-tests/e2e/api/v2/distribute-validation.spec.ts (+403 -0)
📝 packages/app-tests/e2e/api/v2/template-field-prefill.spec.ts (+36 -0)
📝 packages/app-tests/e2e/api/v2/test-unauthorized-api-access.spec.ts (+95 -0)
📝 packages/app-tests/e2e/document-flow/duplicate-recipients.spec.ts (+9 -0)
📝 packages/app-tests/e2e/templates-flow/duplicate-recipients.spec.ts (+4 -2)
📝 packages/lib/server-only/document/send-document.ts (+17 -25)
📝 packages/lib/utils/recipients.ts (+31 -0)
📝 packages/ui/primitives/document-flow/add-fields.tsx (+5 -8)

📄 Description

API users were inadvertently sending documents without signature fields,
causing confusion for recipients and breaking their signing flows.

  • Add getRecipientsWithMissingFields helper in recipients.ts
  • Add server-side validation in sendDocument to block distribution
  • Fix v1 API to return 400 instead of 500 for validation errors
  • Consolidate UI signature field checks to use isSignatureFieldType
  • Add E2E tests for both v1 and v2 APIs

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/2411 **Author:** [@Mythie](https://github.com/Mythie) **Created:** 1/26/2026 **Status:** ✅ Merged **Merged:** 1/26/2026 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/validate-signer-fields-on-distribute` --- ### 📝 Commits (4) - [`cc1e5a5`](https://github.com/documenso/documenso/commit/cc1e5a5163f9ac620054fe29de5ecc090423d66c) feat: validate signers have signature fields before distribution - [`c55ad24`](https://github.com/documenso/documenso/commit/c55ad242389ba7b77ea82c50fc4551ac16da81a1) chore: update authorized test - [`de19d75`](https://github.com/documenso/documenso/commit/de19d756c95cdf21f63e5b32a8c61bbd7b36df51) fix: update tests - [`a354c85`](https://github.com/documenso/documenso/commit/a354c85ee9bcaa66b5ab5c039209c213a8182572) fix: update tests ### 📊 Changes **19 files changed** (+1033 additions, -69 deletions) <details> <summary>View changed files</summary> ➕ `.agents/plans/clear-amber-light-validate-signer-fields-on-distribute.md` (+76 -0) 📝 `apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx` (+3 -15) 📝 `apps/remix/app/components/embed/embed-direct-template-client-page.tsx` (+10 -3) 📝 `apps/remix/app/components/embed/embed-document-signing-page-v1.tsx` (+3 -2) 📝 `apps/remix/app/components/embed/multisign/multi-sign-document-signing-view.tsx` (+3 -2) 📝 `apps/remix/app/components/general/document-signing/document-signing-form.tsx` (+3 -2) 📝 `apps/remix/app/components/general/envelope-signing/envelope-signer-form.tsx` (+3 -2) 📝 `packages/api/v1/implementation.ts` (+1 -6) 📝 `packages/app-tests/e2e/api/v1/document-sending.spec.ts` (+294 -1) 📝 `packages/app-tests/e2e/api/v1/template-field-prefill.spec.ts` (+36 -0) 📝 `packages/app-tests/e2e/api/v1/test-unauthorized-api-access.spec.ts` (+1 -1) ➕ `packages/app-tests/e2e/api/v2/distribute-validation.spec.ts` (+403 -0) 📝 `packages/app-tests/e2e/api/v2/template-field-prefill.spec.ts` (+36 -0) 📝 `packages/app-tests/e2e/api/v2/test-unauthorized-api-access.spec.ts` (+95 -0) 📝 `packages/app-tests/e2e/document-flow/duplicate-recipients.spec.ts` (+9 -0) 📝 `packages/app-tests/e2e/templates-flow/duplicate-recipients.spec.ts` (+4 -2) 📝 `packages/lib/server-only/document/send-document.ts` (+17 -25) 📝 `packages/lib/utils/recipients.ts` (+31 -0) 📝 `packages/ui/primitives/document-flow/add-fields.tsx` (+5 -8) </details> ### 📄 Description API users were inadvertently sending documents without signature fields, causing confusion for recipients and breaking their signing flows. - Add getRecipientsWithMissingFields helper in recipients.ts - Add server-side validation in sendDocument to block distribution - Fix v1 API to return 400 instead of 500 for validation errors - Consolidate UI signature field checks to use isSignatureFieldType - Add E2E tests for both v1 and v2 APIs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:33:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#2283
No description provided.