AI desktop page: strip unpicked optional sections like the skill does

The merged AI desktop page check filled the no-AI template directly and hit
{{CHECKPOINTS_JSON}}. It now runs sections.py with none picked first. No-AI step 6
names the sections.py run, and the AI skill says how its desktop and web paths get
the checkpoint, admin and login sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
VasanthandClaude Opus 5.5 committed 2026-10-16 15:39:53 +05:30
1 parent 73adc74637
commit 61f7896442
3 files changed
+12 -2

No files matched your search

+3
View File
@@ -70,6 +70,9 @@ pane, the approve gate and the cost page. Ask which extras to add (choose any, o
**checkpoint tracker**, **admin/roles screen**, **login page**, **model picker** (choose
the model per batch), **retry on another model** (for failed runs). Build only the
chosen ones at their `OPTIONAL:` markers, and delete the markers.
- **Checkpoint tracker, admin/roles, login:** web: port them from `<no-ai>dashboard.html`'s
`OPTIONAL:` blocks. Desktop: they're already in the no-AI page; `<no-ai>sections.py` keeps
the chosen ones (no-AI step 6), and `<no-ai>sections.md` says what each needs from the host.
- **Model picker:** a `<select>` filled from `GET /models` (the pricing table's keys), at
the marker in `Cost.tsx` (desktop: `ai_sections.html`) or next to the Run button; the chosen model goes with the
batch's start action. Remember the last choice per user.
+2
View File
@@ -89,6 +89,8 @@ to answer.
- Web: put it in the backend's static folder. With no backend yet, use
`dashboard/dashboard.html`.
- Existing frontend: put it where `templates/frontend.md` section 3 says.
Then run `python templates/sections.py <copied dashboard.html> <chosen sections>` (step 5).
2. Fill every `{{...}}` placeholder:
| Placeholder | Value |
+7 -2
View File
@@ -3,7 +3,8 @@ AI sections (rpa-dashboard-ai/templates/desktop/ai_sections.html) pasted in befo
Page under test: set PAGE_CHECK_AI_DESKTOP_DIR to a generated dashboard folder (the one with
dashboard.html and server_stub.py). Without it, the no-AI template is filled with the no-AI
check's TEST_FILL and the AI sections are pasted in, the way the skill does it.
check's TEST_FILL with no optional sections (sections.py) and the AI sections are pasted in,
the way the skill does it.
The page sees a fake Qt bridge, as in the no-AI check: each slot call lands in window.__calls.
The AI slot, ai_request(id, method, path, body), goes to the review backend's dispatch() in
@@ -57,7 +58,11 @@ def site(tmp_path_factory):
"""The dashboard folder under test: dashboard.html, server_stub.py and bands.py."""
if os.environ.get("PAGE_CHECK_AI_DESKTOP_DIR"):
return Path(os.environ["PAGE_CHECK_AI_DESKTOP_DIR"]).resolve()
html = re.sub(r"\{\{(\w+)\}\}", lambda m: TEST_FILL[m[1]], NO_AI.read_text(encoding="utf-8"))
spec = importlib.util.spec_from_file_location("sections", NO_AI.with_name("sections.py"))
sections = importlib.util.module_from_spec(spec)
spec.loader.exec_module(sections)
html = sections.keep(NO_AI.read_text(encoding="utf-8"), []) # no optional sections picked
html = re.sub(r"\{\{(\w+)\}\}", lambda m: TEST_FILL[m[1]], html)
if WIRED:
html = html.replace("const SAMPLE_DATA = true", "const SAMPLE_DATA = false")
sections = (AI / "desktop" / "ai_sections.html").read_text(encoding="utf-8")