fix: sync esign with recent version updates#1943
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c469bfa43
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| setIsSubmitting(true); | ||
| addAuditEvent({ type: 'submit' }); | ||
|
|
||
| return ( | ||
| <DownloadButton | ||
| onClick={handleDownload} | ||
| fileName={download?.fileName} | ||
| isDisabled={isDisabled} | ||
| isDownloading={isDownloading} | ||
| /> | ||
| ); | ||
| const nextAuditTrail = addAuditEvent({ type: 'submit' }); |
There was a problem hiding this comment.
Avoid double-recording submit audit events
The submit handler now calls addAuditEvent({ type: 'submit' }) twice back-to-back, so every submission emits two submit entries. This means auditTrail and the global audit mock will both contain duplicate submit events for a single user action, which can miscount submissions or break downstream audit validation that expects a single submit event. This happens on any successful submit.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@harbournick this PR is to sync monorepo with already deployed version from legacy repo. I'll create a ticket for this comment separately now
| if (rowCount > 1) { | ||
| let tr = editor.state.tr; | ||
|
|
||
| // Delete from bottom to top to ensure position mapping works correctly | ||
| for (let i = rowCount - 1; i >= 1; i--) { |
There was a problem hiding this comment.
Table updates always leave the original first row intact
For table fields, the update logic deletes rows 1..N but preserves row 0 and then appends all rows from field.value. If field.value is meant to represent the full table contents (not “rows after a header”), this leaves the original first row untouched and shifts all provided rows down by one, resulting in stale or duplicated data. This will show up whenever a structured-content table is used without a dedicated header/template row.
Useful? React with 👍 / 👎.
harbournick
left a comment
There was a problem hiding this comment.
Other than the codex comments, LGTM
answered on the first comment. Second from codex is irrelevant (it didn't get the logic right) |
|
🎉 This PR is included in esign v2.1.0-next.3 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.11.0-next.18 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.12.0-next.1 The release is available on GitHub release |
No description provided.