fix: lodash.reject shadows Promise.reject, deprecated RxJS ops, lodash bundle, triplicated logout logic - #3405
Closed
numbers-official with Copilot wants to merge 3 commits into
Closed
fix: lodash.reject shadows Promise.reject, deprecated RxJS ops, lodash bundle, triplicated logout logic#3405numbers-official with Copilot wants to merge 3 commits into
numbers-official with Copilot wants to merge 3 commits into
Conversation
…d RxJS ops, lodash bundle, LogoutService extraction Agent-Logs-Url: https://github.com/numbersprotocol/capture-cam/sessions/d549054c-bea6-4b57-b035-84119e871612 Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
…home and capture-tab Agent-Logs-Url: https://github.com/numbersprotocol/capture-cam/sessions/d549054c-bea6-4b57-b035-84119e871612 Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix critical bug with lodash reject shadowing Promise.reject
fix: lodash.reject shadows Promise.reject, deprecated RxJS ops, lodash bundle, triplicated logout logic
Apr 10, 2026
Collaborator
|
Closing this stale Copilot draft PR. It is outdated against main, not merge-ready, and bundles broad automated changes without current full CI coverage. We should re-open focused PRs only for findings that are still valid after current main/Angular 21. |
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.
Five code quality and correctness findings: one active bug causing permanently hanging promises, three deprecated RxJS operator usages, a full-bundle lodash import, and triplicated logout logic.
Critical Bug Fix:
getToken()Promise Never RejectsPromiseconstructor was missing therejectparameter, so the lodash array-filterreject()was called instead — silently returning[]and leaving the promise hanging forever when the token is empty.Deprecated RxJS Operators Replaced
repeatWhen(() => n$)repeat({ delay: () => n$ })dia-backend-asset-repository,dia-backend-transaction-repository,dia-backend-contact-repositoryretryWhen(err$ => err$.pipe(mergeMap((_, i) => timer(...))))retry({ delay: (_, i) => timer(...) })dia-backend-asset-uploadingpluck('count')map(x => x.count)repeatWhenLodash Full-Bundle Import in
proof.tsExtracted
LogoutService(DRY)The wipe-and-reload pipeline (
mediaStore.clear()→database.clear()→preferenceManager.clear()→reloadApp) was copy-pasted acrosshome.page.ts,capture-tab.component.ts, andsettings.page.ts. Extracted intoshared/logout/logout.service.tswith:wipeAndReload$()— the shared clearing pipelinelogout$()— confirmation dialog + blocking action wrapper (used by home and capture-tab)settings.page.tsdeleteAccount()now chainsdiaBackendAuthService.deleteAccount$()intologoutService.wipeAndReload$()Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node node index.js --exec install conf�� ut-json dist/docs.json --global iptables core.hooksPath(dns block)If you need me to access, download, or install something from one of these locations, you can either: