From 7599ccd5cb1d5098b272d7f0a54acfe8c55de356 Mon Sep 17 00:00:00 2001
From: HiccupHan <89772977+HiccupHan@users.noreply.github.com>
Date: Thu, 16 Apr 2026 12:35:17 -0700
Subject: [PATCH 1/4] Add manual workspace snapshot republish
---
src/components/NavBar.vue | 34 ++++++++++++++++++++++++++++++++++
src/services/svs-provider.ts | 22 ++++++++++++++++++++++
src/services/workspace-proj.ts | 27 +++++++++++++++++++++++++++
src/services/workspace.ts | 19 +++++++++++++++++++
4 files changed, 102 insertions(+)
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index 50e007ac..69afc80f 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -132,6 +132,12 @@
+
+
+
+ {{ isForcingSnapshot ? 'Refreshing snapshot...' : 'Force snapshot update' }}
+
+
@@ -187,6 +193,7 @@ import {
faCircleInfo,
faRobot,
faCircleExclamation,
+ faArrowsRotate,
faMoon,
faSun,
} from '@fortawesome/free-solid-svg-icons';
@@ -222,6 +229,7 @@ const showProjectModal = ref(false);
const showInviteModal = ref(false);
const showIdentity = ref(false);
const showAgentModal = ref(false);
+const isForcingSnapshot = ref(false);
// vue-tsc chokes on this type inference
const projectTree = useTemplateRef>>('projectTree');
@@ -442,6 +450,27 @@ function setNotification() {
else
showNotifBubble.value = false;
}
+
+async function forceSnapshotUpdate() {
+ if (isForcingSnapshot.value) return;
+
+ const wksp = globalThis.ActiveWorkspace;
+ if (!wksp) {
+ Toast.error('No active workspace');
+ return;
+ }
+
+ isForcingSnapshot.value = true;
+ const progress = Toast.loading('Republishing encrypted workspace state...');
+ try {
+ await wksp.forceSnapshotUpdate();
+ await progress.success('Encrypted workspace state republished');
+ } catch (err) {
+ await progress.error(`Failed to republish workspace state: ${err}`);
+ } finally {
+ isForcingSnapshot.value = false;
+ }
+}