Fix 20 bugs from code review, add Vitest + unit tests - #37
Open
TheMarstonConnell wants to merge 1 commit into
Open
Fix 20 bugs from code review, add Vitest + unit tests#37TheMarstonConnell wants to merge 1 commit into
TheMarstonConnell wants to merge 1 commit into
Conversation
Critical fixes: init() now throws on failure instead of swallowing errors, DownloadFile reports failed downloads, null safety for getAsFile(), blockList uses includes() instead of in operator, loadProviders uses continue instead of return. High-priority fixes: delete toast typo, month off-by-one, Invalid Date guard, v-for key using ulid, CoinGecko error handling, isShiftPressed renamed to isMetaPressed, formatBytes Infinity guard, FileTree try-catch, resize listener cleanup. Medium fixes: throw string→Error objects, any→proper types, await formatJklAmount, moveFile validation before close, variable shadowing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for poetic-cheesecake-208edc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Summary
init()swallowing failures, incomplete zip downloads, nullgetAsFile()crash,blockListusing wrong operator,loadProvidersearly exitformatBytesinfinite loop,FileTreeuncaught throw, resize listener leakanytypes → proper types, missingawait, validation order, variable shadowingsrc/helpers/util.tsDetails
Critical
init()catches errors but returns them as resolved values; caller always setsready.wallet = truejjs.ts,ConnectWallet.vuePromise.allSettledswallows download failures, produces incomplete zip silentlyutil.tsgetAsFile()returnsFile | null, cast toFilehides null → crash during uploadMainMiddleSection.vueinoperator checks array indices, not values — never blocks providersjjs.tsreturninstead ofcontinueexits entire function on first bad providerjjs.tsHigh Priority
confirmDeletetoast says "download" instead of "delete"UtilityPopup.vuegetUTCMonth()returns 0-11, January displays as month 0SingleShare.vuenew Date(undefined)creates Invalid Date before checkSingleFile.vue,SingleShare.vue:key="index"on sorted file list causes stale Vue stateMainMiddleSection.vueonMountedWalletInfo.vueisShiftPressedactually tracks Meta key — renamed toisMetaPressedlocal.ts+ 3 componentsformatBytes()infinite loop onInfinityinpututil.tsawaitwith no try-catch blanks sidebar on errorFileTree.vueViewFileDash.vueMedium
throw "string"→throw new Error(...)(6 locations)jjs.ts,MainMiddleSection.vue,ViewFileDash.vue,CreateVault.vueanytypes with proper typesWalletInfo.vue,jjs.ts,MainMiddleSection.vue,UtilityColumn.vueawaitonformatJklAmount()WalletInfo.vuemoveFile()validates after closing modalUtilityPopup.vueconst valuestwice)jjs.tsTesting
vitest.config.tssrc/helpers/util.tscovering all exported functionsTest plan
npm run build:prodpasses with no TypeScript errorsnpx vitest run— all 63 tests pass🤖 Generated with Claude Code