templating.dev_template_reload

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Internal planner for live-preserving development template reloads.

This module deliberately stops before browser mutation. It snapshots Kida's structural manifests, invalidates the real environment after a file edit, and classifies the edit as …

Internal planner for live-preserving development template reloads.

This module deliberately stops before browser mutation. It snapshots Kida's structural manifests, invalidates the real environment after a file edit, and classifies the edit aspatch, diagnose, or reload. A patch plan is only permission to re-request the real route through htmx; it never contains rendered HTML and still requires response validation before a swap.

templating.dev_template_reload

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

TemplateReloadTarget
class

One frozen fragment-target mapping relevant to a template block.

TemplateReloadEntry
class

Immutable source-backed Kida structure used by the planner.

TemplateReloadInventory
class

Frozen reachable-template inventory for one planner connection.

TemplateReloadSurface
class

Browser/route facts that must be proven before a patch is eligible.

Defaults intentionally fail closed. The later browser adapter owns collecting these facts; the planner never guesses them from source text. connection_boundary_targetscontains a connection owner plus any target at or above that owner, all of which are forbidden patch targets.

TemplateReloadPlan
class

Redacted planner decision; never a render payload.

build_template_reload_inventory
function
def build_template_reload_inventory(env: Environment, program: HypermediaProgram | None, fragment_targets: FragmentTargetRegistry | None) -> TemplateReloadInventory

Compile source-backed reachable templates from frozen app state.

The hypermedia program remains the reachability authority. This function does not scan template directories and skips package/opaque loader entries that do not expose a filename.

Parameters

Name Type Default Description
env Environment
program HypermediaProgram | None
fragment_targets FragmentTargetRegistry | None
TemplateReloadPlanner
class

Serialize template edits and publish monotonic redacted decisions.

View source · /home/runner/work/chirp/chirp/site/../src/chirp/templating/dev_template_reload.py:1