feat: workspace routing, GlobalSearch, and shell refinements

- Add workspace-aware startup routing (openDefaultWorkspaceRoute)
- Add GlobalSearch component and workspace-empty state
- Refactor Sidebar, StatusBar, WorkspaceTree, VaultSelection
- Update PluginCard/PluginManager UI
- Extend e2e coverage (ux-p0, ux-followup, helpers)
- Add ListWorkspaces/SetCurrentWorkspace backend bindings
This commit is contained in:
2026-06-30 12:32:04 +08:00
parent 4bb9e84c35
commit 46f754cc2d
24 changed files with 845 additions and 174 deletions
@@ -97,35 +97,39 @@
<span class="label">Name:</span>
<span>{m.name || '-'}</span>
</div>
<div class="meta-row">
<span class="label">API Version:</span>
<span>{m.apiVersion || '-'}</span>
</div>
<div class="meta-row">
<span class="label">Source:</span>
<span>{m.source || 'unknown'}</span>
</div>
<div class="meta-row">
<span class="label">Root:</span>
<span class="path">{p.rootPath || '-'}</span>
</div>
<div class="meta-row">
<span class="label">Contributions:</span>
<span>{contribSummary}</span>
</div>
</div>
<!-- Capabilities -->
<div class="section">
<span class="section-title">Provides</span>
<div class="tags">
{#each m.provides || [] as cap}
<span class="tag provides">{cap}</span>
{/each}
<details class="plugin-details">
<summary>Technical details</summary>
<div class="card-meta technical-meta">
<div class="meta-row">
<span class="label">API Version:</span>
<span>{m.apiVersion || '-'}</span>
</div>
<div class="meta-row">
<span class="label">Root:</span>
<span class="path">{p.rootPath || '-'}</span>
</div>
</div>
</div>
{#if m.requires && m.requires.length > 0}
<div class="section">
<span class="section-title">Provides</span>
<div class="tags">
{#each m.provides || [] as cap}
<span class="tag provides">{cap}</span>
{/each}
</div>
</div>
{#if m.requires && m.requires.length > 0}
<div class="section">
<span class="section-title">Requires</span>
<div class="tags">
@@ -141,9 +145,9 @@
<p class="warning"><Icon name="warning" size={12} /> Missing required capabilities: {missingRequired.join(', ')}</p>
{/if}
</div>
{/if}
{/if}
{#if m.optionalRequires && m.optionalRequires.length > 0}
{#if m.optionalRequires && m.optionalRequires.length > 0}
<div class="section">
<span class="section-title">Optional Requires</span>
<div class="tags">
@@ -159,10 +163,9 @@
<p class="info"><Icon name="warning" size={12} /> Optional capabilities not available — plugin running in degraded mode</p>
{/if}
</div>
{/if}
{/if}
<!-- Permissions -->
{#if m.permissions && m.permissions.length > 0}
{#if m.permissions && m.permissions.length > 0}
<div class="section">
<span class="section-title">Permissions</span>
<div class="tags">
@@ -175,7 +178,8 @@
{/each}
</div>
</div>
{/if}
{/if}
</details>
<!-- Error -->
{#if p.error}
@@ -289,6 +293,24 @@
font-size: 0.8rem;
}
.technical-meta {
margin-top: 0.55rem;
}
.plugin-details {
margin: 0.6rem 0;
padding: 0.45rem 0;
border-top: 1px solid rgba(15, 52, 96, 0.75);
border-bottom: 1px solid rgba(15, 52, 96, 0.75);
}
.plugin-details summary {
cursor: pointer;
color: #8b8ba8;
font-size: 0.78rem;
font-weight: 600;
}
.meta-row {
display: flex;
gap: 0.5rem;
@@ -514,7 +514,7 @@
}
.modal {
background: #16213e; border: 1px solid #0f3460; border-radius: 8px;
width: 480px; max-width: 90vw; max-height: 80vh; display: flex; flex-direction: column;
width: min(880px, calc(100vw - 4rem)); max-width: calc(100vw - 4rem); height: min(680px, calc(100vh - 4rem)); max-height: calc(100vh - 4rem); display: flex; flex-direction: column;
}
.modal-header {
display: flex; align-items: center; justify-content: space-between;
@@ -523,7 +523,8 @@
.modal-header h3 { margin: 0; color: #e0e0f0; font-size: 1.1rem; }
.modal-close { background: none; border: none; color: #a0a0b8; font-size: 1.2rem; cursor: pointer; padding: 0.2rem 0.5rem; }
.modal-close:hover { color: #e94560; }
.modal-body { padding: 1rem; overflow-y: auto; }
.modal-body { padding: 1rem; overflow: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.modal-body :global(.plugin-bundle-host) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.settings-hint { color: #666; font-size: 0.8rem; margin: 0.25rem 0; }
.settings-hint code { color: #4ecca3; }
@@ -542,7 +543,8 @@
}
.modal {
width: min(480px, calc(100vw - 2rem));
width: min(880px, calc(100vw - 2rem));
height: min(680px, calc(100vh - 2rem));
max-height: calc(100vh - 2rem);
}
}