Phase 7b: page render plans — per-page boundary optimizer

Add page-render-plan to deps.sx: given page source + env + IO names,
computes a dict mapping each needed component to "server" or "client",
with server/client lists and IO dep collection. 5 new spec tests.

Integration:
- PageDef.render_plan field caches the plan at registration
- compute_page_render_plans() called from auto_mount_pages()
- Client page registry includes :render-plan per page
- Affinity demo page shows per-page render plans

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 00:02:53 +00:00
parent a70ff2b153
commit 2da80c69ed
14 changed files with 214 additions and 5 deletions

View File

@@ -255,6 +255,7 @@ class PageDef:
fallback_expr: Any = None # fallback content while streaming
shell_expr: Any = None # immediate shell content (wraps suspense)
closure: dict[str, Any] = field(default_factory=dict)
render_plan: dict[str, Any] | None = field(default=None, repr=False)
_FIELD_MAP = {
"name": "name", "path": "path", "auth": "auth",