Repository navigation
fix: show persistent error state on audit detail load failure - #678
Conversation
gkhngyk
left a comment
There was a problem hiding this comment.
The core of this is right — error state, the retry card, surfacing the 404 message, and setLoading(true) at the top of loadAndPoll so Retry shows the loading card. Two things before merge:
-
Unrelated styling change: the timed-out card lost its
flex flex-col items-center gap-3wrapper and thetext-sm font-mediumon the message — that's a visual change outside this issue's scope. Please restore the original markup there (the() => void loadAndPoll()handler change is fine to keep). -
Hardcoded strings: "Couldn't load this audit" and "Retry" are hardcoded, but your own #673 just moved the audit UI onto i18n keys —
audit.retryalready exists inen.json, so uset('retry')and add a key for the title (e.g.audit.loadFailed).
Happy to approve once those are in.
|
Both requested changes are in — the timed-out card styling is restored and the error card is on i18n keys now. One leftover from the merge with main: |
563e89a to
c93025a
Compare
Summary
loadAndPollflow.Related issue
Closes #666
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsChecklist
feature/,fix/,chore/,docs/) — see https://github.com/ansvisor/ansvisor/blob/main/CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)