Stop forking the signing surface, and offer the whole signed record

Refactorkamo-internal
Shipped
September 9, 2026 at 10:54 PM UTC
Author
Kamo
Commit
d5c9669

kamo-internal carried a hand-copied fork of the external signer app — fifteen files under app/lib/esign, app/stores/esign and app/components/esign/signing, each headed "PORTED VERBATIM … do not diverge it here", with nothing enforcing it. They diverged in both directions. This copy had grown format validation, draft storage guarded on `localStorage` rather than on `window`, and a token-rejection reasons. Neither app knew what the other had, so a signer met a materially different signing experience depending on which door they came through — which is the report this change answers. All fifteen are deleted. `@kamo/esign-core`, `@kamo/esign-ui` and `@kamo/doc-render` are published from kamo-signer-monorepo and rendered by both apps, merged from the better half of each side. **************** is the ratchet: re-creating any of those paths compiles, passes, and silently re-forks the surface, so the test names each one and the package that owns it. It also pins the dependency to a caret RANGE — a pinned version is a second way for the two surfaces to drift, only harder to see. `app/types/esign.ts` was the third declaration of the design shape and now re-exports the first. It keeps what is genuinely this repo's: the template endpoints no signer ever calls, and a NARROWER `ESignSignerType`. The package's carries `EXTERNAL`, which is a recipient on a sent envelope and never a slot a template author can place — offering it in the designer's dropdown would be offering a choice that cannot be saved. `SignerCard`'s `Record<ESignSignerType, string>` is what catches that being quietly widened. Downloads offer all three copies now — the executed document, the Certificate of Completion, or both zipped — from the same `DownloadCopyMenu` the signer sees, through two new proxy routes. `/api/esig/*` is not a proxied prefix here; every path is a hand-written route, and a missing one 404s as HTML that reads exactly like a rights bug. The § 7001(c) consent disclosure now appears on this surface too, from `@kamo/esign-core` rather than from this app's dictionary: a member signing an employment agreement from inside the platform is being asked to agree to exactly what an external signer is asked to agree to on the same document. The locale it was rendered in rides out with the consent POST, so the certificate can state which of the twenty-two translations was actually read. One place still offers a single artifact: the HR legal PACKAGE bundle (`downloadMyExecutedPackage`). That is a DocsService-assembled bundle spanning several envelopes, and a certificate belongs to one envelope — giving it the same three-way menu means teaching DocsService to collect a certificate per envelope, which is a change in a fourth service. Verified: tsc clean, `check-i18n-keys` clean, the full suite green (598 files, 7,437 tests), and the lockfile edit proved with a real `npm ci` into an empty directory rather than by inspection.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing