Commit Graph

3827 Commits

Author SHA1 Message Date
Lucas Smith b6da33282e fix: make prisma work 2026-03-06 14:29:41 +11:00
Lucas Smith 0d1496bc26 fix: set explicit prisma client output for pnpm compatibility
pnpm's strict node_modules layout causes prisma generate to output to
a deeply nested .pnpm directory, but @prisma/client resolves .prisma/client
from the root node_modules. Setting an explicit output path ensures the
generated client is always found at the expected location.
2026-03-06 14:28:59 +11:00
Lucas Smith b5e1874ced fix: remove remaining double-dash issues in CI and docs
The translate:compile CI scripts had a double `--` that
would pass a spurious `--` to lingui. CLAUDE.md still
referenced the old `with:env --` pattern.
2026-03-06 14:28:59 +11:00
Lucas Smith 0b8d107291 fix: remove double-dash in pnpm with:env script calls
pnpm does not consume `--` the way npm did when passing
args to scripts. The extra `--` was being forwarded to
dotenv-cli which tried to spawn it as a command, causing
ENOENT errors in CI.
2026-03-06 14:28:59 +11:00
Lucas Smith f66f01a09a build: standardise on react 19 and deduplicate deps
Eliminates dual React ecosystems and reduces dependency
duplication by consolidating on a single React version and
expanding the pnpm workspace catalog.

- Upgrade all packages from React 18 to React 19
- Remove @types/react and @types/node overrides (no longer
  needed with single React version)
- Standardise @types/node to ^22 across all packages
- Add prisma-kysely>@prisma/internals override to eliminate
  old prisma 6.16.x subtree
- Fix React 19 type changes: useRef requires initial value,
  JSX namespace needs explicit import, RefObject includes null
- Expand catalog with 14 new entries (ai, dotenv, pino,
  playwright, prisma tooling, nodemailer, pdfjs-dist, etc.)
- Catalog radix-ui, next, lucide-react, postcss, and
  typescript for docs/openpage-api alignment
- Run pnpm dedupe to collapse peer-dep context duplicates
2026-03-06 14:28:58 +11:00
Lucas Smith 960217c78d build: migrate from npm to pnpm with workspace catalogs
- Switch package manager to pnpm 10 via corepack
- Add pnpm-workspace.yaml with 54+ shared dependency catalogs
- Convert all workspace packages to catalog: and workspace:* protocols
- Upgrade Turborepo from 1.x to 2.8.12 (pipeline -> tasks)
- Upgrade apps/openpage-api from Next 15 to Next 16
- Update Docker, CI workflows, and GitHub Actions for pnpm
- Convert patch file to pnpm native format
- Replace deprecated next lint with standalone eslint
- Update all documentation references from npm to pnpm
- Fix stale dependabot config and documentation paths
2026-03-06 14:28:12 +11:00
github-actions[bot] 1ff8680c32 chore: extract translations (#2566) 2026-03-06 14:15:37 +11:00
David Nguyen 7ea664214a feat: add embedded envelopes (#2564)
## Description

Add envelopes V2 embedded support

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-03-06 14:11:27 +11:00
Ephraim Duncan 7e2cbe46c0 fix: show current month data and add caching (#2573)
### Summary

- Add Cache-Control headers to all route responses (1h s-maxage, 2h
stale-while-revalidate)
- Append current month to chart data so graphs stay up-to-date
(cumulative carries forward, else zero)
- Remove `.limit(12)` from growth queries for full history
- Pass isCumulative flag through addZeroMonth
- Deduplicate TransformedData type, remove transformRepoStats
2026-03-06 13:30:31 +11:00
Konrad c63b4ca3cc fix(i18n): mark dropdown and radio placeholder for translation (#2537) 2026-03-06 13:05:03 +11:00
David Nguyen 6faa01d384 feat: add pdf image renderer (#2554)
## Description

Replace the PDF renderer with an custom image renderer.

This allows us to remove the "react-pdf" dependency and allows us to use
a virtual list to improve performance.
2026-03-06 12:39:03 +11:00
Lucas Smith 0ce909a298 refactor: find envelopes (#2557) 2026-03-06 12:38:40 +11:00
Lucas Smith 7f271379b9 fix: upgrade @libpdf/core (#2572) 2026-03-06 10:08:58 +11:00
Lucas Smith 406e77e4be chore: add translations (#2570) 2026-03-05 17:33:36 +11:00
Lucas Smith bff360b084 fix: upgrade @libpdf/core (#2569) 2026-03-05 15:34:40 +11:00
Lucas Smith db1087d76d v2.7.1 v2.7.1 2026-03-05 15:16:45 +11:00
Lucas Smith ef0a5b54ba fix: verify before re-registering in email sync (#2568) 2026-03-05 15:12:20 +11:00
David Nguyen 1f985e2cd3 fix: invalid po translations (#2567) 2026-03-05 14:54:36 +11:00
Konrad 525dd92a56 fix(i18n): mark SUBSCRIPTION_STATUS_MAP for translation (#2515) 2026-03-05 14:42:40 +11:00
Konrad d21b99825d fix(i18n): add pluralization to expiration period picker (#2535) 2026-03-05 14:32:12 +11:00
Konrad dfbf68e4cd fix(i18n): mark editor field number form placeholder for translation (#2536) 2026-03-05 14:31:24 +11:00
github-actions[bot] 8b0231825f chore: extract translations (#2539) 2026-03-05 14:11:53 +11:00
Ephraim Duncan 03e2e4f171 docs: clarify placeholder support is envelope.* only (#2560) 2026-03-05 13:58:29 +11:00
Lucas Smith 7f5f2b22ed feat: add seal-document sweep job and admin unsealed documents page (#2563) 2026-03-05 13:56:40 +11:00
Lucas Smith 7d3a56a006 feat: add admin ability to move subscription between orgs (#2558)
## Summary

- Adds a new admin action to move a subscription (and Stripe customerId)
from one organisation to another owned by the same user
- The target organisation must be on the free plan (no active
subscription) — enforces paid → free only
- The source organisation's claim is reset to the free plan after the
move

## How it works

A "Move Subscription" option appears in the actions dropdown of the
organisations table (on the admin user detail page) for any org with an
active or past-due subscription. Clicking it opens a dialog where the
admin selects a target org from a filtered list of eligible (free-plan)
orgs owned by the same user.

The backend performs the swap atomically in a single Prisma transaction:
1. Deletes any stale inactive subscription on the target org
2. Moves the `customerId` from source to target org
3. Reassigns the `Subscription` record to the target org
4. Copies claim entitlements to the target org
5. Resets the source org's claim to FREE

No Stripe API calls are made — the Stripe subscription and customer
remain unchanged; only the DB-level org association is updated.

## Files changed

- **New:**
`packages/trpc/server/admin-router/swap-organisation-subscription.types.ts`
— Zod schemas
- **New:**
`packages/trpc/server/admin-router/swap-organisation-subscription.ts` —
Admin mutation
- **New:**
`apps/remix/app/components/dialogs/admin-swap-subscription-dialog.tsx` —
Dialog component
- **Modified:** `packages/trpc/server/admin-router/router.ts` — Register
route
- **Modified:**
`apps/remix/app/components/tables/admin-organisations-table.tsx` — Add
action menu item
2026-03-04 22:34:53 +11:00
Catalin Pit f1323679aa fix: use default field meta for embedding template fields (#2556) 2026-03-03 22:24:57 +11:00
Lucas Smith a05251d5ee v2.7.0 v2.7.0 2026-03-03 16:19:38 +11:00
Lucas Smith 454f73f2a9 chore: remove old docs (#2550) 2026-03-02 13:47:40 +11:00
Lucas Smith 24a5c85b6c fix(docs): rewrite mermaid component to avoid async client component error (#2549)
Replace use() with useEffect/useState pattern to prevent 'async Client
Component' errors in Next.js 16 / React 19. Also strip colons from
useId() output which broke mermaid's render().
2026-02-28 16:55:33 +11:00
Lucas Smith b92c53dbb2 feat: docs v2 (#2460)
Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2026-02-27 22:05:27 +11:00
Lucas Smith f8ac782f2e deps: 2026-02-26 upgrades (#2545) 2026-02-26 14:17:08 +11:00
Ephraim Duncan 194660d847 fix: return all documents from V1 API regardless of folder (#2471) 2026-02-26 13:55:14 +11:00
Lucas Smith 0d3bd59ec6 fix: handle cjk and special chars when slugifying (#2544) 2026-02-26 13:54:35 +11:00
Konrad 92d82c0423 fix(i18n): mark supported languages for translation (#2377) 2026-02-26 12:06:18 +11:00
Lucas Smith 484e1c20d0 chore: add translations (#2533) 2026-02-26 11:50:08 +11:00
Lucas Smith 6f5014a561 feat: support optional read replicas (#2540) 2026-02-25 19:07:02 +11:00
Lucas Smith c112392da9 feat: add admin email domain management and sync job (#2538) 2026-02-25 15:14:18 +11:00
github-actions[bot] bc72d9cb17 chore: extract translations (#2505) 2026-02-24 22:07:03 +11:00
Karlo 3ad3216c4c fix: update button width to fit content in public profile page (#2506)
Co-authored-by: Catalin Pit <catalinpit@gmail.com>
2026-02-23 12:46:58 +02:00
Lucas Smith 36eef79b1a fix: omit fieldId from embed create endpoints (#2523) 2026-02-21 21:14:51 +11:00
Lucas Smith 6fb88fede5 chore: upgrade libpdf (#2522) 2026-02-21 20:54:33 +11:00
Lucas Smith 653ab3678a feat: better ratelimiting (#2520)
Replace hono-rate-limiter with a Prisma/PostgreSQL bucketed counter
approach that works correctly across multiple instances without sticky
sessions.

- Add RateLimit model with composite PK (key, action, bucket) and atomic
upsert
- Create rate limit factory with window parsing, bucket computation, and
fail-open
- Define auth-tier and API-tier rate limit instances
- Add Hono middleware, rateLimitResponse helper, and tRPC
assertRateLimit helper
- Wire rate limit headers through AppError constructor (was declared but
never assigned)
- Apply rate limits to auth routes (email-password, passkey), tRPC
routes
  (2FA email, link org account), API routes, and file upload endpoints
- Add cleanup cron job for expired rate limit rows (batched delete every
15 min)
- Remove hono-rate-limiter dependency
2026-02-20 12:23:02 +11:00
Lucas Smith 006b1d0a57 feat: per-recipient envelope expiration (#2519) 2026-02-20 11:36:20 +11:00
Lucas Smith f3ec8ddc57 v2.6.1 v2.6.1 2026-02-18 21:57:10 +11:00
Lucas Smith 9a66d0ebf6 fix: simplify openapi field schemas to fix SDK generation (#2503) 2026-02-18 17:07:46 +11:00
Konrad 29622d3151 fix(i18n): mark strings inside div for translation (#2514) 2026-02-18 13:50:42 +11:00
Lucas Smith 5de2527e54 fix: v2 embed direct templates not reading email/lockEmail from hash params (#2509) 2026-02-18 13:35:04 +11:00
Lucas Smith 6fcf0a638c chore: add translations (#2507) 2026-02-17 11:31:37 +11:00
Louis Liu ff9e6acb7a fix(ui): clarify email settings labels (#2448) 2026-02-16 17:00:24 +11:00
Lucas Smith a60c6a90ab chore: add translations (#2504) 2026-02-16 16:10:43 +11:00