fix(auth,bank): guard switch-auth nav and surface banking retry
Frontend verify / commits (pull_request) Successful in 39s
Frontend verify / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Failing after 5m50s

AuthForm disables the switch-auth Link while submit is pending so pointer
click and Enter can no longer leave the auth route and lose the draft/error
context. The form restores a true Link after the request settles.

CardsPage/CardPage distinguish cold vs cached banking failures:
- cold card/section errors expose accessible alert + retry
- cached failures keep the previous data and offer a section GET retry
- summary-only/history-only outages do not hide successful sections
- notFound still skips the retry CTA

Tests cover the pending link guard, cold/cached cards error with retry,
summary failure with retry, and the prerequisite card list recovery.

Closes #56, #57
This commit is contained in:
2026-10-14 10:43:34 +03:00
parent e5f8bbe33c
commit e38ecd87d6
10 changed files with 251 additions and 32 deletions
+7 -2
View File
@@ -97,13 +97,16 @@ function useCardPageVm() {
archivePending: updateCard.isPending,
canAddOperation: !card.data?.archivedAt && Boolean(cards.data),
card: card.data,
cardError: card.error,
cardLoading: card.isLoading,
cardRefreshError: card.isError,
cardRefreshing: card.isFetching,
cardRetry: () => card.refetch(),
cards: cards.data,
cardsFeedback: cards.isError
? { cached: Boolean(cards.data), error: cards.error }
: undefined,
cardsRetry: () => cards.refetch(),
closeDeletion: () => setDeleting(null),
closeEditing: () => setEditingCard(false),
closeOperation: () => setOperation(null),
@@ -112,9 +115,10 @@ function useCardPageVm() {
editingCard,
history: {
changingPage: history.isPlaceholderData,
error: history.isError,
error: history.error,
loading: history.isLoading,
page: history.data?.page,
refetch: () => history.refetch(),
},
notFound: isApiErrorCode(
apiErrorCode(card.error),
@@ -139,9 +143,10 @@ function useCardPageVm() {
},
summary: {
data: summary.data,
error: summary.isError,
error: summary.error,
fetching: summary.isFetching,
loading: summary.isLoading,
refetch: () => summary.refetch(),
},
toggleArchive: () => {
if (!card.data) return;