Skip to content

feat(esign): sign a document yourself in the same step as creating it - #114

Merged
lorenzocorallo merged 1 commit into
mainfrom
feat/esign-sign-yourself
Oct 17, 2026
Merged

lorenzocorallo merged 1 commit into
mainfrom
feat/esign-sign-yourself

Conversation

@lorenzocorallo

@lorenzocorallo lorenzocorallo commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • When the creator signs first (or is the only signer), the composer's main button is Create and sign / Sign with CIE: one click creates the request and opens the eSign agent (the popup must open inside the click, so SignWithCie gains a prepare callback that creates the request).
  • If signing stops or can't start, the request still exists (never created twice) and the creator lands on its page to sign later.
  • To sign offers Sign a document (/dashboard/esign/new?self=true), starting with the creator as first signer; the picker lists the creator first, marked "(you)".
  • Tracker: this feature and the registered-signer picker fix.

No backend change: the backend already skips emailing the creator.

Depends on

Follows #113 (merged). Works with PoliNetworkOrg/backend#79: the creator appears in the signer list when they have esign:sign and may sign the selected drives' documents, and creating the request keeps their existing signing identity.

Verification

  • pnpm check, pnpm typecheck, pnpm test, pnpm build on the combined branch.
  • Not run end to end with a real CIE agent.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b5f52817-d518-4eb7-8dcd-2a66de38c02d
📥 Commits

Reviewing files that changed from the base of the PR and between 18c4c43 and 95e31ae.

📒 Files selected for processing: 5
  • docs/esign/TRACKER.md
  • src/features/esign/new-request-page.tsx
  • src/features/esign/requests-page.tsx
  • src/features/esign/sign-with-cie.tsx
  • src/routes/dashboard/esign/new.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The e-sign request flow can include the current user as a signer. When the viewer signs first, the page creates the request and starts CIE signing. The signing component supports preparing documents at startup and reports when signing stops.

Changes

Creator-first e-sign requests

Layer / File(s) Summary
Enable self-signing request mode
src/features/esign/requests-page.tsx, src/routes/dashboard/esign/new.tsx, src/features/esign/new-request-page.tsx, docs/esign/TRACKER.md
The inbox action links to the request page with self: true. The route validates this option, and the page can initialize the signer list with the current user. The tracker marks related Phase 4 items complete.
Prepare documents for CIE signing
src/features/esign/sign-with-cie.tsx
SignWithCie accepts fixed items or a prepare callback. It handles empty prepared results and reports startup failures or dialog closure through onStopped.
Create and sign the request
src/features/esign/new-request-page.tsx
When the viewer signs first, the page creates and caches the request before signing. The page navigates to the request after signing stops.

Sequence Diagram(s)

sequenceDiagram
  participant NewEsignRequestPage
  participant SignWithCie
  participant CIESigningDialog
  NewEsignRequestPage->>SignWithCie: Provide request through prepare callback
  SignWithCie->>NewEsignRequestPage: Invoke prepare callback
  NewEsignRequestPage-->>SignWithCie: Return created request
  SignWithCie->>CIESigningDialog: Start signature
  CIESigningDialog-->>SignWithCie: Close signing dialog
  SignWithCie-->>NewEsignRequestPage: Call onStopped
  NewEsignRequestPage->>NewEsignRequestPage: Navigate to request
Loading

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to 95e31

The creator-first signing flow is ready to merge after normal checks; no actionable issue remains established.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 4 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: allowing creators to sign a document during the creation step.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 4 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Base automatically changed from fix/esign-registered-picker to main October 17, 2026 16:06
When the creator signs first (or alone), the composer's button becomes "Create and sign" / "Sign with CIE": it
creates the request and opens the eSign agent in the same click, so the browser doesn't block the popup. If signing
stops or fails, the request stays and the creator lands on its page to sign later. To sign offers "Sign a document",
which starts with the creator as first signer, and the signer picker lists the creator first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lorenzocorallo
lorenzocorallo force-pushed the feat/esign-sign-yourself branch from bce6c14 to 95e31ae Compare October 17, 2026 16:06
@lorenzocorallo
lorenzocorallo marked this pull request as ready for review October 17, 2026 16:07
@lorenzocorallo
lorenzocorallo merged commit 8526ce7 into main Oct 17, 2026
3 checks passed
@lorenzocorallo
lorenzocorallo deleted the feat/esign-sign-yourself branch October 17, 2026 16:14
BIA3IA pushed a commit that referenced this pull request Oct 20, 2026
…#114)

When the creator signs first (or alone), the composer's button becomes "Create and sign" / "Sign with CIE": it
creates the request and opens the eSign agent in the same click, so the browser doesn't block the popup. If signing
stops or fails, the request stays and the creator lands on its page to sign later. To sign offers "Sign a document",
which starts with the creator as first signer, and the signer picker lists the creator first.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant