Skip to content

feat(remix): support serving app under a sub-path via NEXT_PUBLIC_BASE_PATH - #2824

Merged
Mythie merged 7 commits into
documenso:mainfrom
GMCfourX4:feat/sub-path-support
Aug 12, 2026
Merged

Mythie merged 7 commits into
documenso:mainfrom
GMCfourX4:feat/sub-path-support

Conversation

@GMCfourX4

Copy link
Copy Markdown
Contributor

Summary

Lets operators deploy Documenso behind a reverse proxy at a non-root path (e.g. /ESign/) without prefix stripping. Driven by a single new env var, NEXT_PUBLIC_BASE_PATH. When unset (the default), behaviour is unchanged.

Why

Reverse proxies that strip prefixes (e.g. /Signature/* → /* on the way to the backend) work for HTML and most API calls, but break for SSR-rendered HTML containing root-absolute asset URLs (/assets/app-xxx.css) and for cookies/redirects the backend emits with leading-/ paths. The cleanest fix is to make the app sub-path aware end-to-end rather than rely on proxy-side string surgery.

What changed

A single env var, NEXT_PUBLIC_BASE_PATH, threaded through every layer that emits or consumes root-absolute URLs:

  • Build: Vite base, React Router basename
  • Server: Hono .basePath(), serveStatic rewriter, tRPC endpoints (internal + open-api). The internal tRPC adapter needs the prefix in endpoint because @hono/trpc-server slices it off the full URL to compute the procedure name; Hono's basePath alone doesn't rewrite the URL the adapter sees.
  • Runtime: new getBasePath() helper in packages/lib/constants/app.ts (prefers explicit env, falls back to the pathname of NEXT_PUBLIC_WEBAPP_URL)
  • HTML: favicon, apple-touch-icon, manifest links, ThemeProvider themeAction
  • Client fetches: PDF upload, locale switch (×2 sites), AI field/recipient detection, embed presign-token
  • Auth: sign-out path derived from baseUrl; post-auth redirects use a prefix-aware default; post-login LOGIN_REDIRECT_PATH derived from getBasePath()
  • PWA: site.webmanifest icon URLs changed from absolute (/foo.png) to relative (./foo.png) so they resolve under any base path per the webmanifest spec (icons are parsed relative to the manifest URL)
  • Docker: NEXT_PUBLIC_BASE_PATH build arg + env so the value is both baked into the client bundle at build time and exposed at runtime via window.__ENV__

20 files changed, +133/-31 lines.

Behaviour when env var is unset

Every path is a no-op: getBasePath() returns '', Vite base is /, RR basename is undefined, Hono basePath is /, all fetch(`${''}/api/...`) calls collapse to /api/.... The default site.webmanifest icon resolution ./foo.png relative to /site.webmanifest resolves to /foo.png, matching the previous absolute behaviour.

Test plan

  • Production deployment with NEXT_PUBLIC_BASE_PATH=/ESign behind HAProxy forwarding /ESign/* → backend without prefix stripping
  • Verified end-to-end at the sub-path: SSR + hashed asset loading, sign-in/-up flow, theme + language switching, PDF upload, document signing, tRPC calls, OpenAPI v2 calls, PWA install
  • npm run typecheck clean against this branch
  • docker build -f docker/Dockerfile . (env var unset, validating the no-op default path) clean
  • Would appreciate a maintainer running the existing e2e suite to confirm no regression at the default

Happy to split into multiple commits, change the env-var name, or restructure the helpers if you'd prefer.

…E_PATH

Allows operators to deploy Documenso behind a reverse proxy at a non-root
path (e.g. /ESign/) without prefix stripping. When NEXT_PUBLIC_BASE_PATH
is unset (the default), behaviour is unchanged.

Plumbs the prefix through every layer that emits or consumes
root-absolute URLs:

* Vite `base` and React Router `basename` so hashed assets are emitted
  under the prefix at build time, and client-side <Link>/navigate calls
  resolve correctly.
* Hono `.basePath()` in `server/router.ts` and a `serveStatic`
  rewriteRequestPath in `server/main.js` so server-side routing matches
  while static files still resolve from `build/client/`.
* New `getBasePath()` helper in `packages/lib/constants/app.ts` for
  runtime consumers (prefers explicit env, falls back to the pathname of
  NEXT_PUBLIC_WEBAPP_URL).
* tRPC endpoints (internal + open-api) prefix the path. The internal
  adapter needs the prefix in `endpoint` because @hono/trpc-server slices
  it off the full URL to compute the procedure name; Hono's `basePath`
  alone doesn't rewrite the URL the adapter sees.
* Browser `getBaseUrl()` returns the prefix instead of '' so SSR/CSR
  agree on relative asset/API roots.
* Auth client `signOutredirectPath` is derived from `baseUrl` so apps
  under a sub-path sign out to `<prefix>/signin`. Post-auth helpers in
  `packages/auth/server/lib/utils/redirect.ts` use a default that lives
  under the prefix.
* `root.tsx` reads `basePath` from loader data and prefixes the
  favicon/apple-touch-icon/manifest links and ThemeProvider's
  `themeAction`.
* All remaining client-side `fetch('/api/...')` call sites now prepend
  `getBasePath()`: PDF upload (`put-file.ts`), locale change
  (`language-switcher-dialog.tsx`, `app-command-menu.tsx`), AI field /
  recipient detection, and embed presign-token.
* `LOGIN_REDIRECT_PATH` in the sign-in form derives from `getBasePath()`
  so the post-login navigation lands inside the sub-path.
* `site.webmanifest` icon URLs changed from absolute (`/foo.png`) to
  relative (`./foo.png`) so they resolve under any base path per the
  webmanifest spec (icons are parsed relative to the manifest URL).

`NEXT_PUBLIC_BASE_PATH` is added as a Docker build arg/env so the value
is baked into the client bundle at build time and also exposed at
runtime via `window.__ENV__` for SSR-rendered code that runs after
hydration.

Tested in production deployment with `NEXT_PUBLIC_BASE_PATH=/ESign`
behind HAProxy that forwards `/ESign/*` to the Documenso container
without prefix stripping. Verified: SSR + asset loading, sign-in/-up
flow, theme + language switching, PDF upload, document signing, tRPC
calls, OpenAPI v2 calls, and PWA install.

When `NEXT_PUBLIC_BASE_PATH` is empty (the default), every code path
above is a no-op: `getBasePath()` returns `''`, Vite `base` is `/`, RR
`basename` is `undefined`, Hono `basePath` is `/`, etc.
@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

@GMCfourX4 is attempting to deploy a commit to the Documenso Team Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 31273340-098c-4f62-a323-c8377d148351

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Mythie

Mythie commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Hey there, it looks like you haven't accepted our contributor license agreement yet. In order for us to accept your pull request we ask that you please fill out the CLA:

https://documen.so/cla

GMCfourX4 and others added 2 commits June 2, 2026 13:29
Follow-up to the NEXT_PUBLIC_BASE_PATH work in this PR. Testing a real
deployment under a sub-path surfaced several call sites that still bypass
the base path, plus a returnTo validation bug that only manifests when
NEXT_PUBLIC_WEBAPP_URL carries a path.

Root-relative request that never reaches the app under a sub-path:

- get-file.ts: /api/files/presigned-get-url is the download counterpart to
  put-file.ts (already fixed here), so S3-backed document retrieval 404s

The `new URL('/path', base)` pattern, where a leading-slash path replaces
the base pathname and silently discards the sub-path:

- limits/client.ts: /api/limits
- handle-oauth-callback-url.ts: the /signin error URLs (x3)

Hono's .basePath() only affects route matching, not Location headers, so
server-side redirects need the prefix applied explicitly:

- handle-oauth-callback-url.ts: redirectPath fallbacks now default to
  `${getBasePath()}/` rather than '/'
- handle-oauth-organisation-callback-url.ts: /o/:orgUrl

Client-side sign-out redirects in the signing flow:

- document-signing-auth-page.tsx, document-signing-auth-account.tsx:
  the /signin and /signup targets

is-valid-return-to.ts carried two defects:

- isValidReturnTo compared `url.origin` against the raw NEXT_PUBLIC_WEBAPP_URL.
  Whenever that value has a path — "https://host/ESign" — it can never equal an
  origin ("https://host"), so every returnTo was rejected and login always fell
  back to the default landing page. It now compares against the parsed origin.
- normalizeReturnTo returned the resolved pathname, which for a root-relative
  returnTo ("/inbox") excludes the sub-path. It now re-applies the base path
  when missing and leaves already-prefixed paths untouched.

Note that the isValidReturnTo comparison is arguably wrong independently of
this feature: any deployment whose NEXT_PUBLIC_WEBAPP_URL has a trailing path
hits it.
@GMCfourX4

Copy link
Copy Markdown
Contributor Author

Pushed a follow-up commit covering base-path gaps that surfaced while running this branch in a real deployment under /ESign (behind HAProxy, no prefix stripping).

Root-relative request

  • packages/lib/universal/upload/get-file.ts — /api/files/presigned-get-url. This is the download counterpart to put-file.ts, which this PR already fixed, so S3-backed document retrieval was still 404ing.

new URL('/path', base) discarding the sub-path

A leading-slash path replaces the base's pathname entirely, so new URL('/signin', 'https://host/ESign') yields https://host/signin:

  • packages/ee/server-only/limits/client.ts — /api/limits
  • packages/auth/server/lib/utils/handle-oauth-callback-url.ts — the three /signin error URLs

Server-side redirects

Hono's .basePath() affects route matching but not Location headers, so these needed the prefix applied explicitly:

  • handle-oauth-callback-url.ts — redirectPath fallbacks now default to `${getBasePath()}/` instead of '/'
  • handle-oauth-organisation-callback-url.ts — /o/:orgUrl

Client-side sign-out in the signing flow

  • document-signing-auth-page.tsx, document-signing-auth-account.tsx — the /signin and /signup targets

is-valid-return-to.ts — worth a closer look

Two defects here, and the first is arguably a bug independent of this feature:

if (returnToUrl.origin !== NEXT_PUBLIC_WEBAPP_URL()) {

This compares a URL origin against the raw env value. Any deployment whose NEXT_PUBLIC_WEBAPP_URL carries a path — including a trailing slash — can never satisfy it, so isValidReturnTo returns false for every returnTo and users always land on the default page after login instead of their intended destination. Now compares against the parsed origin.

Second, normalizeReturnTo returned the resolved pathname, which for a root-relative returnTo (/inbox) excludes the sub-path. It now re-applies the base path when missing and leaves already-prefixed paths untouched.


Formatted with the repo's pinned @biomejs/[email protected] (check --write) over the changed files. Happy to split the is-valid-return-to.ts origin fix into its own PR if you'd rather land that independently of the sub-path work.

@Mythie
Mythie merged commit 1bd0948 into documenso:main Aug 12, 2026
8 of 12 checks passed
billsinc pushed a commit to Altitude-Control-Technology/documenso that referenced this pull request Aug 19, 2026
Resolves the one non-translation conflict the sync left as markers.

apps/remix/app/root.tsx — favicon <link> block. Upstream (documenso#2824) added
NEXT_PUBLIC_BASE_PATH support and prefixed each icon href with
`${basePath}`; our fork had added favicon.ico and android-chrome-512x512
in the ACT branding pass. Both intents are kept: all five links, each
basePath-prefixed, matching the already-auto-merged manifest link.

Verified:
- no conflict markers remain anywhere in the tree
- biome check clean on root.tsx (2 pre-existing warnings, unchanged)
- apps/remix typecheck: 0 errors in root.tsx

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Xusifob added a commit to instamedsolutions/documenso that referenced this pull request Nov 23, 2026
* fix(ui): direct signing templates window layout (documenso#2909)

* fix(i18n): mark Bio string for translation (documenso#2910)

* fix: add email reporting (documenso#2918)

* chore: extract translations (documenso#2919)

* fix: add org insight document complete stat (documenso#2920)

* chore: add translations (documenso#2922)

* fix: update org stats table ui (documenso#2924)

* docs(embedding): document iframe URL fragment options (documenso#2915)

* feat: add header metadata to emails (documenso#2927)

* fix: add email disable flag (documenso#2931)

* fix: add multi email transport system (documenso#2942)

* chore(i18n): fix typo in Polish translation (documenso#2948)

* docs: add registration form screenshot to create account page (documenso#2908)

* fix: update link-only notification settings (documenso#2821)

* fix: update new quota and rates UX (documenso#2954)

* docs: clarify email verification instructions for free and paid plans (documenso#2959)

* fix: guard missing password reset token and fix broken reset link URL (documenso#2928)

* fix: point Railway deploy button at the working template URL (documenso#2962)

* fix: ensures new expire on setSessionCookie (documenso#2708)

* fix: exclude rejected documents from inbox count (documenso#2893)

* chore: update docs trusted emails (documenso#2964)

* chore: extract translations (documenso#2923)

* feat: allow changing field types (documenso#2873)

* fix: load typed signature font on profile page (documenso#2963)

* feat: enhance document signing page with field canvas style integration (documenso#2876)

* fix: correctly strip background job values (documenso#2965)

* chore: add translations (documenso#2929)

* fix: link signing brand logos (documenso#2881)

* fix: correctly orphan envelopes and stripe cancel on delete (documenso#2967)

* chore: update verify email docs (documenso#2970)

* fix(i18n): add space between tag and text (documenso#2972)

* fix: rework stripe webhooks into idempotent subscription sync (documenso#2977)

Replace per-event webhook handlers with a single sync function that
fetches the current state from Stripe and converges the local
subscription, claim, and organisation type.

- Create organisations upfront before checkout, restricted as
  "pending payment" until the first payment syncs
- Add rate-limited subscription sync route, triggered on checkout
  success so the UI doesn't wait on webhooks
- Surface pending payment state in banner, billing table, and limits

* fix: use correct property for embed edit editor config (documenso#2985)

* chore: add translations (documenso#2975)

* fix: reconcile billing when stripe subscription is missing (documenso#2988)

Catch resource_missing in the subscription route, return null so the
billing page still loads, and fire a sync to converge the stale row.

* fix: add early quota warning (documenso#2986)

## Description

- Add banners when plans near fair use limits
- Automated email alerts to our support when nearing fair use limits

* v2.12.0

* feat: add CSC AES/QES signing (v1 instance-wide config) (documenso#2874)

Adds Cloud Signature Consortium (CSC) integration for AES/QES signing
against a configured TSP. v1 ships as instance-wide configuration via
environment variables, with per-envelope signature level selection,
license gating, and an OAuth-driven signing flow (capture + FIFO
signers, SAD session, blocking/in-progress recipient pages).

Includes signature level compatibility checks (role, signing order,
dictate next signer), envelope mutability assertions, Prisma migration
for signature level and CSC tables, and docs for the new signing
certificate options.

* feat: add cancellable document status (documenso#2992)

Adds a CANCELLED envelope status that privileged members (owner or team
admin/manager) can move a pending document into. Sending recipient
notifications via a background job while retaining the document in the
dashboard as proof of distribution.

Includes a dedicated Cancelled tab, single and bulk cancel actions,
the ENVELOPE_CANCELLED mutability guard, and e2e coverage for
permissions
and visibility.

* fix: include envelopeId in webhook payload (documenso#2998)

* v2.13.0

* fix: improve team member removal ux (documenso#3001)

* fix: only send S3 checksums when required to support S3-compatible storage (documenso#2984)

* fix: render unicode characters in typed signatures (documenso#2728)

* fix: signing request email renders blank when organisation/team branding is enabled (documenso#2968)

* fix: remove old dialogs (documenso#3006)

* feat: add custom brand colours to emails (documenso#3005)

* feat: allow additional envelope duplicate settings (documenso#3008)

* fix: respect branding enabled for recipient routes (documenso#3009)

* chore: extract translations (documenso#2987)

* fix: correctly use default distribute envelope tab (documenso#3010)

* fix: set send status on resend (documenso#3011)

* feat: add API endpoint to reject documents on behalf of recipients (documenso#3007)

Programmatically record an external rejection on behalf of a recipient
who declined outside the platform. Flags the rejection as external in
the audit log, optionally attributes it to a specific team member via
actAsEmail, and enforces team membership and document visibility.

* feat: cap automated reminders before resend (documenso#3016)

Stop sending automated reminders after a configurable threshold
(default 5) and reset the count on manual resend.

* fix: show warning on overlapping fields (documenso#3017)

* chore: add translations (documenso#3012)

* chore(i18n): update Polish translation (documenso#3020)

* fix: migrate emails to jobs (documenso#3024)

* chore: general repo maintenance and docs cleanup (documenso#3030)

Refresh README/docs for the current stack, add a security policy,
note the external-PR pause, and remove dead config and workflows.

* feat: add API endpoints for downloading certificate and audit log PDFs (documenso#3025)

Add V2 API routes to download an envelope's certificate and audit log
separately, and align the internal cert/audit log downloads to use
envelopeId.

Enforces document visibility via getEnvelopeWhereInput and loads field
signatures so certificates render correctly.

* fix: resolve permission issues (documenso#3029)

* chore: add tests for cert and audit log download via api (documenso#3043)

* v2.14.0

* fix: auto select field on drop (documenso#3028)

* feat: add field multiselect (documenso#3031)

* fix: invite email placeholder (documenso#3045)

- **fix: interpolate inviterEmail in invite email mailto link**
- **fix: add alt attributes to email template images**

* fix: tighten permission and validation checks (documenso#3046)

* fix: scope organisation group deletion (documenso#3047)

* fix: add missing teams branding guard (documenso#3049)

* fix(email): render Preview inside Body across all email templates (documenso#3004)

* fix: add additional team group permission checks (documenso#3052)

* fix: french translation for confirmation message (documenso#3050)

* feat: add granular signin disable flags and OIDC auto-redirect (documenso#2857)

* fix: webhook payload contains stale deletedAt on document cancellation (documenso#2980)

* fix: add sticky form update button (documenso#3056)

* chore: extract translations (documenso#3013)

* chore: upgrade libpdf (documenso#3058)

* fix: remove presigned branding upload (documenso#3053)

* fix: block invisible & control characters and URLs in names (documenso#2978)

* fix: admin organisation limits and usage UI (documenso#3014)

* chore: upgrade deps (documenso#3065)

* Add "Apply Your License Key" self-hosting guide (documenso#3077)

Adds a dedicated self-hosting page documenting how to apply an
Enterprise license key, and cross-links it from the related docs.

New page: self-hosting/configuration/license.mdx — "Apply Your License
Key"
Set NEXT_PRIVATE_DOCUMENSO_LICENSE_KEY (Docker Compose / docker run /
.env tabs)

* feat: enable real-time validation for email and password fields (documenso#2204)

## Description

This MR improves the real-time validation experience on the signup page.
Currently, both the email and password fields validate only on blur,
causing users to continue seeing error messages even after correcting
their input until they click outside the field.

This update switches the React Hook Form configuration from mode:
'onBlur' to mode: 'onChange', ensuring validations update immediately as
the user types.
This results in a smoother and less confusing signup experience.

## Related Issue

Fixes documenso#2200

## Changes Made

- Updated React Hook Form configuration in the signup form from:
- mode: 'onBlur' ➜ mode: 'onChange'
- Ensures real-time validation for email and password fields
- No schema or logic changes — only validation trigger updated


## Testing Performed

- Manually tested the signup page for:
- Real-time password rule updates
- Real-time email validation feedback
- Error disappearance immediately after correcting input

## Checklist

- [x] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [x] I have updated the documentation to reflect these changes, if
applicable.
- [x] I have followed the project's coding style guidelines.
- [x] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

This is a small UX-focused improvement; the validation schema remains
unchanged.

Co-authored-by: Catalin Pit <[email protected]>

* docs: update rate limit doc for organisation limit for self hosters (documenso#3089)

* v2.15.0

* chore: extract translations (documenso#3060)

* fix: replace tailwind class typos

* fix: improve editor autosave (documenso#3057)

* fix(ui): improve destructive button contrast in dark mode (documenso#3071)

* fix: missing noreply email for resend (documenso#3094)

* chore: deps upgrade 2026-07-14 (documenso#3095)

* feat: redesign api tokens settings page (documenso#3076)

* fix: react hydration errors (documenso#3099)

Move PostHog init out of the React tree so the client tree matches
the server render (mismatched useIds could abort hydration, leaving
dead event handlers). Also expose the CSP nonce so Radix scroll-lock
styles aren't blocked.

* fix: render error messages for invalid templates (documenso#3088)

Currently direct templates can be created without the required
signatures fields for signers.

This means that the document can be fully signed by everyone but will
ultimately fail the sealing step which leaves the document in an
unrecoverable state.

* feat: add document preferences reset dialog (documenso#3039)

* feat: add branding preferences reset dialog (documenso#3032)

* v2.16.0

* fix: increase global API rate limits to 1000/min (documenso#3081)

* chore: deprecate endpoints (documenso#3022)

* fix: update stripe team member billing (documenso#2991)

* feat: rework command search (documenso#3109)

* fix: sort CC recipients last (documenso#2930)

* feat: add copy button for license key in admin panel (documenso#3123)

## Description

Adds a copy button next to the show/hide toggle for the license key in
the admin panel license card (Admin Panel → Stats).

- Ghost button matching the existing eye-toggle styling (`h-6 w-6`,
`CopyIcon`)
- Uses the standard `useCopyToClipboard` + toast pattern (same as
`template-direct-link-badge.tsx`)
- Copies the key regardless of masked/visible state

New translation strings will be picked up by the next `chore: extract
translations` run.

## Before / After

![Before and after: copy button added next to the license key show/hide
toggle](https://artifacts.duncan.land/documenso-pr3123-license-copy)

> Screenshots taken against a locally mocked ACTIVE license (the mock is
not part of this PR).

## Testing

- `npx tsc --noEmit -p apps/remix` clean
- `biome check` clean
- Smoke-tested in browser: clicking the button fires the "Copied to
clipboard" toast (visible in the screenshot above)

* feat: rejected and expired recipient filters (documenso#2889)

* docs(webhooks): correct retry policy, timeout and payload reference (documenso#3132)

## Description

Corrects the webhooks documentation, which described delivery behavior
that does not exist in the implementation.

## Changes Made

- Replaced the fabricated retry schedule (5 attempts / immediate-to-2h
backoff) with the real provider-dependent behavior: retries belong to
the job provider (`NEXT_PRIVATE_JOBS_PROVIDER`) — local (default) 4
total attempts back-to-back, BullMQ 3 attempts with exponential backoff
from 1s, Inngest 5 attempts with platform backoff.
- Fixed the webhook timeout from 30 seconds to 10 seconds
(`WEBHOOK_TIMEOUT_MS = 10_000`, hard abort).
- Clarified failure semantics: non-2xx fails, 3xx redirects are not
followed (`redirect: 'manual'`), network/SSRF-blocked calls record
response code 0; failed deliveries mark only the `WebhookCall` record —
the webhook itself is never auto-disabled.
- Corrected URL requirements: `http://` is accepted; documented the SSRF
guard (private/loopback blocked,
`NEXT_PRIVATE_WEBHOOK_SSRF_BYPASS_HOSTS` bypass for self-hosters).
- Added `envelopeId` to both field tables and all payload/recipient JSON
examples; framed numeric `id` as the legacy v1 identifier.
- Removed a documented `documentMeta` field that exists in neither the
Zod schema nor Prisma; fixed timezone/dateFormat examples to the
hardcoded `Etc/UTC` / `yyyy-MM-dd hh:mm a` values.
- Added missing `REJECTED`/`CANCELLED` statuses and
`TEMPLATE_DIRECT_LINK` source; fixed `templateId` to `null` on
TEMPLATE_* examples; documented the previously missing
`RECIPIENT_EXPIRED` event across setup, events, and verification pages.

## Testing Performed

Docs-only change. Every claim verified against the implementation
(`execute-webhook-call.ts`, job clients, `webhook-payload.ts`,
`assert-webhook-url.ts`, webhook-router schema).

* feat: bulk download documents (documenso#2711)

* feat: replace document status tabs with filter pills (documenso#3145)

Swaps the tab row and dropdowns for faceted filter pills (status,
sender, period) with a shared reset, and moves URL param handling
to nuqs.

<img width="2198" height="1674" alt="image"
src="https://github.com/user-attachments/assets/6996431c-09c8-45c3-bc30-f0a1e503c941"
/>

* fix: add logging for errors on sign or complete (documenso#3149)

* fix: add more logging for errors on sign or complete (documenso#3151)

* feat: unify settings (documenso#3128)

* fix: handle completion when already signed (documenso#3159)

Previously attempting to complete a document which is already completed
you'd get a generic error toast. Now when completing a document that you
have already completed you are redirected to the completed page.

Handles cases where two mutations managed to fire racing eachother.

* fix: improve unified settings (documenso#3160)

* fix: restore overriden translations (documenso#3161)

* chore: extract translations (documenso#3163)

* feat(remix): support serving app under a sub-path via NEXT_PUBLIC_BASE_PATH (documenso#2824)

* feat: show feature gated setting pages (documenso#3167)

* chore: update Polish translations (documenso#3210)

* fix: docker healtcheck (documenso#3176)

* fix: use documenso fork of skia-canvas for rendering (documenso#3214)

Use our fork of `skia-canvas` for rendering which handles
encoding characters correctly with the caveat font and other
similar fonts that can group glyphs like ligatures.

This resolves issues with pdf text extraction where characters
were unable to be extracted due to lacking any data within the cmaps.

* feat: migrate to react 19 (documenso#3107)

* chore: remove planning skills (documenso#3177)

* chore: deps 2026-08-17 (documenso#3225)

* chore: add github action timeouts (documenso#3228)

* fix: surface actionable errors when completing documents (documenso#3229)

* feat(ui): redesign recipient field hover card (documenso#3070)

Redesigns the popover shown when hovering a recipient field avatar in
the envelope view.

- Field-first hierarchy: header shows field-type icon + "{Type} field"
with inline status (Signed/Pending/Read Only) as a colored dot + label
- Recipient (name/email) moved to a recessed footer well as secondary
context
- Hide-field action moved from floating over the text to a ghost icon
button in the footer well
- Added a `FieldType` → icon map mirroring `field-selector.tsx`

## Screenshots

| Before | After |
| --- | --- |
| <img
src="https://raw.githubusercontent.com/ephraimduncan/documenso/assets-pr-3070-hover-card/.github/assets/hover-before.png"
width="320" alt="Previous hover tooltip: centered badge, title and
recipient text" /> | <img
src="https://raw.githubusercontent.com/ephraimduncan/documenso/assets-pr-3070-hover-card/.github/assets/hover-after.png"
width="320" alt="New hover card: field-first header with status,
recipient footer well" /> |

* docs(api): document rate limit headers and 429 variants (documenso#3133)

## Description

The rate limits page claimed "No rate limit headers are currently
provided" and advised a fixed 60-second wait. The middleware has been
setting standard headers on every API response.

## Changes Made

- Documented `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and
`X-RateLimit-Reset` (Unix epoch seconds) on every `/api/v1`, `/api/v2`,
and `/api/v2-beta` response, and `Retry-After` (seconds, min 1) on 429s.
- Explained that windows are fixed epoch-aligned 1-minute buckets, so
the real wait is 1–60s — clients should honor `Retry-After` instead of
sleeping a fixed 60s.
- Showed both 429 body shapes: the global per-IP limiter's `{ "error":
... }` vs AppError-based `code`/`message`/`statusCode`.
- Covered the three distinct 429 sources: global per-IP limit,
organisation windowed limits, and monthly envelope quota (which sends no
rate-limit headers).
- Added `/api/v2-beta/*` to the documented scope; left the
verified-correct 1000/min figure and plan-limits table untouched.

## Testing Performed

Docs-only change. Verified against `rate-limit-middleware.ts`,
`rate-limit.ts`, `check-organisation-rate-limits.ts`,
`check-monthly-quota.ts`, and the remix server router.

* docs(trpc): add openapi descriptions to envelope cancel, delete and update routes (documenso#3134)

## Description

The envelope cancel, delete, and update routes rendered without
descriptions in the generated OpenAPI reference.

## Changes Made

- Added route-level OpenAPI `description` to `cancel-envelope.types.ts`,
`delete-envelope.types.ts`, and `update-envelope.types.ts`.
- Added field-level `.describe()` calls on request schemas, matching the
style of sibling envelope-router schemas (e.g.
`get-envelopes-by-ids.types.ts`, `distribute-envelope.types.ts`).

## Testing Performed

`npx tsc --noEmit -p packages/trpc` passes with no errors. Metadata-only
change — no runtime behavior affected.

* docs(api): document cancel endpoint and fix get-many body shape (documenso#3135)

## Description

Documents API page: adds the missing Cancel Document section and fixes a
fabricated request body on get-many that would fail schema validation
for anyone copying the docs.

## Changes Made

- Added a `## Cancel Document` section: `POST /envelope/cancel` with `{
envelopeId, reason? }`, PENDING-only (400 otherwise), not idempotent,
two-stage access (404 if not visible, 401 without owner/MANAGER+), fires
`DOCUMENT_CANCELLED` webhook, emails only SENT/OPENED non-CC
non-rejected recipients.
- Replaced the fabricated `envelopeIds: [...]` get-many body with the
real nested selector: `{ "ids": { "type": "envelopeId" | "documentId" |
"templateId", "ids": [...] } }` (string[] for envelopeId, number[]
otherwise, 1–20 IDs).
- Added the missing `### Response` for get-many (`{ "data": [...] }`)
and documented silent filtering of inaccessible IDs (no 404).
- Added `CANCELLED` to the status table, mermaid state diagram,
transitions prose, and filter values.
- Removed the nonexistent `source: "API"` value (real enum: `DOCUMENT |
TEMPLATE | TEMPLATE_DIRECT_LINK`).
- Fixed fabricated `pagination` wrappers to the real flat shape `{ data,
count, currentPage, perPage, totalPages }`; fixed Field `id` type and
mismatched code fences.
- Migration guide: warned that get-many's body shape changed from
`documentIds: number[]` — the breaking part of that migration.

## Testing Performed

Docs-only change (plus the migration guide). Verified against the
envelope-router types, `cancel-document.ts`, the cancel e2e spec, and
`schema.prisma`.

* v2.17.0

* fix: add type button to multiselect remove and clear buttons (documenso#3256)

* fix(i18n): add Plural support for bulk download limit alert (documenso#3209) (documenso#3260)

* fix(i18n): add plural forms for command menu results and item counts (documenso#3207) (documenso#3262)

* fix(emails): remove trailing period from document pending email subject (documenso#3213)

* feat: allow admin recipient search (documenso#3277)

* feat: last used column for api tokens (documenso#3230)

* refactor(trpc): use ts-pattern for envelope document-data resolution (documenso#3222)

* chore: extract translations (documenso#3171)

* fix: allow zooming and dragging uploaded signatures (documenso#3173)

* fix: render adjacent email template variables correctly (documenso#3153)

* feat: optimise posthog usage and add error tracking (documenso#3301)

Disable autocapture and person profiles for anonymous users, and
redact signing tokens from captured URLs.

Manually wire exception capture into the signing, editor and embed
flows with recipient/envelope context for debugging recipient-reported
issues.

Track activation events (webhooks, api tokens, direct links, embed
sessions) server-side with org attribution, and drop client events
already tracked in-app.

* chore: add provider request template (documenso#3311)

* chore: update Polish translation (documenso#3316)

* fix: prevent dialogs from closing on blur (documenso#3314)

* fix: enlarge envelope field resize handle hit area (documenso#3315)

* docs: clarify team API token and certificate behavior (documenso#3317)

* chore: upgrade libpdf (documenso#3323)

* fix: add patches back to dockerfile (documenso#3324)

* fix: default unset signing transport to local (documenso#3309)

`/api/health` and `/api/certificate-status` reported the cert as
available when `NEXT_PRIVATE_SIGNING_TRANSPORT` was unset, even though
sealing defaults to the local P12 and fails if it is missing,
unreadable, or expired.

* fix: increase signature placeholder size when a timestamp authority is configured (documenso#3328)

* chore: upgrade to node 24 lts and clean up docker image (documenso#3332)

Upgrade to Node 24 LTS, using the alpine 3.23 tag to handle issues with
streaming zip files on 24.16 which hangs npm ci.

Pin npm to 11.19.1 for min-release-age-exclude support.

Slim the runner image by dropping dev deps, the react-email CLI, and
esbuild,
none of which run in production.

Install turbo from the lockfile version instead of a hardcoded one.

* fix: temporary fix for British to US spelling (documenso#3329)

* fix: block SSRF via IPv4-mapped IPv6 webhook URLs (documenso#2901) (documenso#3166)

* fix: improve invalid bulk template upload error handling (documenso#3326)

* fix: use react router middleware (documenso#3351)

* chore(ui): remove unused text fitting component (documenso#3337)

* fix: resolve build errors (documenso#3352)

* chore(auth): remove commented account creation code (documenso#3344)

* v2.18.0

* fix: pass csp nonce to @hello-pangea/dnd style elements (documenso#3354)

* fix(i18n): add missing plural in bulk template upload error handling (documenso#3357)

* docs: add externalId to send-for-signature workflow example (documenso#3325)

* fix: improve action auth flow for passwordless users (documenso#3358)

Selecting password auth failed with a generic "Unauthorized" for users
who signed up via OAuth or passkey, with no way to set one.

Detect the missing password and email the existing reset link from the
signing dialog and security settings. Require a 2FA code and rate limit
update-password.

* fix: use nuqs prevent infinite re-render loop (documenso#2868)

* fix: preserve base path in email asset URLs (documenso#3327)

* chore: upgrade deps (documenso#3367)

* feat: add document naming options when using templates (documenso#3086)

* refactor(server): simplify request context middleware (documenso#3341)

* chore(lib): remove unused timezone labels (documenso#3342)

* chore(prisma): remove unregistered middleware (documenso#3345)

* refactor(lib): reuse the http url validator (documenso#3346)

* fix(trpc): v2 field position updates silently dropped; rewrite fields API docs (documenso#3136)

* chore(ui): remove unused application skeletons (documenso#3340)

* chore(embedding): remove unregistered multi-sign mutation (documenso#3339)

* refactor(openpage): simplify the cors policy (documenso#3338)

* feat: allow signing reason override (documenso#2848)

* feat: replace template view tabs with a filter pill (documenso#3148)

* feat(ui): redesign recipient avatar stack hover popover (documenso#3072)

* feat: add inbox filters (documenso#3372)

* Respect hidden sender details in document invite emails (documenso#3061)

* fix: bulk download dialog overflow on long titles (documenso#3380)

* feat: add team document analytics dashboard (documenso#3355)

* fix: add date-fns to packages/ui (documenso#3388)

* fix: accept owner-password protected pdfs (documenso#3396)

Strip encryption from PDFs that open with an empty user password via
libpdf's ignorePermissions, still rejecting user-password PDFs.

Upgrade @libpdf/core to 0.5.1, which also keeps overlapping and layered
text intact during text extraction.

Resolves documenso#3303

* v2.19.0

* fix: embed signing completion and reload states (documenso#3409)

Send completed/rejected events when reopening an actioned v1 embed,
show the completed page after signing in v2, and tidy the completed
page.

* fix: use legacy pdfjs build for older devices (documenso#3410)

* feat: add recipient grouping (documenso#3319)

* fix(i18n): add missing "zu" in German invite/reminder strings (documenso#3331)

* fix: show validation errors in branding preferences form (documenso#3381)

* fix(ui): discard cancelled signature pad dialog drafts (documenso#3408)

\

* fix: prevent recipients who already signed from rejecting documents (documenso#3411)

* docs: add data-readonly and correct field color example (documenso#3413)

* fix(i18n): add support for plural in app-command-menu.tsx (documenso#3364)

* feat(admin): show team count in organisation stats (documenso#3405)

* fix: send notification on limits change (documenso#3414)

* fix: use the database url when the direct url is not set (documenso#3404)

* feat(web): add configurable legal, data protection, and imprint links (documenso#3114) (documenso#3131)

* fix: update legal links on recipient routes (documenso#3419)

* feat: allow admins to force remove non-completed recipients (documenso#3420)

<img width="1810" height="1408" alt="image"
src="https://github.com/user-attachments/assets/1375ebf6-9aa5-4f02-9b21-8913f71d6634"
/>

* fix(i18n): mark for translation admin stats table name (documenso#3421)

* feat: add sender disabled view to signing link (documenso#3423)

* fix: support cross-site authentication in embeds (documenso#3429)

Account, SSO and CSC authentication run in a popup and hand off
to the cross-site iframe via encrypted nonce-keyed rows.

Embed sessions are signing-only and rejected elsewhere unless
a route opts in.

Also adds origin-based CSRF for certain routes.

* chore: upgrade libpdf and critical deps (documenso#3430)

* v2.20.0

* fix: allow v1 multisign completion with empty optional fields (documenso#3417)

* fix: remove minio from development compose (documenso#3441)

* feat: disable accounts on report and show new account warning (documenso#3446)

* fix: use placeholder for stored sso client secret (documenso#3416)

* fix: reset field metadata when changing field type (documenso#3431)

Use the new field type's default metadata when no metadata is supplied,
while preserving existing metadata when the field type stays the same.

* fix(i18n): translate pending signing email subject (documenso#3438)

* chore: extract translations (documenso#3306)

* fix: keep previous table data during pagination (documenso#3073)

* chore: upgrade libpdf (documenso#3448)

* v2.21.0

* feat: persist signatures for authless embed signers (documenso#3465)

Embedders can pass `clientUserId` on `/embed/sign` to have the signer's
signature stored (hashed key, platform-gated, rate limited, capped per
recipient) and prefilled on their next embed.

* chore: update signing reminder docs (documenso#3469)

* chore: update AGENTS.md (documenso#3471)

* fix: don't remove passkeys on user disable (documenso#3470)

* v2.21.1

* chore: upgrade playwright and npm audit (documenso#3506)

* fix: prevent implicit form submission in editor field settings (documenso#3526)

* chore: docs/update enterprise edition (documenso#3472)

updated enterprise features section and added a comparison table.

both section has a hyperlink for easy sharing with leads

screenshot :
<img width="411" height="924" alt="image"
src="https://github.com/user-attachments/assets/aefbb84d-a688-41d3-966b-73bc2a86a2ed"
/>

---------

Co-authored-by: Timur Ercan <[email protected]>

* chore: update document visibility tooltip (documenso#3529)

updated tooltip and added description to the document visibility
section.
included a hyperlink in tooltip to
https://docs.documenso.com/docs/users/documents/advanced/document-visibility

default state:
<img width="515" height="337" alt="image"
src="https://github.com/user-attachments/assets/eb4218a9-86e5-42ed-a09e-d82d35804d0b"
/>

---------

Co-authored-by: Timur Ercan <[email protected]>

* fix: clarify sender details setting (documenso#3499)

* fix: disable signing when undo clears the signature pad (documenso#3518)

* fix: improve text field signing ux (documenso#3504)

* fix: ignore presses that start outside the signature pad (documenso#3522)

* feat: add handwriting font option for initials fields (documenso#3474)

* chore: skip the triage label for roadmap app issues (documenso#3573)

## Description

The Label Issues workflow adds `status: triage` to each new issue. This
includes the issues that the roadmap App (`documenso-roadmap-sync`)
opens for the public roadmap. Triage is only for issues that persons
open, thus the team removed the label by hand from each roadmap issue.

With this change, the workflow skips issues that the App opens or
reopens. Issues that persons open still get `status: triage`.

* chore: remove redundant waitForTimeout calls (documenso#3536)

* fix: open the 2fa code step when email is the only method (documenso#3528)

* fix: format prefilled dates with the document date format (documenso#3527)

* fix: use branding primary color for field loading spinner (documenso#3412)

* feat: add content fields (documenso#3395)

* fix: send test events only to the selected webhook (documenso#3542)

* chore: parallelise tests (documenso#3574)

* fix: correctly allow enterprise to bypass limits (documenso#3590)

* feat: add sort option for folders (documenso#3473)

* fix(i18n): add missing plural to analytics (documenso#3424)

* fix: open sign field dialogs on pointerclick so inputs autofocus (documenso#3583)

* fix: allow hiding the download button in embed signing (documenso#3589)

* fix: normalise user and recipient emails to lowercase (documenso#3591)

* fix: respect document timezone in read-only date fields (documenso#3582)

* fix: keep template field labels when prefill omits them (documenso#3585)

* chore: upgrade deps (documenso#3602)

* v2.22.0

* ci: supprime les workflows upstream inutilisables et lance la CI sur les PR vers staging

Retire les workflows hérités de documenso/documenso qui dépendent de
secrets ou runners absents du fork (Crowdin, DockerHub, GH_PAT, runner
warp) ou servent à la gestion communautaire des issues/PR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(i18n): ajoute les textes de la pièce jointe et leur traduction française

Ajout ciblé dans les catalogues (pas d'extraction complète pour ne pas
diverger des .po upstream). Remplace la PR automatique #5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Konrad <[email protected]>
Co-authored-by: David Nguyen <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lucas Smith <[email protected]>
Co-authored-by: Catalin Pit <[email protected]>
Co-authored-by: Arun Kumar <[email protected]>
Co-authored-by: Ephraim Duncan <[email protected]>
Co-authored-by: roshboi <[email protected]>
Co-authored-by: Clayton Chew <[email protected]>
Co-authored-by: Rana Pratap Sarangi <[email protected]>
Co-authored-by: Romone6 <[email protected]>
Co-authored-by: Yash Singh <[email protected]>
Co-authored-by: Abdelrahman Abdelhamed <[email protected]>
Co-authored-by: Nandini Dhanrale <[email protected]>
Co-authored-by: Martin Glaser <[email protected]>
Co-authored-by: Grégory Chevalier <[email protected]>
Co-authored-by: Kendry Grullon <[email protected]>
Co-authored-by: Tanushree Ahir <[email protected]>
Co-authored-by: Christopher Ryan <[email protected]>
Co-authored-by: misinierijon4-debug <[email protected]>
Co-authored-by: Rodrigo Flávio <[email protected]>
Co-authored-by: water <[email protected]>
Co-authored-by: Arunendra Tripathi <[email protected]>
Co-authored-by: Nathan Delhaye <[email protected]>
Co-authored-by: Durgesh Shekhawat <[email protected]>
Co-authored-by: Zonaib Bokhari <[email protected]>
Co-authored-by: Raiyan Zaman <[email protected]>
Co-authored-by: Ayush Dubey <[email protected]>
Co-authored-by: Aykut Güney <[email protected]>
Co-authored-by: Timur Ercan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants