§7 comment cleanup (todo §7); targeted density pass over the §7 accretion. The §7 modules were authored dense (the reference plugin is a teaching artifact, the host additions concise), so two wins: tightened chrome.ts's module header (7→5 lines, dropped the input-list duplicated by ChromeOptions + the nav-composition restatement already carried by the nav field/markCurrent comments); fixed a stale forward-ref in docs/plugin-contract.md (the safeUrl() helper said "§5/§7" but §7 deferred it to §9). Left intact: the reference plugin's instructive comments, the EJS view config-doc headers, and the contract doc + plugin README (authored concise in §7). README Status/_(planned)_/Layout refresh stays §9. Docs/comments-only; typecheck + 301 units green.

This commit is contained in:
2026-06-19 15:38:36 +02:00
parent 4e97fb619e
commit 98784a3239
3 changed files with 5 additions and 8 deletions

View File

@@ -1,10 +1,8 @@
// Page chrome for plugin pages (todo §7): the brand / global-nav / user / theme / csrf block a
// plugin view hands to partials/shell so its page looks native — the same shell the dashboard and
// admin screens render. Pure; the host builds it once per plugin request (it has the menu config,
// the discovered plugins, the signed-in user and the request CSRF token) and exposes it on
// ctx.chrome. The nav is the global menu — a Dashboard home link, every discovered plugin's nav
// fragment, and the gated admin section — run through composeNav (override + per-user role filter),
// with the node whose href matches the current path marked `current` (its ancestors opened).
// admin screens render. Pure; the host builds it per plugin request and exposes it on ctx.chrome.
// nav is the global menu — Dashboard + every plugin's fragment + the gated admin section — run
// through composeNav (override + per-user filter) and current-marked for the request path.
import { adminSection } from "./admin-nav.ts";
import type { User } from "./context.ts";