Skip to content

fix: make page handling registry-only#5

Merged
smiggleworth merged 3 commits into
mainfrom
fix/server-registry-page-handler
Jul 25, 2026
Merged

fix: make page handling registry-only#5
smiggleworth merged 3 commits into
mainfrom
fix/server-registry-page-handler

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Summary\n- require an explicit RouteRegistry for page handling\n- pass the registry through route resolution and rendering\n- add a public type regression rejecting manifest-only page handling\n\nFixes #4\n\n## Validation\n- npm run fmt\n- npm run test:checks\n- npm run test:unit

Copilot AI review requested due to automatic review settings July 25, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes Askr page handling “registry-only” by requiring callers to provide a RouteRegistry (instead of allowing manifest-only configuration), and threads that registry through route resolution and SSR rendering. It also adds a public-contract type regression to prevent reintroducing manifest-only page handler usage, aligning with Issue #4’s “one canonical way” direction.

Changes:

  • Make createAskrPageHandler require an explicit RouteRegistry in its options type.
  • Pass registry through resolveRouteRequest and renderRouteRequest calls (instead of passing manifest).
  • Add a @ts-expect-error regression test rejecting manifest-only page handler construction.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/types/public-contract.ts Adds a type-level regression asserting manifest-only page handler usage is rejected.
src/askr/page-handler.ts Makes page handler options registry-required and switches internal routing/rendering to use the registry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/askr/page-handler.ts
@smiggleworth
smiggleworth merged commit cda2a88 into main Jul 25, 2026
3 checks passed
@smiggleworth
smiggleworth deleted the fix/server-registry-page-handler branch July 25, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants