From e8ee0f5de9510497a4ca6cbee8e2b576e8ce76d7 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Mon, 20 Jul 2026 13:34:27 +0200 Subject: [PATCH] fix(frontend): skeleton replacement ordering and col-check alignment - Await the entry list refresh before removing the skeleton so the real row arrives before the placeholder disappears. handleCaptured now returns its Promise.all; startPolling awaits it before calling onJobSettled on the success path. - Add col-check as the first child of SkeletonEntryRow to match EntryRow's DOM structure; without it, columns misalign on touch devices where col-check becomes display:flex. --- frontend/src/App.jsx | 2 +- frontend/src/components/CaptureDialog.jsx | 2 +- frontend/src/components/SkeletonEntryRow.jsx | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index b2d6fdd..fa258ce 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -436,7 +436,7 @@ export default function App() { const handleCaptured = useCallback(() => { if (!archiveId) return - Promise.all([ + return Promise.all([ loadEntries(archiveId, searchQuery, tagFilter), fetchRuns(archiveId).then(setRuns), ]) diff --git a/frontend/src/components/CaptureDialog.jsx b/frontend/src/components/CaptureDialog.jsx index 6ec19e3..3878303 100644 --- a/frontend/src/components/CaptureDialog.jsx +++ b/frontend/src/components/CaptureDialog.jsx @@ -206,8 +206,8 @@ export default function CaptureDialog({ open, archiveId, onClose, onCaptured, on if (updated.status === 'completed') { clearInterval(pollIntervals.current.get(jobUid)) pollIntervals.current.delete(jobUid) + await Promise.resolve(onCapturedRef.current?.()) onJobSettledRef.current?.(bgJobId) - onCapturedRef.current() try { const notes = updated.notes_json ? JSON.parse(updated.notes_json) : null if (notes?.ublock_skipped || notes?.cookie_ext_skipped) { diff --git a/frontend/src/components/SkeletonEntryRow.jsx b/frontend/src/components/SkeletonEntryRow.jsx index b25e2d8..7c7f5b9 100644 --- a/frontend/src/components/SkeletonEntryRow.jsx +++ b/frontend/src/components/SkeletonEntryRow.jsx @@ -1,6 +1,7 @@ export default function SkeletonEntryRow() { return (
+