Skip to content

Continue PR #7342: mobile signature placement flow#7408

Merged
vitormattos merged 69 commits intomainfrom
fix/mobile-signature-placement
Apr 5, 2026
Merged

Continue PR #7342: mobile signature placement flow#7408
vitormattos merged 69 commits intomainfrom
fix/mobile-signature-placement

Conversation

@vitormattos
Copy link
Copy Markdown
Member

@vitormattos vitormattos commented Apr 4, 2026

This PR continues the work from #7342 while preserving the original commit history from the abandoned branch.

What was done in this continuation:

  • Added a follow-up commit to fix TypeScript typing in src/tests/components/PdfEditor/PdfEditor.spec.ts for runtime-only mock members used by mobile placement tests.
  • Revalidated frontend checks locally for the impacted scope.

Validation run:

  • npm run ts:check
  • npm run test -- src/tests/components/PdfEditor/PdfEditor.spec.ts src/tests/components/Request/VisibleElements.spec.ts src/tests/components/RightSidebar/RequestSignatureTab.spec.ts src/tests/store/files.spec.ts

Notes:

Phillipxh and others added 5 commits March 30, 2026 22:05
Signed-off-by: Phillip <phillipxh@gmail.com>
Signed-off-by: Phillip <phillipxh@gmail.com>
Signed-off-by: Phillip <phillipxh@gmail.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Apr 4, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- allow self worker-src on authenticated and public sign pages
- normalize mailpit sign links to app-relative paths
- add regression coverage for sign link extraction and sign-page CSP
- configure native signing without TSA in the affected public-sign E2E flows
- stabilize unauthenticated sign flows by clearing browser cookies before opening public links

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos force-pushed the fix/mobile-signature-placement branch from 70477b3 to 197aa75 Compare April 4, 2026 22:15
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Updates to v1.2.0 which includes:
- first-class pdf-elements:adding-ended event for interactive placement
- event payload types (placed/cancelled) exported from package API
- full test coverage for both event flows

This aligns LibreSign to use the new stable event contract from pdf-elements,
complementing the mobile signature placement flow refactorings in this PR.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
The PdfEditor component was still using setTimeout-based polling to detect
when pdf-elements placement completed. With pdf-elements v1.2.0, this event
is now exposed directly via 'pdf-elements:adding-ended' event with a complete
event contract including the placement reason ('placed' or 'cancelled').

Changes:
- Remove pendingAddedObjectCount and pendingAddCheckTimer state
- Remove polling functions: clearPendingAddCheck, finishPendingAddCheck,
  checkSignerAdded, scheduleSignerAddedCheck
- Remove document event listener registration (mouseup, touchend, keyup)
- Add handleAddingEnded(event: Event) to relay pdf-elements:adding-ended
  directly to pdf-editor:adding-ended with the reason payload
- Update emit type definition to include payload with reason field

This completes the v1.2.0 migration from polling-based to event-driven
completion detection.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Replace obsolete polling-based tests with new tests for the event relay pattern:
- Remove: 'schedules a deferred completion check after a placement interaction'
- Remove: 'emits adding-ended when object count increases after adding mode starts'
- Remove: 'emits adding-ended when adding mode finishes without object delta'
- Remove: 'keeps waiting while adding mode is active and count has not changed'
- Remove: 'ignores completion checks when no add session is pending'
- Remove: 'RULE: document listener lifecycle' test suite

Add: 'RULE: pdf-elements event relay' test suite with:
- 'relays pdf-elements:adding-ended event to pdf-editor:adding-ended'
- 'relays cancelled event with reason'

Update type definition PdfEditorVm:
- Remove: checkSignerAdded, scheduleSignerAddedCheck
- Add: handleAddingEnded(event: Event)

All 60 PdfEditor tests now pass with event-driven model.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable33

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos merged commit 63ed061 into main Apr 5, 2026
77 checks passed
@vitormattos vitormattos deleted the fix/mobile-signature-placement branch April 5, 2026 23:20
@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants