From 167d5932451f81dfa1044c0daddc617dabcd1a80 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Wed, 1 Jul 2026 07:44:28 +0800 Subject: [PATCH] Revert "fix: P1 shell tooltip fixes + Today routing + workspaces API" This reverts commit 9d06b164d3c86fc142c58cc2580ed165532f9cdc. --- frontend/src/App.svelte | 30 +++++++++++------- .../src/lib/plugin-host/VerstakPluginAPI.js | 9 ------ frontend/src/lib/shell/Sidebar.svelte | 29 ----------------- frontend/src/lib/shell/StatusBar.svelte | 6 ++-- frontend/src/lib/shell/TodaySurface.svelte | 31 +++++++++++-------- frontend/src/lib/shell/WorkspaceHost.svelte | 2 +- 6 files changed, 40 insertions(+), 67 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 9896c4b..6357562 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -7,7 +7,6 @@ import VaultSelection from './lib/shell/VaultSelection.svelte'; import WorkbenchHost from './lib/shell/WorkbenchHost.svelte'; import WorkspaceHost from './lib/shell/WorkspaceHost.svelte'; - import TodaySurface from './lib/shell/TodaySurface.svelte'; import * as App from '../wailsjs/go/api/App'; import { debug } from './lib/log/debug.js'; import { onMount } from 'svelte'; @@ -75,20 +74,33 @@ if (err || !workspaces || workspaces.length === 0) { workspaceNodes = []; selectedWorkspaceName = ''; - currentView = 'today'; + currentView = 'workspace-empty'; emitWorkspaceActive(''); return; } workspaceNodes = workspaces.map(workspaceAsNode); - selectedWorkspaceName = ''; - currentView = 'today'; - emitWorkspaceActive(''); + let currentWorkspace = null; + try { + currentWorkspace = await App.GetCurrentWorkspace(); + } catch { + currentWorkspace = null; + } + const currentName = workspaceName(currentWorkspace); + const selected = workspaces.find((workspace) => workspaceName(workspace) === currentName) || workspaces[0]; + selectedWorkspaceName = workspaceName(selected); + if (selectedWorkspaceName) { + try { await App.SetCurrentWorkspace(selectedWorkspaceName); } catch {} + currentView = 'workspace'; + } else { + currentView = 'workspace-empty'; + } + emitWorkspaceActive(selectedWorkspaceName); } catch (e) { debug.log('[App] openDefaultWorkspaceRoute ERROR', String(e)); workspaceNodes = []; selectedWorkspaceName = ''; - currentView = 'today'; + currentView = 'workspace-empty'; emitWorkspaceActive(''); } } @@ -382,12 +394,6 @@ {:else if currentView === 'workbench'} - {:else if currentView === 'today'} - {:else if currentView === 'workspace' || currentView === 'workspace-empty'} {/if} - {#if vaultOpen} - - {/if} - {#if sidebarItems.length > 0}