Changeset 0.37.19 (#232)

Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
2026-03-25 00:26:44 +00:00
committed by xcaliber
parent 54ceeb4299
commit be67feaa8e
21 changed files with 173 additions and 88 deletions

View File

@@ -81,7 +81,7 @@ mounts into the `#extension-mount` container:
if (!mount) return;
var manifest = window.__MANIFEST__ || {};
var user = window.__USER__ || {};
var user = window.sw?.auth?.user || {};
mount.innerHTML = '<h1>Hello, ' + esc(user.display_name || user.username) + '!</h1>';
@@ -115,7 +115,7 @@ available when your script executes:
| Global | Type | Description |
|--------|------|-------------|
| `window.__MANIFEST__` | Object | Your surface's manifest with route, layout, etc. Keys are **lowercase** (JSON serialization from Go). Access as `manifest.id`, `manifest.route`, `manifest.title`. |
| `window.__USER__` | Object | Authenticated user: `{ username, display_name, role, id, email }`. |
| `window.sw.auth.user` | Object | Authenticated user (via SDK): `{ username, display_name, role, id, email }`. Requires SDK boot. |
| `window.__BASE__` | String | URL base path (e.g. `"/dev"` or `""`). Prepend to all internal links. |
| `window.__VERSION__` | String | Platform version string. |
| `window.__SURFACE__` | String | Your surface ID. |
@@ -280,7 +280,7 @@ When your surface loads, the page DOM looks like this:
</div>
</div>
<script>window.__MANIFEST__ = {...};</script>
<script>window.__USER__ = {...};</script>
<!-- User available via sw.auth.user after SDK boot -->
<script src="/js/api.js"></script>
<script src="/js/ui-core.js"></script>
... platform scripts ...
@@ -447,7 +447,7 @@ working example that demonstrates:
- Manifest structure
- Mounting into `#extension-mount`
- Reading `__MANIFEST__` and `__USER__`
- Reading `__MANIFEST__` and `sw.auth.user`
- Using `UI.toast()` for notifications
- Using `API._get()` for authenticated requests
- Using CSS custom properties for theming

View File

@@ -52,7 +52,7 @@ v0.9.xv0.28.7 Foundation through Platform Polish ✅
│ v0.37.4 Shell ✅ │
│ v0.37.516 Surfaces ✅ │
│ v0.37.1718 Surfaces ✅ │
│ v0.37.19 Tag
│ v0.37.19 Tag
│ │ │
v0.38.0.4 │ │
Extension │ │
@@ -95,11 +95,12 @@ v0.9.xv0.28.7 Foundation through Platform Polish ✅
---
## UI Rewrite Track
## UI Rewrite Track
Scorched earth rebuild of the frontend on Preact+htm. Three-layer
architecture (Primitives → SDK → Shell) replacing the imperative
DOM manipulation codebase. See `UI redesign.md` for full design doc.
**Complete as of v0.37.19.**
Depends on: v0.36.0 (OpenAPI spec), v0.31.2 (SDK composability).
@@ -204,7 +205,7 @@ Each surface rebuilt as Preact component tree. Old JS deleted per surface.
| v0.37.16 | Projects surface ✅ | Card grid + detail, inline ChatPane, context menu, sidebar pickers, deep-link |
| v0.37.17 | Workspaces ✅ | Workspace-first project file storage, tree browser UI, archive upload/download |
| v0.37.18 | Debug / model surface ✅ | Debug modal Preact rebuild (CR P2-5), default workspace, tool_output auto-save, save-to-workspace bridge, model/provider polish |
| v0.37.19 | Tag | Light mode CSS audit, dead code hunt, all features verified; `sw.can()` RBAC gates across surfaces (CR P2-1), `__USER__`/`__PAGE_DATA__` removal (CR P2-4), `_getScale``sw.shell.getScale()` (CR P3-3) |
| v0.37.19 | Tag ✅ | `sw.can()` RBAC gates (CR P2-1), `__USER__`/`__PAGE_DATA__` removal (CR P2-4), `_getScale``sw.shell.getScale()` (CR P3-3), light mode CSS audit, dead code sweep |
**v0.37.14 — Scorched Earth IV + Pane Audit ✅** (10 sessions, v0.37.14.0.22):
@@ -255,10 +256,14 @@ auto-save (file refs linked to assistant messages). Save-to-workspace bridge
(save code blocks to workspace). Model selector health dots. Provider test
buttons (BYOK + admin). repl.js absorbed into Preact. sw-debug.css extracted.
**v0.37.19 — Tag ("UI Complete"):**
**v0.37.19 — Tag ("UI Complete"):**
`sw.can()` RBAC gates, `__USER__`/`__PAGE_DATA__` removal, `_getScale` SDK,
light mode CSS audit, dead code hunt. Every capability has a UI.
`sw.can()` RBAC gates on chat, settings, and KB surfaces (CR P2-1). Settings
policies migrated from `__PAGE_DATA__` to `sw.auth.policies`; `__USER__` and
`__PAGE_DATA__` injections removed from `base.html` (CR P2-4). `_getScale()`
moved to `sw.shell.getScale()` SDK (CR P3-3). Light mode CSS audit clean.
Dead code sweep clean. P3-17/P3-19 documented as intentional. Every
capability has a UI.
---