chore(style): codebase em-dash sweep + minor layout polish
Some checks failed
Build & Push Docker Images / lint (push) Failing after 1m18s
Build & Push Docker Images / build-and-push (push) Has been skipped

Replaces every em-dash and en-dash with regular ASCII hyphens
across comments, JSX strings, and dev-facing logs. Mostly cosmetic
but stops the inconsistent mix that crept in over the last few
months (some files used em-dashes in comments, others didn't,
some used both).

Bundles two small dashboard-layout tweaks that touch a couple of
already-modified files:
- (dashboard)/layout.tsx main padding goes from p-6 to pt-3 px-6
  pb-6 so page content sits closer to the topbar.
- Sidebar now receives the ports list it needs for the footer
  port switcher.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Ciaccio
2026-05-04 22:57:01 +02:00
parent d62822c284
commit 8699f81879
225 changed files with 844 additions and 845 deletions

View File

@@ -120,7 +120,7 @@ function applyPayloadRedirect(payload: Record<string, unknown>): Record<string,
email: env.EMAIL_REDIRECT_TO,
}));
}
// v1.13 formValues shape keys vary per template; key by anything that
// v1.13 formValues shape - keys vary per template; key by anything that
// looks like an email field. The conservative approach: only touch keys
// that already hold a string and end with `Email` / `email`.
if (out.formValues && typeof out.formValues === 'object') {
@@ -193,7 +193,7 @@ export async function sendDocument(docId: string, portId?: string): Promise<Docu
if (env.EMAIL_REDIRECT_TO) {
logger.warn(
{ docId, portId, redirect: env.EMAIL_REDIRECT_TO },
'sendDocument SKIPPED EMAIL_REDIRECT_TO is set, outbound comms paused',
'sendDocument SKIPPED - EMAIL_REDIRECT_TO is set, outbound comms paused',
);
// Return the existing doc shape so downstream code doesn't see an
// unexpected null. The document remains in DRAFT/PENDING from
@@ -215,7 +215,7 @@ export async function getDocument(docId: string, portId?: string): Promise<Docum
/**
* Email a signing reminder to one recipient. Skipped entirely when
* EMAIL_REDIRECT_TO is set the recipient's stored email may still be
* EMAIL_REDIRECT_TO is set - the recipient's stored email may still be
* a real client address from before the redirect was enabled.
*/
export async function sendReminder(
@@ -226,7 +226,7 @@ export async function sendReminder(
if (env.EMAIL_REDIRECT_TO) {
logger.warn(
{ docId, signerId, portId, redirect: env.EMAIL_REDIRECT_TO },
'sendReminder SKIPPED EMAIL_REDIRECT_TO is set, outbound comms paused',
'sendReminder SKIPPED - EMAIL_REDIRECT_TO is set, outbound comms paused',
);
return;
}
@@ -282,12 +282,12 @@ export async function checkDocumensoHealth(
//
// Callers always work in PERCENT (0-100). For v1 the abstraction multiplies by
// the page dimensions returned by Documenso (cached per docId for the lifetime
// of the process fields for a given doc usually go in a single batch).
// of the process - fields for a given doc usually go in a single batch).
export type DocumensoFieldType = 'SIGNATURE' | 'INITIALS' | 'DATE' | 'TEXT' | 'EMAIL';
export interface DocumensoFieldPlacement {
/** Documenso recipient id; v1 expects number, v2 string coerced internally. */
/** Documenso recipient id; v1 expects number, v2 string - coerced internally. */
recipientId: number | string;
type: DocumensoFieldType;
pageNumber: number;
@@ -296,7 +296,7 @@ export interface DocumensoFieldPlacement {
pageY: number;
pageWidth: number;
pageHeight: number;
/** Optional v2 fieldMeta passed through verbatim, ignored on v1. */
/** Optional v2 fieldMeta - passed through verbatim, ignored on v1. */
fieldMeta?: Record<string, unknown>;
}
@@ -309,7 +309,7 @@ const DEFAULT_PAGE_DIMENSIONS: DocumensoPageDimensions = { width: 595, height: 8
const pageDimensionCache = new Map<string, DocumensoPageDimensions>();
/** Test seam clears the page-dimension memoization. */
/** Test seam - clears the page-dimension memoization. */
export function __resetDocumensoCachesForTests(): void {
pageDimensionCache.clear();
}
@@ -353,7 +353,7 @@ export async function placeFields(
...(f.fieldMeta ? { fieldMeta: f.fieldMeta } : {}),
}));
// Note: v2 endpoint shape (envelopeId/recipientId types) must be
// confirmed against a live Documenso 2.x instance see PR11 realapi
// confirmed against a live Documenso 2.x instance - see PR11 realapi
// suite. Spec risk register flags this drift as the top v2 risk.
const res = await fetch(`${baseUrl}/api/v2/envelope/field/create-many`, {
method: 'POST',
@@ -401,7 +401,7 @@ export async function placeFields(
/**
* Auto-position one SIGNATURE field per recipient at the last-page footer,
* staggered horizontally so multiple signers don't overlap. Used by the
* upload-path wizard admins can refine in Documenso afterwards.
* upload-path wizard - admins can refine in Documenso afterwards.
*
* Layout (percent of page):
* y = 88 (footer band)
@@ -445,7 +445,7 @@ export function computeDefaultSignatureLayout(
* v1: DELETE /api/v1/documents/{id}
* v2: DELETE /api/v2/envelope/{id}
*
* Idempotent on 404 (already gone) logs and resolves.
* Idempotent on 404 (already gone) - logs and resolves.
*/
export async function voidDocument(docId: string, portId?: string): Promise<void> {
const { baseUrl, apiKey, apiVersion } = await resolveCreds(portId);