From a7e38bc72a28ec56a2ee00692488c69f0750e253 Mon Sep 17 00:00:00 2001 From: Jeffrey Smith Date: Thu, 2 Apr 2026 14:46:54 +0000 Subject: [PATCH] Feat v0.7.4 docs surface work (#58) Co-authored-by: Jeffrey Smith Co-committed-by: Jeffrey Smith --- CHANGELOG.md | 57 ++ ROADMAP.md | 16 +- VERSION | 2 +- docs/ARCHITECTURE.md | 11 +- docs/DEPLOYMENT.md | 5 +- docs/EXTENSION-CSS.md | 4 +- docs/EXTENSION-GUIDE.md | 74 ++- docs/FRONTEND-JS-GUIDE.md | 256 ++++++++ docs/GETTING-STARTED.md | 2 +- docs/PERMISSIONS-AND-GROUPS.md | 121 ++++ docs/STARLARK-REFERENCE.md | 232 +++++++ docs/TUTORIAL-FIRST-EXTENSION.md | 4 +- docs/WORKFLOWS.md | 193 ++++++ server/handlers/docs.go | 29 +- src/css/sw-primitives.css | 2 +- src/css/sw-shell.css | 2 +- src/js/sw/surfaces/docs/index.js | 48 +- .../sw/surfaces/team-admin/workflow-editor.js | 337 ++++++++++ .../surfaces/team-admin/workflow-monitor.js | 239 ++++++++ src/js/sw/surfaces/team-admin/workflows.js | 573 +----------------- 20 files changed, 1594 insertions(+), 613 deletions(-) create mode 100644 docs/FRONTEND-JS-GUIDE.md create mode 100644 docs/PERMISSIONS-AND-GROUPS.md create mode 100644 docs/STARLARK-REFERENCE.md create mode 100644 docs/WORKFLOWS.md create mode 100644 src/js/sw/surfaces/team-admin/workflow-editor.js create mode 100644 src/js/sw/surfaces/team-admin/workflow-monitor.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 558e4fd..8f158d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,43 @@ All notable changes to Armature are documented here. +## v0.7.4 — Documentation + Deferred Surface Work + +**Docs Category Grouping** +- Backend `Category` field on `docEntry` struct in `server/handlers/docs.go` +- Frontend sidebar groups docs by category with `.docs-category-heading` CSS +- Four categories: Getting Started, Platform, Extension Development, Operations +- 14 docs in ordered list (was 7 ordered + 3 auto-discovered) + +**New Documentation (4 guides)** +- `PERMISSIONS-AND-GROUPS.md` — RBAC model, 7 permission slugs, system/custom groups, settings cascade, extension permissions +- `WORKFLOWS.md` — Entry modes, stage modes/types/audiences, signoff gates, SLA enforcement, branch rules, Starlark hooks +- `STARLARK-REFERENCE.md` — Sandbox constraints, 10 modules with function signatures and permission gates, example hook script +- `FRONTEND-JS-GUIDE.md` — Preact+htm runtime, 16 SDK modules with API reference, shell topbar patterns, CSS contract + +**Extension Guide Updates** +- `config_section` manifest field documented: schema, backend discovery (`configSectionsForSurface()`), frontend `__CONFIG_SECTIONS__` contract, example component +- Starlark Sandbox API section replaced with pointer to new Starlark Reference + +**Docs Content Refresh** +- GETTING-STARTED: `sb_data` → `armature_data` volume name +- ARCHITECTURE: `sb.register()`/`sb.ns()` → `sw` SDK references, shell topbar mention +- DEPLOYMENT: `sb_storage` → `armature_storage`, added `TLS_MODE` env var +- TUTORIAL-FIRST-EXTENSION: `--bg-2` → `--bg-secondary` CSS variable +- EXTENSION-CSS: self-hosted font notes on `--font` and `--mono` +- `docs.go`: added `AUDIT-` and `USABILITY-` prefix filters for auto-discovery + +**Team Admin Workflows Split** +- `workflows.js` (722 lines) split into 3 ES modules: + - `workflows.js` (~160 lines) — `WorkflowsSection` + `WorkflowsTab` + imports + - `workflow-editor.js` (~240 lines) — `WorkflowEditor` + `StageForm` + - `workflow-monitor.js` (~210 lines) — `AssignmentsTab` + `MonitorTab` + `SignoffPanel` +- External import contract unchanged (default export stays in `workflows.js`) + +**Bug Fixes** +- Docs outline `scrollToHeading` now scrolls `.docs-content` container instead of `scrollIntoView`, preventing topbar from being pushed off-screen +- `--bg-2` (undefined CSS variable) replaced with `--bg-secondary` in `sw-shell.css` and `sw-primitives.css` + ## v0.7.3 — Extension Shell Migration **Shell Topbar Migration** @@ -23,6 +60,26 @@ All notable changes to Armature are documented here. **Roadmap** - Headless E2E automation moved to v0.7.5 (independent from shell migration) +## v0.7.2 — Package Runners + CI Gate + +**Package Runners (5)** +- Notes runner: `requires: ["notes"]`. 3 suites (crud, folders, tags-search), 12 tests +- Chat runner: `requires: ["chat", "chat-core"]`. 2 suites (conversations, messaging), 9 tests +- Schedules runner: `requires: ["schedules"]`. 1 suite (crud), 5 tests +- Workflow runner: `requires: ["content-approval"]`. 1 suite (lifecycle), 5 tests +- Renderer runner: `requires: ["mermaid-renderer"]`. 1 suite (contract), 4 tests + +**Runner Result API** +- `POST /api/v1/admin/test-runners/results` — store structured run results +- `GET /api/v1/admin/test-runners/results` — retrieve latest results per runner +- In-memory store with 4 Go handler tests + +**CI Integration** +- `test-runners` stage in Gitea CI pipeline +- Playwright driver launches headless browser, navigates to `/s/test-runners`, triggers run-all +- `wait-for-healthy.sh` polls `/healthz/ready` before test execution +- DinD networking fix: resolve container IP via `docker inspect` (port mapping not exposed to runner localhost) + ## v0.7.1 — Surface Runner Framework **`sw.testing` SDK Module** diff --git a/ROADMAP.md b/ROADMAP.md index 90dd6dd..6b737c2 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,6 +1,6 @@ # Armature — Roadmap -## Current: v0.7.3 — Extension Shell Migration +## Current: v0.7.4 — Documentation + Deferred Surface Work Self-hosted extensible platform. Auth, identity, packages, Starlark sandbox, storage, realtime, and ops are kernel primitives. Everything else is an extension. @@ -170,11 +170,15 @@ same pattern as the kernel surface migrations. | Step | Status | Description | |------|--------|-------------| -| Permissions & Groups guide | | RBAC model, permission slugs with descriptions, group scoping, settings cascade. | -| Workflows user guide | | Entry modes, stages, team roles, signoff gates, SLA, public forms. | -| Docs content refresh | | Review all 5 existing docs for accuracy at v0.7.x. | -| Extension config section docs | | Document `config_section` manifest field for Settings/Admin extensibility. | -| Team Admin Workflows evaluation | | 723-line inline designer — extract to surface or split into files. Decision doc if needed. | +| Docs category grouping | done | Backend `Category` field on doc entries. Frontend groups sidebar by category with headings. Four categories: Getting Started, Platform, Extension Development, Operations. | +| Permissions & Groups guide | done | RBAC model, 7 permission slugs, system/custom groups, settings cascade, extension permissions. | +| Workflows user guide | done | Entry modes, stages, team roles, signoff gates, SLA, public forms, branch rules, Starlark hooks. | +| Starlark Reference | done | Sandbox constraints, 10 modules with function signatures, permission gates, example hook script. | +| Frontend JS Guide | done | Preact+htm runtime, 16 SDK modules with API reference, shell topbar patterns, CSS contract. | +| Extension config_section docs | done | Manifest schema, backend discovery, frontend contract, example component. Added to Extension Guide. | +| Docs content refresh | done | All 10 user-facing docs reviewed for v0.7.x accuracy: rebrand volume names, stale CSS vars, TLS_MODE env, self-hosted font notes, Architecture frontend section. | +| Team Admin Workflows split | done | 722-line `workflows.js` split into 3 modules: `workflows.js` (router+CRUD), `workflow-editor.js` (editor+stages), `workflow-monitor.js` (assignments+monitor+signoff). | +| Stale CSS variable fix | done | `--bg-2` references in `sw-shell.css` and `sw-primitives.css` replaced with `--bg-secondary`. | ### v0.7.5 — Headless E2E + CI Gate diff --git a/VERSION b/VERSION index f38fc53..0a1ffad 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 950abf7..06fd389 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -271,12 +271,13 @@ graph TD ## Frontend Preact (3KB) + htm (tagged template literals). No build step, no bundler -(except CM6 via esbuild). IIFE/global-namespace pattern with -`sb.register()`/`sb.ns()`. +(except CM6 via esbuild). ES modules loaded via `