Feat v0.7.3 extension shell migration
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 7s
CI/CD / test-sqlite (pull_request) Successful in 2m48s
CI/CD / test-go-pg (pull_request) Successful in 2m53s
CI/CD / build-and-deploy (pull_request) Successful in 1m8s

Migrate Chat, Notes, and Schedules from legacy sw.shell.Topbar to the
v0.7.0 shell topbar contract (sw.shell.topbar.setTitle/setSlot),
eliminating double topbars on all extension surfaces.

- Chat v0.3.0: reactive slot for thread title + People button
- Notes v0.9.0: slot for New/Import/Graph buttons
- Schedules v0.2.0: reactive slot for count + New button
- 6 new shell-topbar runner tests (2 per surface)
- Headless E2E deferred to v0.7.5

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 12:52:40 +00:00
parent d6c7b21713
commit 4a6109b74f
18 changed files with 188 additions and 58 deletions

View File

@@ -5,7 +5,7 @@
* this surface talks directly to the core scheduled-tasks endpoints.
*
* SDK usage:
* sw.shell.Topbar — standard navigation bar
* sw.shell.topbar — shell topbar API
* sw.ui.* — primitive components
* sw.api.* — raw REST calls to /api/v1/schedules
*/
@@ -39,7 +39,6 @@
var { useState, useEffect, useCallback } = hooks;
var { render } = preact;
var { Button, FormField, Dialog, Spinner, Banner } = sw.ui;
var Topbar = sw.shell?.Topbar;
// ── API helpers (core kernel endpoints) ────
var API = '/api/v1/schedules';
@@ -365,6 +364,16 @@
useEffect(function () { loadItems(); }, []);
// ── Shell topbar ───────────────────────────
useEffect(function () {
if (!sw.shell?.topbar) return;
sw.shell.topbar.setTitle('Schedules');
sw.shell.topbar.setSlot(html`
<span class="ext-schedules-count">${items.length} schedule${items.length !== 1 ? 's' : ''}</span>
<${Button} variant="primary" size="sm" onClick=${() => setEditing({})}>+ New Schedule<//>
`);
}, [items.length]);
function handleSave() {
setEditing(null);
loadItems();
@@ -372,17 +381,6 @@
return html`
<div class="ext-schedules-app">
${Topbar ? html`
<${Topbar} title="Schedules">
<span class="ext-schedules-count">${items.length} schedule${items.length !== 1 ? 's' : ''}</span>
<${Button} variant="primary" size="sm" onClick=${() => setEditing({})}>+ New Schedule<//>
<//>
` : html`
<div class="ext-schedules-header">
<h1>Schedules</h1>
<${Button} variant="primary" size="sm" onClick=${() => setEditing({})}>+ New Schedule<//>
</div>
`}
${error && html`<${Banner} variant="danger" text=${error} />`}

View File

@@ -2,7 +2,7 @@
"id": "schedules",
"title": "Schedules",
"type": "full",
"version": "0.1.0",
"version": "0.2.0",
"tier": "browser",
"author": "Armature",
"icon": "⏰",