From 583c39dada43acafd86ec3cf0707b7bf5fbff83b Mon Sep 17 00:00:00 2001 From: JoachimLK Date: Sat, 8 Aug 2026 20:19:17 +0200 Subject: [PATCH 1/3] Prevent full-page loading state during background refetch Update the loading logic to only display a full-page spinner on initial load. Subsequent fetches (searching, filtering, or sorting) now preserve the existing UI and display a subtle inline indicator to prevent focus loss and layout shifts. --- app/pages/dashboard/jobs/[id]/index.vue | 34 ++++++++++++++++++++----- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/app/pages/dashboard/jobs/[id]/index.vue b/app/pages/dashboard/jobs/[id]/index.vue index 9248ce76..ced75e28 100644 --- a/app/pages/dashboard/jobs/[id]/index.vue +++ b/app/pages/dashboard/jobs/[id]/index.vue @@ -1389,10 +1389,20 @@ onBeforeUnmount(() => { document.removeEventListener('click', handleOverviewDropdownClickOutside) }) +/** + * Only the very first load may swap the whole pipeline for a spinner. Later + * fetches — search, sort, filters, changing stage — keep the previous list on + * screen: tearing down the layout mid-request unmounts the search input and + * steals focus on every keystroke. + */ const isLoading = computed(() => { - return jobFetchStatus.value === 'pending' || appFetchStatus.value === 'pending' + return (jobFetchStatus.value === 'pending' && !jobData.value) + || (appFetchStatus.value === 'pending' && !appData.value) }) +/** Background refetch of the candidate list — shown inline, never as a full-page state. */ +const isRefreshingApps = computed(() => appFetchStatus.value === 'pending' && !!appData.value) + // ───────────────────────────────────────────── // Document preview // ───────────────────────────────────────────── @@ -1445,7 +1455,7 @@ function closeDocPreview() {
{{ jobError ? 'Job not found or failed to load.' : 'Failed to load applications.' }} @@ -1680,11 +1690,17 @@ function closeDocPreview() {
- - Showing {{ pageStart }}-{{ pageEnd }} of {{ focusedApplicationTotal }} candidate{{ focusedApplicationTotal === 1 ? '' : 's' }} - - {{ hasActiveFilters ? ' filtered' : ' matching' }} + + + Showing {{ pageStart }}-{{ pageEnd }} of {{ focusedApplicationTotal }} candidate{{ focusedApplicationTotal === 1 ? '' : 's' }} + + {{ hasActiveFilters ? ' filtered' : ' matching' }} + +
-