Feat v0.2.4: SDK Topbar, Schedules surface, manifest icons, UserMenu cleanup

Shell navigation:
- sw.shell.Topbar — composable nav bar (title + slot + bell + user menu)
- Topbar CSS in sw-shell.css, wired into SDK via dynamic import

Schedules surface (packages/schedules/):
- Wraps kernel /api/v1/schedules CRUD + run + logs
- Table view with cron badge, human-readable preview, enable toggle
- Create/edit dialog with live cron-to-english preview

Manifest icons:
- icon field in manifest.json (emoji string)
- Surfaces API returns icon from package manifest
- UserMenu renders per-surface icons

UserMenu cleanup:
- Removed dead Chat/Notes/Projects hardcoded links
- Menu now driven by /api/v1/surfaces API (installed surfaces only)
- Core surfaces filtered via CORE_IDS set

Bug fixes:
- isAdmin() in can.js now checks surface.admin.access RBAC grant
  instead of deprecated user.role column (v0.2.0 regression)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 10:16:37 +00:00
parent 57ccf19efb
commit 22c70034c6
25 changed files with 2212 additions and 37 deletions

View File

@@ -123,6 +123,43 @@
flex-direction: column;
}
/* ── Topbar — standard surface navigation bar ── */
.sw-topbar {
display: flex;
align-items: center;
height: 44px;
padding: 0 12px;
background: var(--bg-surface);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
gap: 10px;
}
.sw-topbar__title {
font-weight: 600;
font-size: 0.9rem;
color: var(--text);
flex-shrink: 0;
white-space: nowrap;
}
.sw-topbar__spacer {
flex: 1;
}
.sw-topbar__slot {
display: flex;
align-items: center;
gap: 8px;
}
.sw-topbar__right {
display: flex;
align-items: center;
gap: 8px;
}
/* ── User menu trigger ───────────────────── */
.sw-user-menu__trigger {