Repository navigation
feat(dashboard): serve an operator's own pages from the panel-templates folder - #19656
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that every sandbox mode, including Windows and off, seals [DESIGN-REVIEWED] a7b959c Description read[DESCRIPTION-READ] 0ddac2fa184c1e4459581aa6e8ca6388f7a84448bd812b3cc875544dccef594b That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (7 items) — 7 justifiedIntent: let an operator put their own dashboard page in the data home's
[FIRST-PRINCIPLES-REVIEWED] a7b959c Description read[DESCRIPTION-READ] 15876646028ad7e72d52e2916ebb5adaffc1db21383d3bd41b30a2f01d7db762 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
cccfa05 to
9706834
Compare
|
|
Disposition: rebutted (answer to the PASS punchline).
|
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
5777f83 to
88a2db3
Compare
|
|
Answer to the PASS punchline: rebutted, no new residual.
|
88a2db3 to
a7b959c
Compare
|
|
|
|
|
Answer to the PASS punchline: confirmed, and intended.
|
|
Answer to the PASS punchline: rebutted, no new residual.
|
Problem / Motivation
Goal: An operator can put their own dashboard page in the data home's
panel-templatesfolder, and a crewmate's Dashboard tab can show it.Today the dashboard catalog serves only the pages that ship with the product. A person who writes their own page has no place to put it. The only way to show it is to drop it into the source tree.
Why it matters
Decision 3 of the second 2026-10-12 amendment in
docs/request-for-change/rfc-crewmate-dynamic-dashboard.mdsays an operator's own page renders, from one folder. Without this change that decision has no code. A page kept in the source tree is lost on the next clean checkout or package upgrade.Not a goal
panelfold per owner.security/paths.py.What changed (motivation → approach → change)
A page the operator writes can show on a crewmate's Dashboard tab. They put it in the data home's
panel-templatesfolder, the one the panel's own template overrides already use. No agent can write that folder, so a page there is one a person put there. The dashboard catalog reads it as a second root.dashboard_templates/builtin/<id>/builtin<data home>/panel-templates/<id>/userA page there is a directory with
manifest.jsonandtemplate.html, in the shipped format. Panel overrides stay<id>.htmlfiles. The two never collide: panel discovery reads only.htmlfiles, and the catalog reads only directories.catalog.pyscans both roots. An operator page must say"source": "user"; the existing source check refuses anything else. Each refusal goes into the catalog'sproblemslist, and the other pages still load:agent_panel.override_templates_dir.manifest.jsonortemplate.htmlis refused.instance.pymakesRENDERABLE_SOURCESholdbuiltinanduser.sharedstays out. The page bytes still come from the catalog by id, never from the crewmate's stored copy, and the frame, CSP and sandbox are the same for both origins._trusted_pageindashboard/handlers/member_dashboard.pyrefuses a page whose catalog origin differs from the stored record's source. So if a release ships an id an operator page already uses, the tab shows nothing instead of a different page.The decision is decision 3 of the second 2026-10-12 amendment in
docs/request-for-change/rfc-crewmate-dynamic-dashboard.md, on main since #19609.The folder's existing fences already cover a page one level down. The new tests pin each of them. The registry rules in
docs/system-specs/modules/dashboard-instances.mdanddashboard_templates/builtin/README.mddescribe the two roots.Backwards compatibility
Compatible: every shipped page loads and renders as before. An operator folder that holds only
<id>.htmlpanel overrides adds no dashboard page and no problem.Removes nothing: the change adds a root and a renderable source; no page, key, route or record goes away.
Tests
test/test_dashboard_operator_pages.pyis new. It runs on a scratch data home only. It locks in:user; an absent folder is empty, not a problem;builtinclaim in the operator folder is refused, and auserclaim in the shipped folder too;.htmloverride do not see each other;_trusted_pageserves the operator page from the folder, not from a tampered stored copy, and refuses one that was removed or whose id a shipped page later takes;panel-templates/<id>/is refused and a read is allowed, and the sandbox read-only seal, pre-create, no-alias and classification entries cover the folder.test/test_dashboard_tools.pypins the two-value renderable set and keeps asharedrecord refused at adopt.Determinism: the new file passed 3 times in a row with
-n0, once with its tests in reverse order, and once under-n 4. 13 of its 20 tests failed on the tree before the change.Manual verification
N/A — unit coverage sufficient: the change is backend catalog logic and its fences, and the tests drive the real catalog, store and render path.
Related Issues
Part of #18642
Merge order: this PR does not depend on the default-page PR or the flag-removal PR, and it can land any time after #19609.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)