Skip to content

Delete render.py's HTML generation and the HTML routes #540

Description

@eaitbrahim

Spec: docs/superpowers/specs/2026-08-23-web-ui-rewrite-design.md § What this deletes.

Depends on #537 (parity) and #539 (glossary link).

keel/web/render.py is 872 lines of server-side HTML. Once the client renders from #534's API, the server does no rendering — as in the reference architecture, its job is static files with correct headers plus JSON.

The ordering constraint

#533's API pins must exist before these HTML pins are removed. tests/commands/test_console_thinness.py currently pins keel/web/ with the same rules it applies to the console layer, and that property — "a THIRD renderer over the same reports, never a second place that computes them", as render.py's own docstring puts it — must transfer to the API layer rather than lapse in the gap.

Deleting the renderer before the replacement is pinned would leave a window where nothing enforces the invariant, which is precisely the invariant worth keeping.

Scope

keel/web/security.py is untouched. All five of its layers stay exactly as they are.

Acceptance

  • render.py no longer generates HTML; the module is removed or reduced to nothing that renders.
  • keel/web/server.py serves static assets and JSON only.
  • test_console_thinness.py pins the API layer, and the pin count does not drop.
  • Every security test in security.py's suite passes unmodified.
  • keel serve opens a working browser UI with no server-rendered HTML in the response.
  • Nothing in keel/commands/ gained rendering logic as a side effect of the move.

Metadata

Metadata

Assignees

Labels

toolingDev/release tooling (Docs, CI & tooling)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions