From 9d06b164d3c86fc142c58cc2580ed165532f9cdc Mon Sep 17 00:00:00 2001 From: mirivlad Date: Wed, 1 Jul 2026 04:15:35 +0800 Subject: [PATCH] fix: P1 shell tooltip fixes + Today routing + workspaces API Shell: - WorkspaceHost: change tooltip from pluginId to human-readable title - StatusBar: replace pluginId tooltips with label or id (3 occurrences) - App: startup routing to Today view, sidebar Today nav item - Sidebar: add Today button in Overview section - TodaySurface: separate global vs workspace data (no fallthrough) Plugin API: - Add workspaces.list() method wrapping App.ListWorkspaces() (needed by browser-inbox workspace picker) --- 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, 67 insertions(+), 40 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 6357562..9896c4b 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -7,6 +7,7 @@ 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'; @@ -74,33 +75,20 @@ if (err || !workspaces || workspaces.length === 0) { workspaceNodes = []; selectedWorkspaceName = ''; - currentView = 'workspace-empty'; + currentView = 'today'; emitWorkspaceActive(''); return; } workspaceNodes = workspaces.map(workspaceAsNode); - 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); + selectedWorkspaceName = ''; + currentView = 'today'; + emitWorkspaceActive(''); } catch (e) { debug.log('[App] openDefaultWorkspaceRoute ERROR', String(e)); workspaceNodes = []; selectedWorkspaceName = ''; - currentView = 'workspace-empty'; + currentView = 'today'; emitWorkspaceActive(''); } } @@ -394,6 +382,12 @@ {:else if currentView === 'workbench'} + {:else if currentView === 'today'} + {:else if currentView === 'workspace' || currentView === 'workspace-empty'} {/if} + {#if vaultOpen} + + {/if} + {#if sidebarItems.length > 0}