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
+15 -3
View File
@@ -75,6 +75,11 @@ const CardPageView: FC<CardPageViewProps> = (props) => {
{t("bank.back")}
</Button>
{!vm.notFound && (
<Button onClick={vm.cardRetry} variant="default">
{t("bank.retry")}
</Button>
)}
</Group>
)}
error
@@ -128,18 +133,27 @@ const CardPageView: FC<CardPageViewProps> = (props) => {
)}
{card.archivedAt && <Text>{t("bank.archiveHint")}</Text>}
{vm.cardError && vm.card && (
<BankFeedback
cached
error={vm.cardError}
retry={vm.cardRetry}
/>
)}
</Stack>
{vm.cardsFeedback && (
<BankFeedback
{...vm.cardsFeedback}
loadingError
retry={vm.cardsRetry}
/>
)}
<BankPeriodPicker onChange={vm.setPeriod} period={vm.period} />
<BankSummaryView {...vm.summary} />
<BankSummaryView {...vm.summary} retry={vm.summary.refetch} />
<Group align="end" justify="space-between">
<Group gap="xs">
@@ -183,8 +197,6 @@ const CardPageView: FC<CardPageViewProps> = (props) => {
<CardHistory history={vm.history} period={vm.period} rows={vm.rows} />
</Stack>
{vm.history.error && !vm.rows && <Text role="alert">{t("bank.error")}</Text>}
{vm.history.page !== undefined && vm.pageSize !== "all" && (
<Group
aria-label={t("bank.pagination")}