Skip to content

[stable32] Continue PR #7342: mobile signature placement flow#7415

Merged
vitormattos merged 69 commits intostable32from
backport/7408/stable32
Apr 5, 2026
Merged

[stable32] Continue PR #7342: mobile signature placement flow#7415
vitormattos merged 69 commits intostable32from
backport/7408/stable32

Conversation

@backportbot-libresign
Copy link
Copy Markdown

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

Backport of #7408

Warning, This backport's changes differ from the original and might be 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>
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/stable32 branch from dfa5839 to a1ab4af Compare April 5, 2026 23:34
@vitormattos vitormattos marked this pull request as ready for review April 5, 2026 23:34
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos merged commit 02536da into stable32 Apr 5, 2026
68 checks passed
@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Apr 5, 2026
@vitormattos vitormattos deleted the backport/7408/stable32 branch April 5, 2026 23:52
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