Skip to content

[stable33] Continue PR #7342: mobile signature placement flow#7416

Merged
vitormattos merged 68 commits intostable33from
backport/7408/stable33
Apr 5, 2026
Merged

[stable33] Continue PR #7342: mobile signature placement flow#7416
vitormattos merged 68 commits intostable33from
backport/7408/stable33

Conversation

@backportbot-libresign
Copy link
Copy Markdown

@backportbot-libresign backportbot-libresign bot commented Apr 5, 2026

Backport of #7408

Warning, This backport had conflicts that were resolved with the ours merge strategy and is likely incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Phillipxh and others added 30 commits April 5, 2026 23:20
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>
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>
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>
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>
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 force-pushed the backport/7408/stable33 branch from 6a37247 to 17db053 Compare April 5, 2026 23:26
@vitormattos vitormattos marked this pull request as ready for review April 5, 2026 23:26
@vitormattos vitormattos merged commit 0efd836 into stable33 Apr 5, 2026
69 checks passed
@vitormattos vitormattos deleted the backport/7408/stable33 branch April 5, 2026 23:40
@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

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants