Repository navigation
Conversation
panish16
requested review from
jimmypalelil and
severinbeauvais
as code owners
November 27, 2026 04:08
Collaborator
|
Temporary Url for review: https://strr-hosts-dev--pr-1939-m20kip2b.web.app |
… (REGBACKLOG-476) The doc is only pushed to storedDocuments as the last step of the try, so on failure there is nothing to remove. Calling it with a doc not in the list hit splice(-1, 1) and dropped the last stored doc. Replaces the index === -1 guard (Sonar flagged the duplicated guard in host/strata).
Collaborator
|
Temporary Url for review: https://strr-hosts-dev--pr-1939-m20kip2b.web.app |
- base: guard removeDocumentFromList against index -1 (bump base to 0.0.64) - examiner: JSDoc says upload fns always resolve; add addDocumentToApplication failure test - strata: add rejected dashboard upload test (list unchanged, no DELETE)
Collaborator
|
Temporary Url for review: https://strr-hosts-dev--pr-1939-m20kip2b.web.app |
…-476) findIndex returns -1 for a doc that's not in the list (double click on remove, or removed while its upload was still running), and splice(-1, 1) then drops the last real document. Return early in host and strata, with a regression test in each.
|
Collaborator
|
Temporary Url for review: https://strr-hosts-dev--pr-1939-m20kip2b.web.app |
severinbeauvais
approved these changes
Nov 27, 2026
severinbeauvais
left a comment
Collaborator
There was a problem hiding this comment.
Looks good.
Keeping the guard as an early return in each app is a good compromise, given that base-web has to merge before the apps can use anything new from it.
panish16
merged commit Nov 27, 2026
0d80045
into
feature-REGBACKLOG-476-upload-error
40 checks passed
panish16
added a commit
that referenced
this pull request
Nov 28, 2026
…EGBACKLOG-476) (#1938) * fix(ui): handle rejected document uploads without fetch error page (REGBACKLOG-476) - examiner: stop rethrowing upload errors from the document store; the error modal is already shown and the rethrow escaped through emit() into Nuxt's global error handler, showing the "Fetch Error" page - host/strata: removeStoredDocument returns early when the doc isn't in the list, so a rejected dashboard upload no longer splices(-1) the last stored document (and, on host, saves a draft without it) * fix(ui): simplify failed-upload cleanup + version bumps (REGBACKLOG-476) (#1939) * chore(ui): bump examiner, host and strata versions (REGBACKLOG-476) * fix(ui): drop removeStoredDocument from failed dashboard upload catch (REGBACKLOG-476) The doc is only pushed to storedDocuments as the last step of the try, so on failure there is nothing to remove. Calling it with a doc not in the list hit splice(-1, 1) and dropped the last stored doc. Replaces the index === -1 guard (Sonar flagged the duplicated guard in host/strata). * fix(ui): address #1938 review (REGBACKLOG-476) - base: guard removeDocumentFromList against index -1 (bump base to 0.0.64) - examiner: JSDoc says upload fns always resolve; add addDocumentToApplication failure test - strata: add rejected dashboard upload test (list unchanged, no DELETE) * fix(ui): keep the not-found guard in removeStoredDocument (REGBACKLOG-476) findIndex returns -1 for a doc that's not in the list (double click on remove, or removed while its upload was still running), and splice(-1, 1) then drops the last real document. Return early in host and strata, with a regression test in each.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue:
Description of changes:
Follow-up to #1938. That PR's head is a protected feature branch, so changes go in through this PR.
index === -1guard inremoveStoredDocument(SonarCloud failed fix(ui): handle rejected document uploads without fetch error page (REGBACKLOG-476) #1938 on 25% duplicated new code because the guard was identical in both apps). The failed-uploadcatchin hostaddDocumentand strataaddDocumentToApplicationno longer callsremoveStoredDocument. The doc is only pushed tostoredDocumentsas the last step of thetry, so on failure there's nothing to remove, and calling it is what hitsplice(-1, 1)and dropped the last real doc. Against main, the change in each file is now just that one deleted line.removeDocumentFromListinBaseUploadAdditionalDocumentsnow guards againstindex === -1, which had the samesplice(-1)bug. Base bumped 0.0.63 → 0.0.64. The apps build againststrr-base-web#main, so this takes effect after merge.addDocumentToApplication.How this was tested:
use-filing-history.spec.tsandstrata-formatting.spec.tssometimes time out in a setup hook; that happens on clean main too. The new examiner and strata failure tests and the host regression test all fail against main's code and pass with these changes..jpg).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the BC Registry and Digital Services BSD 3-Clause License