Repository navigation
Conversation
ayeshah
left a comment
There was a problem hiding this comment.
Review of PR #2067 (commit 88608f0). The main fix is correct: a container only opens for "Open in Editor" actions, which matches the backend. Several other changes have effects the PR does not describe. Severity: P1 = ships a real bug on a reachable path, P2 = should consider.
P1: stale Sign actions may send real invitations. Removing the isDraftView container check means saved Sign actions with a stale container Mode now forward their signers. Backend defaults a missing outcome to sign, so invites can go out on the first click. Not in the PR description, no test. (integrationClient.ts ~790-810)
P1: stale Download may open a sign review. With signers still attached, hasExclusions && !openInEditor is true, so the payload becomes an Open in Editor request with a forced sign toolbar. Reasoned from code, not yet reproduced.
P1: "can no longer happen" is wrong. The removed merge_groups/repeat_start error on master had no Open in Editor guard, so it did block open-in-editor actions. Those requests now reach the backend (overlay for DocuSign, ValidationError otherwise). Not listed in the description, no test.
P1: file uploads skipped for containers based on an inaccurate comment. The early return in submitDocumentSourceFiles (Form/index.tsx ~645) says "a container rejects upload sources." Nothing enforces that. The backend overlays instead and reads whatever upload is saved on the server.
P2: legacy view_draft_container still drops signers. Nothing routes to a container on that key any more, so the flag only blanks signers. Delete it or explain why it stays.
P2: designer still treats stale container refs as live. Runtime now returns no target, so those containers show "No document yet" permanently. Needs the same predicate in the designer repo, or clearing editor_mode on write.
P2: tests. The Download test only checks status != error and that fetch was called. The plain-ids check was removed with no replacement. Form tests stub editorContainerId to '', so the real gate never runs there. Two editorContainerId tests pass for the wrong reason (no envelope_action).
P2: comments. The 5-line JSDoc breaks the 1-2 line rule, and the "single source of truth" wording is no longer accurate.
Suites that fail (document.spec.ts fflate import, one hub-association test) also fail on master, so they are not from this PR.
| const isDraftView = | ||
| !openInEditor && | ||
| (!!editorContainerId(action) || !!action.view_draft_container); | ||
| const isDraftView = !openInEditor && !!action.view_draft_container; |
There was a problem hiding this comment.
P1: Removing the container term here means stale Sign/unset actions with a container Mode now forward envelope_signers. On master those were blanked. Please confirm that invites on saved forms are intended, or keep the suppression for non-open-in-editor actions.
There was a problem hiding this comment.
This is intended, and I kept it. The backend's resolve_editor_mode already ignores editor_mode for anything but open_in_editor, and the designer only shows a container Mode for Open in Editor. A Sign action with signers is meant to send. On master, the leftover container Mode blanked the signers, so the Sign generated documents and sent nothing, which is the bug this PR fixes. 28b1c78 adds a test that a Sign keeping a container Mode is sent as a Sign to its configured signers, without editor_mode. The PR description now calls out this change for saved forms.
A container falls back to the PDF overlay for upload sources, and the overlay reads the upload saved on the server, so skipping the submit left it stale or missing.
|
Thanks for the review. Here's where each point landed (commits e1a711f, 28b1c78, eb8b51d):
|
Ticket: https://app.notion.com/p/41d753ac481581b6a372f8f4895907f1
Changes
editorContainerIdignores a containereditor_modeon a Download, Sign or Save action, so those actions run their own outcome again instead of handing the envelope to the container. Before, the button did nothing on click. Forms that already saved such an action are fixed without being edited or republished.integrationClient.generateEnvelopesthat blocked container actions. The first only applied to non-editor actions, which no longer target a container. The second also blocked Open in Editor with merge groups orrepeat_start. Those requests now reach the backend, which falls back to the PDF overlay, or rejectsrepeat_startwithout DocuSign. The client-utils path now receives only plain ids, because any object entry takes the direct call.envelope_action: 'open_in_editor', the shape the designer saves.Why: the designer only offers a container Mode for Open in Editor and clears it when the action changes. Robin, the API, and the designer's older cleanup could still leave a container
editor_modeon another action. The backend'sresolve_editor_modealready ignores the Mode for anything butopen_in_editor. The legacyview_draft_containerkey stopped routing to a container in August, so no saved form relies on a non-editor action opening a container. That key still blanks signers; removing it is left for a separate change.Testing: Jest for the Form, document editor,
documentandintegrationClientsuites (414 passed),yarn typecheck, and ESLint on the changed files. Unit tests covereditorContainerIdfor unset, Sign, Download and Save actions, and for overlay and empty Modes on Open in Editor. Integration client tests check that a Download with a stale container Mode is sent as a Download and a Sign is sent to its signers, both withouteditor_mode. A Form test checks that upload sources are submitted before a container action generates.Checklist before requesting a review
Related pull requests
This PR doesn't depend on either and can merge in any order.
🤖 Generated with Claude Code