From d08e01ae97da993dc5c63a7133243601eb5a94c6 Mon Sep 17 00:00:00 2001 From: Matt Dawkins Date: Thu, 10 Sep 2026 22:08:26 -0400 Subject: [PATCH 1/2] Add Resume Last navigation for desktop annotation sequences --- .../frontend/components/NavigationBar.vue | 11 +++++++++++ .../desktop/frontend/components/ViewerLoader.vue | 13 ++++++++++++- .../platform/desktop/frontend/store/dataset.ts | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/client/platform/desktop/frontend/components/NavigationBar.vue b/client/platform/desktop/frontend/components/NavigationBar.vue index 04ff20a0e..af3565a73 100644 --- a/client/platform/desktop/frontend/components/NavigationBar.vue +++ b/client/platform/desktop/frontend/components/NavigationBar.vue @@ -1,6 +1,7 @@ @@ -21,6 +25,13 @@ export default defineComponent({ style="flex-basis:0; flex-grow:0;" color="accent" > + + Resume Lastmdi-history + Librarymdi-folder-open diff --git a/client/platform/desktop/frontend/components/ViewerLoader.vue b/client/platform/desktop/frontend/components/ViewerLoader.vue index 56eaef38b..b4e4c932c 100644 --- a/client/platform/desktop/frontend/components/ViewerLoader.vue +++ b/client/platform/desktop/frontend/components/ViewerLoader.vue @@ -41,7 +41,7 @@ import { import Export from './Export.vue'; import JobTab from './JobTab.vue'; import DatasetSourceInfo from './DatasetSourceInfo.vue'; -import { datasets } from '../store/dataset'; +import { datasets, rememberAnnotation } from '../store/dataset'; import { settings } from '../store/settings'; import { runningJobs } from '../store/jobs'; import { setCloseGuard } from '../store/closeGuard'; @@ -935,6 +935,17 @@ export default defineComponent({ // is deferred to the viewer-ready watcher below instead. watch(stereoServiceWanted, (enabled) => requestStereoServiceState(enabled, true)); + watch( + () => viewerRef.value?.progress?.loaded === true, + (loaded) => { + // Read-only scoring previews should not replace the last editing sequence. + if (loaded && !scoringPreviewFile.value) { + rememberAnnotation(props.id); + } + }, + { immediate: true }, + ); + // Load-time auto-enable of a remembered setting: run once the viewer has // actually finished loading the dataset (progress.loaded), so the metadata // and calibration the enable needs are available. One-shot -- stop after the diff --git a/client/platform/desktop/frontend/store/dataset.ts b/client/platform/desktop/frontend/store/dataset.ts index 6ad79e32f..0ddd5e259 100644 --- a/client/platform/desktop/frontend/store/dataset.ts +++ b/client/platform/desktop/frontend/store/dataset.ts @@ -45,6 +45,16 @@ function hydrateJsonConfigCacheValue(input: any): JsonConfigCache { const datasets = ref({} as Record); +// Remember annotation navigation separately from library selections and jobs. +const lastAnnotationId = ref(null); +const lastAnnotation = computed(() => ( + lastAnnotationId.value ? datasets.value[lastAnnotationId.value] : undefined +)); + +function rememberAnnotation(datasetId: string) { + lastAnnotationId.value = datasetId; +} + const recents = computed(() => (Object.values(datasets.value))); function setRecents(meta: JsonConfig, accessTime?: string) { @@ -70,6 +80,7 @@ function setRecents(meta: JsonConfig, accessTime?: string) { } function clearRecents() { + lastAnnotationId.value = null; datasets.value = {}; window.localStorage.setItem(RecentsKey, JSON.stringify([])); } @@ -136,6 +147,9 @@ function locateDuplicates(meta: JsonConfig) { } function removeRecents(datasetId: string) { + if (lastAnnotationId.value === datasetId) { + lastAnnotationId.value = null; + } if (datasets.value[datasetId]) { Vue.delete(datasets.value, datasetId); } @@ -144,6 +158,8 @@ function removeRecents(datasetId: string) { } export { + lastAnnotation, + rememberAnnotation, datasets, recents, autoDiscover, From 94504ff64f85d69c191345dbb87dedb3c398c9e9 Mon Sep 17 00:00:00 2001 From: Matt Dawkins Date: Thu, 10 Sep 2026 22:26:09 -0400 Subject: [PATCH 2/2] Shorten Resume label and hide it until a sequence is available --- .../desktop/frontend/components/NavigationBar.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/platform/desktop/frontend/components/NavigationBar.vue b/client/platform/desktop/frontend/components/NavigationBar.vue index af3565a73..84ce5b306 100644 --- a/client/platform/desktop/frontend/components/NavigationBar.vue +++ b/client/platform/desktop/frontend/components/NavigationBar.vue @@ -26,11 +26,11 @@ export default defineComponent({ color="accent" > - Resume Lastmdi-history + Resumemdi-history Librarymdi-folder-open