Skip to content

Conversation

@backportbot-libresign
Copy link

@backportbot-libresign backportbot-libresign bot commented Jan 26, 2026

Backport of #6587

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

Todo

  • Review and resolve any conflicts

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

Add StatusCacheService for caching file status during async operations.
Add SignRequestErrorReporter for storing and retrieving per-file errors.
Add ErrorPayloadBuilder for consistent error payloads.

These services enable granular error tracking during background signing
jobs and provide detailed feedback to users about which specific files
failed and why.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add methods to set/get/clear errors for individual files and sign requests.
Implement long-polling with error detection across envelope children.
Add fallback to metadata when cache is not available.

This allows the frontend to display specific error messages for each
file in a multi-file signing workflow, improving user feedback.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Replace direct cache access with StatusCacheService dependency.
Add getByEnvelopeChildrenAndIdentifyMethod to SignRequestMapper for
querying child sign requests.

This improves testability and centralizes status caching logic.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Inject ProgressService and SignRequestErrorReporter.
Clear errors before signing and report errors on exceptions.
Preserve detailed error messages with HTTP status codes.

Background jobs now store specific error information that the
frontend can retrieve and display to users.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update SignFileService, AsyncSigningService, and background jobs to
inject StatusService explicitly instead of relying on internal creation.

Improves dependency injection and testability.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add per-file error details to progress responses.
Improve envelope progress with child file error aggregation.
Change from short polling to long-polling for better efficiency.

Users now see specific error messages for each file that fails
during async signing, rather than generic failure messages.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Show individual file error messages with error icons.
Improve polling logic to handle file-level errors gracefully.
Switch to long-polling (immediate retry) for better responsiveness.
Add error state detection to stop polling when appropriate.

Users now see which specific files failed and why during batch
signing operations.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Hide sidebar when async signing starts for cleaner UI.
Keep async view visible on error to show per-file error details.
Improve error handling flow in RequestSignatureTab.

This prevents the UI from closing prematurely and allows users to
see detailed error information for failed signing operations.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add comprehensive tests for ErrorPayloadBuilder and SignRequestErrorReporter.
Cover error serialization, HTTP code extraction, and error storage/retrieval.

Ensures error reporting services work correctly and maintain data integrity.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add tests for per-file error storage and retrieval.
Test error fallback to metadata when cache unavailable.
Add tests for envelope progress with file errors.
Include long-polling tests with error detection.

Validates that error tracking works across all progress
calculation scenarios including envelopes and single files.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update SignJobCoordinatorTest with error reporting validation.
Update SignFileServiceTest, StatusServiceTest, and RequestSignatureServiceTest
to inject StatusCacheService and StatusService.

Maintains test coverage after dependency injection changes.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add tests for envelope progress endpoint with error details.
Test single file progress with error information.
Validate error payload structure and HTTP responses.
Test long-polling timeout behavior.

Ensures controller correctly exposes per-file error information
to the frontend via API endpoints.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update OpenAPI specifications and TypeScript types to reflect
new error fields in FileProgressController responses.

Generated from updated PHP annotations.

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>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos force-pushed the backport/6587/stable33 branch from 14cb1bb to 01dfec8 Compare January 26, 2026 22:34
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 97c4929 into stable33 Jan 27, 2026
63 checks passed
@vitormattos vitormattos deleted the backport/6587/stable33 branch January 27, 2026 16:28
@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Jan 27, 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.

1 participant