Skip to content

[stable32] feat: signature confirmation steps#7092

Merged
vitormattos merged 27 commits intostable32from
backport/6983/stable32
Mar 5, 2026
Merged

[stable32] feat: signature confirmation steps#7092
vitormattos merged 27 commits intostable32from
backport/6983/stable32

Conversation

@backportbot-libresign
Copy link
Copy Markdown

@backportbot-libresign backportbot-libresign Bot commented Mar 5, 2026

Backport of #6983

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • 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.

- Add identityVerified state to control Step 3 visibility
- Update dialogTitle computed property for Step 3 title
- Update progressText to show 'Step 3 of 3 - Signature confirmation'
- Modify sendCode() to set identityVerified = true
- Add signDocument() method to trigger signature
- Add requestNewCode() to reset identityVerified state
- Add CSS styling for verification success message block

Signed-off-by: Vitor Mattos <[email protected]>
- Add identityVerified state to control Step 3 visibility
- Update dialogTitle computed property for Step 3 title
- Update progressText to show 'Step 3 of 3 - Signature confirmation'
- Modify sendToken() to set identityVerified = true
- Add signDocument() method to trigger signature
- Add requestNewToken() to reset identityVerified state
- Add CSS styling for verification success message block
- Match ModalEmailManager implementation for consistency

Signed-off-by: Vitor Mattos <[email protected]>
- Create new test file for ModalEmailManager component
- Update progress text assertions from 'Step 1 of 2' to 'Step 1 of 3'
- Update progress text assertions from 'Step 2 of 2' to 'Step 2 of 3'
- Add test: updates to step 3 when identityVerified is true
- Add test: shows verification success message on step 3
- Add test: shows correct button label on step 3
- Add test: sendCode sets identityVerified to true
- Add test: requestNewCode resets identityVerified to false

Signed-off-by: Vitor Mattos <[email protected]>
- Create new test file for ModalTokenManager component
- Update progress text assertions from 'Step 1 of 2' to 'Step 1 of 3'
- Update progress text assertions from 'Step 2 of 2' to 'Step 2 of 3'
- Add test: updates to step 3 when identityVerified is true
- Add test: shows verification success message on step 3
- Add test: shows correct button label on step 3
- Add test: sendToken sets identityVerified to true
- Add test: requestNewToken resets identityVerified to false
- Mirror ModalEmailManager test structure for consistency

Signed-off-by: Vitor Mattos <[email protected]>
- Create new test file for SignFinalModals component
- Fix import statement to use ES6 import instead of require
- Import useSignMethodsStore for component testing
- Add test structure for signature confirmation modals

Signed-off-by: Vitor Mattos <[email protected]>
- Add missing capability structure for sign-elements in test environment
- Set can-create-signature to true to allow dynamic signature tests
- Ensures needCreateSignature computed property returns correct value

Signed-off-by: Vitor Mattos <[email protected]>
- Update getCapabilities mock to return proper capability structure
- Include libresign.config.sign-elements.can-create-signature = true
- Fixes test failure: 'updates elements when signature is created dynamically'
- Ensures all 1648 tests pass without failures

Signed-off-by: Vitor Mattos <[email protected]>
On step 3, signDocument() was self-closing the modal immediately after
emitting 'change', causing a jarring UX: the modal disappeared while the
signing API call was still in-flight, leaving a spinner on a disappeared
dialog.

- Remove self-close from signDocument(); parent (Sign.vue) already calls
  actionHandler.closeModal() on both sync and async signing paths, so the
  modal closes at the right time after the request completes.
- Set loading=true in signDocument() so the dialog stays disabled and
  shows a spinner while the API call runs.
- Add watcher on signStore.errors to reset loading=false when the signing
  request fails, allowing the user to retry without being stuck.
- Async signing path is unaffected: Sign.vue closes the modal before
  transitioning to the progress screen.

Tests added to cover:
- signDocument emits change with token and does not emit close
- signStore.errors watcher resets loading on failure (both modes)

Signed-off-by: Vitor Mattos <[email protected]>
[skip ci]

Signed-off-by: Vitor Mattos <[email protected]>

[skip ci]
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Mar 5, 2026
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Mar 5, 2026
@vitormattos vitormattos marked this pull request as ready for review March 5, 2026 12:41
@vitormattos vitormattos merged commit 0f7febe into stable32 Mar 5, 2026
3 checks passed
@vitormattos vitormattos deleted the backport/6983/stable32 branch March 5, 2026 12:41
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant