Repository navigation
Fix #1435–#1438: useMarkets races, repo cleanup, and Frontend CI lockfile - #1490
Merged
Ehonrie merged 5 commits intoOct 21, 2026
Merged
Conversation
…eMarkets - Ignore responses from superseded requests so a slow earlier fetch cannot overwrite newer results. - Limit isLoading to the first load; background polls and refetches report isRefreshing instead, so the list no longer flashes skeletons every 30 s. - useVisibilityInterval no longer fires on mount, removing the duplicate request that the initial load already made. It still fires immediately when the tab becomes visible again. - Tests cover out-of-order responses, stale errors, and polling without loading flicker. Closes Netwalls#1435
…emove Storybook boilerplate - git rm --cached frontend/.next: 95 generated build files were still tracked despite the .gitignore entry. Working copies are kept on disk. - Delete the default Storybook scaffolding (Page, Header, their CSS and the assets folder). Nothing outside stories/ referenced them, and .storybook/main.ts only globs stories/**. About 27 MiB of blobs are dropped from the tracked tree. Closes Netwalls#1436
…nd treasury_changes.txt - components/TransactionStatusModal.tsx and hooks/useMarkets.ts are obsolete copies of the frontend files. They import ../lib/api and ../types/market, which do not exist at the repo root, so they could never have compiled there. - treasury_changes.txt is a UTF-16 patch dump of contracts/treasury with no consumers. - Nothing in the repo, CI, or docs imports or references them. Closes Netwalls#1437
…e-lock.json - Regenerate frontend/package-lock.json with the npm version CI uses (Node 20). The old lock pinned @stellar/freighter-api@2.0.0 while package.json requires ^6.0.1, and it was missing several devDependencies (@playwright/test, @storybook/test-runner, concurrently, wait-on, ...), so `npm ci` failed on every run. - Verified `npm ci` succeeds on a clean copy of package.json and the new lock under Node 20. - frontend-ci.yml: add a "Verify package-lock.json is in sync" step before npm ci in both jobs. It regenerates the lock and fails if it changes, so a package.json edit without a matching lock fails early with a clear message. Closes Netwalls#1438
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
Four fixes, one commit each, so each can be reviewed and reverted on its own.
useMarketsrace conditions and loading flicker. Only the newest request may write state, so a slow earlier response can't overwrite newer data.isLoadingis now true only for the first load; background polls and refetches set a newisRefreshingflag, so the list no longer swaps for skeletons every 30 s.useVisibilityIntervalno longer fires on mount, which removes the duplicate request the initial load was already making.frontend/.nextbuild files still in the index (about 27 MiB of blobs leave the tracked tree; working copies stay on disk). Deletes the default Storybook scaffolding (Page,Header, their CSS, andassets/). Nothing outsidestories/referenced them.components/TransactionStatusModal.tsx,hooks/useMarkets.tsandtreasury_changes.txt. The root copies were obsolete, importing../lib/apiand../types/market, which don't exist at the root. Nothing references them.frontend/package-lock.jsonwith Node 20. The old lock pinned@stellar/freighter-api@2.0.0against^6.0.1and was missing several devDependencies, sonpm cifailed. Adds a "Verify package-lock.json is in sync" step to both jobs infrontend-ci.ymlthat fails early if regenerating the lock changes it.Testing
useMarkets.test.ts: 14/14 pass. Added tests for out-of-order responses, stale errors, and background polling without loading flicker. The "returns to loading while a refetch is in flight" test is replaced because it encoded the oldisLoadingbehaviour.main's (25 failing suites onmain, 24 here). No new failures.npm cipasses on a clean copy ofpackage.jsonplus the regenerated lock under Node 20.package.jsonchange without a lock update.Known issues not addressed here
tsc --noEmitreports pre-existing syntax errors infrontend/hooks/usePayoutEstimate.ts(line 62) andfrontend/hooks/useWallet.ts(line 240). They are outside these issues and still need fixing for the type-check job to pass.Closes #1435
Closes #1436
Closes #1437
Closes #1438