You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Site Audit hub: empty state flashes while loading; failures and missing brand render as "no audits yet" #613
The Site Audit hub has no loading state at all. history initializes to [] and the page renders history.length === 0 immediately, so on every visit the "empty state" card flashes first and is then replaced by the real list once the fetch resolves. Two adjacent gaps in the same effect:
load failures are swallowed into console.error — the user is left on the (false) empty state with no error or retry;
with no active brand the effect returns early and the page again just shows the empty state; the noBrand message only appears as a toast after clicking Run.
Add a loading flag set around the fetch, render Skeleton blocks for the history card while it's true, show a toast + error state (with the empty card suppressed) on failure, and render an explicit "select a brand" state when there is no active brand — matching the sibling pages.
Acceptance criteria
No flash of the empty-state card while data is loading.
A failed load is visibly an error, not "no audits yet".
Without an active brand the page says so instead of showing the generic empty state.
Assigned to you — thanks for picking it up! The issue body has file/line pointers for all three gaps (loading flash, swallowed errors, missing brand guard) plus sibling pages to copy the Skeleton and brand-guard patterns from. Feel free to ask here if anything is unclear.
Assigned to you — thanks for picking it up! The issue body has file/line pointers for all three gaps (loading flash, swallowed errors, missing brand guard) plus sibling pages to copy the Skeleton and brand-guard patterns from. Feel free to ask here if anything is unclear.
Reviewed — see the comment on #624: the functionality covers everything this issue asked for, and the only blocker is the Prettier check failing on audit/page.tsx. Run yarn format from web/ and push, and it should go green — I'll approve right after.
@Pavel-glitch-ui checking in — are you still working on this? No pressure if plans changed; just let us know either way. If we don't hear back in a few days we'll unassign so someone else can pick it up.
You're right — #624 merged on Aug 4 and covers all three gaps (skeleton for the loading flash, the error state + card, and the no-brand guard). It just never auto-closed because the PR description didn't carry a Closes #613 line. Closing now — thanks again for the fix, and sorry for the unnecessary ping!
Activity
Pavel-glitch-ui commentedon Aug 3, 2026
Hello! Could you let me do this?
gkhngyk commentedon Aug 3, 2026
Assigned to you — thanks for picking it up! The issue body has file/line pointers for all three gaps (loading flash, swallowed errors, missing brand guard) plus sibling pages to copy the Skeleton and brand-guard patterns from. Feel free to ask here if anything is unclear.
fix: Empty state flashes while loading
Pavel-glitch-ui commentedon Aug 3, 2026
It's done. Could you review my fix please
gkhngyk commentedon Aug 3, 2026
Reviewed — see the comment on #624: the functionality covers everything this issue asked for, and the only blocker is the Prettier check failing on
audit/page.tsx. Runyarn formatfromweb/and push, and it should go green — I'll approve right after.fix: Empty state flashes while loading
fix: Empty state flashes while loading (#624)
gkhngyk commentedon Aug 8, 2026
@Pavel-glitch-ui checking in — are you still working on this? No pressure if plans changed; just let us know either way. If we don't hear back in a few days we'll unassign so someone else can pick it up.
Pavel-glitch-ui commentedon Aug 9, 2026
@gkhngyk you've already merged my fix, so I think the issue should be closed.
gkhngyk commentedon Aug 9, 2026
You're right — #624 merged on Aug 4 and covers all three gaps (skeleton for the loading flash, the error state + card, and the no-brand guard). It just never auto-closed because the PR description didn't carry a
Closes #613line. Closing now — thanks again for the fix, and sorry for the unnecessary ping!