Fix v0.3.7: tag dashboard + editor as dormant, generalize requires check
Functional audit found dashboard and editor render blank — they depend on the removed sw.* imperative SDK (sw.tabs, sw.chat, sw.layout, etc). Tagged with requires: ["legacy-sdk"] so the installer auto-sets dormant. Generalized the dormant requires check: any unmet requirement now triggers dormant status, not just "chat". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -196,14 +196,14 @@ See `docs/DEMO-WORKFLOWS.md` for full stage definitions and Starlark code.
|
||||
|
||||
### v0.3.7 — Package Audit (complete)
|
||||
|
||||
Verified all 16 packages install correctly. Chat-dependent packages auto-set to dormant.
|
||||
Verified all 16 packages install correctly. Packages with unmet `requires` auto-set to dormant.
|
||||
|
||||
| Step | Status | Description |
|
||||
|------|--------|-------------|
|
||||
| Manifest fixes | ✅ | Fixed 6 chat-extension manifests (`"name"` → `"title"`, was blocking install). Added explicit `"type": "surface"` to hello-dashboard, icd-test-runner, sdk-test-runner. |
|
||||
| Dormant status | ✅ | Added `dormant` to `packages.status` CHECK constraint (both dialects). Installer auto-detects `requires: ["chat"]` and sets `status=dormant, enabled=false`. Enable endpoint returns 409 for dormant packages. |
|
||||
| Browser package audit | ✅ | All 10 standalone packages install and activate: hello-dashboard, dashboard, editor, schedules, tasks, team-activity-log, gitea-client, git-board, icd-test-runner, sdk-test-runner. |
|
||||
| Chat-dependency tagging | ✅ | 6 chat-dependent extensions (csv-table, diff-viewer, js-sandbox, katex-renderer, mermaid-renderer, regex-tester) install as dormant. Excluded from nav, shown with badge in admin. git-board and gitea-client are standalone (not chat-dependent). |
|
||||
| Dormant status | ✅ | Added `dormant` to `packages.status` CHECK constraint (both dialects). Installer auto-detects unmet `requires` and sets `status=dormant, enabled=false`. Enable endpoint returns 409 for dormant packages. |
|
||||
| Functional audit | ✅ | Navigated to every surface in browser. 7 working: schedules, tasks, team-activity-log, git-board, hello-dashboard, icd-test-runner, sdk-test-runner. 2 broken: dashboard + editor (depend on removed `sw.*` imperative SDK) — tagged `requires: ["legacy-sdk"]` → dormant. |
|
||||
| Chat-dependency tagging | ✅ | 6 chat-dependent extensions (csv-table, diff-viewer, js-sandbox, katex-renderer, mermaid-renderer, regex-tester) install as dormant. git-board and gitea-client are standalone. |
|
||||
| Dependency check fix | ✅ | Relaxed library dependency validation to allow `pending_review` libraries (gitea-client declares permissions). Only `suspended`/`dormant` libraries blocked. |
|
||||
| Admin UI | ✅ | Dormant badge, disabled Enable button with tooltip, Dormant stat card in admin packages view. |
|
||||
| Tests | ✅ | 4 handler tests (SetStatus dormant, enable blocked, surfaces exclude dormant, admin list includes dormant). All existing tests pass. |
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"tier": "browser",
|
||||
"author": "Switchboard Core",
|
||||
"icon": "📊",
|
||||
"description": "Project dashboard exercising all SDK primitives",
|
||||
"description": "Project dashboard exercising all SDK primitives (requires legacy sw.* SDK — dormant until rewritten)",
|
||||
"requires": ["legacy-sdk"],
|
||||
"route": "/s/dashboard",
|
||||
"permissions": [],
|
||||
"settings": [
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"tier": "browser",
|
||||
"author": "Switchboard Core",
|
||||
"icon": "✏️",
|
||||
"description": "Code editor with workspace management, file tree, and AI assist",
|
||||
"description": "Code editor with workspace management, file tree, and AI assist (requires legacy sw.* SDK — dormant until rewritten)",
|
||||
"requires": ["legacy-sdk"],
|
||||
"route": "/s/editor",
|
||||
"layout": "editor",
|
||||
"permissions": [],
|
||||
|
||||
@@ -584,21 +584,23 @@ func (h *PackageHandler) InstallPackage(c *gin.Context) {
|
||||
}
|
||||
|
||||
// v0.3.7: Auto-set dormant for packages with unmet requires.
|
||||
isDormant := false
|
||||
// Known capabilities: (none yet — chat and legacy-sdk are future/removed).
|
||||
knownCaps := map[string]bool{}
|
||||
var unmetReqs []string
|
||||
if reqs, ok := manifest["requires"].([]any); ok && len(reqs) > 0 {
|
||||
for _, r := range reqs {
|
||||
req, _ := r.(string)
|
||||
if req == "chat" {
|
||||
isDormant = true
|
||||
break
|
||||
if req != "" && !knownCaps[req] {
|
||||
unmetReqs = append(unmetReqs, req)
|
||||
}
|
||||
}
|
||||
}
|
||||
isDormant := len(unmetReqs) > 0
|
||||
if isDormant {
|
||||
h.stores.Packages.SetStatus(c.Request.Context(), pkgID, "dormant")
|
||||
h.stores.Packages.SetEnabled(c.Request.Context(), pkgID, false)
|
||||
preservedEnabled = false
|
||||
log.Printf("[packages] %s: dormant (unmet requires: chat)", pkgID)
|
||||
log.Printf("[packages] %s: dormant (unmet requires: %v)", pkgID, unmetReqs)
|
||||
}
|
||||
|
||||
resp := gin.H{
|
||||
|
||||
Reference in New Issue
Block a user