Skip to content

[codex] Align README mountApp examples with app registration#199

Merged
samlaycock merged 1 commit into
mainfrom
codex/issue-192-readme-mountapp-app
May 19, 2026
Merged

[codex] Align README mountApp examples with app registration#199
samlaycock merged 1 commit into
mainfrom
codex/issue-192-readme-mountapp-app

Conversation

@samlaycock

Copy link
Copy Markdown
Owner

Summary

Closes #192.

Updates the README Quick Start mountApp(...) examples so wrapper components, custom not-found UI, and navigation behavior options continue passing the explicitly registered app through the options object.

The docs site quick-start examples already used mountApp(root, { app, component: ... }), so the implementation change is limited to the README. I also added regression coverage to the existing docs package-name test to check the README examples alongside the docs-site examples.

Root Cause

The README introduced explicit app registration with mountApp(root, { app }), but the follow-up examples omitted app when adding component, notFound, scrollRestoration, and focusManagement options. That made registered-app setup look optional in examples that build on the same app entry.

Validation

  • bun test tests/docs-package-names.test.ts
  • bun fmt
  • bun lint:fix
  • bun test
  • bun typecheck
  • bun lint

Changeset

Added .changeset/registered-app-readme-examples.md as a patch changeset for the documentation update.

Update the README wrapper, not-found, and navigation behavior examples to keep passing the explicitly registered app into mountApp.

Add docs regression coverage so README examples stay aligned with the registered-app setup.
@samlaycock
samlaycock marked this pull request as ready for review May 19, 2026 20:28
@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes four README mountApp code examples that omitted the registered app from the options object, making it look as though explicit app registration was optional in examples that build on it.

  • Each affected snippet now includes import { app } from "./app" and passes app as the first option, matching the pattern already used on the docs site.
  • Regression assertions were added to tests/docs-package-names.test.ts covering all five README mountApp patterns, using the existing readDoc/normalizeWhitespace helpers.
  • A patch changeset is included.

Confidence Score: 5/5

Documentation-only change with no runtime code modified; all four updated examples are consistent with the existing docs-site patterns.

All changes are confined to README prose and a test file. The README examples now consistently pass app through the options object, and the new test assertions correctly exercise each updated pattern via normalizeWhitespace. No logic, API, or package surface has changed.

No files require special attention.

Important Files Changed

Filename Overview
README.md Four mountApp examples updated to include the registered app in the options object, with matching import { app } from "./app" statements added to each snippet.
tests/docs-package-names.test.ts Regression assertions added for all five README mountApp patterns; reads README via the existing readDoc/normalizeWhitespace helpers that collapse whitespace, so multi-line blocks match correctly.
.changeset/registered-app-readme-examples.md Patch changeset added for the documentation fix; correctly targets the litzjs package.

Reviews (1): Last reviewed commit: "docs: align readme mountApp examples" | Re-trigger Greptile

@samlaycock
samlaycock merged commit ae24178 into main May 19, 2026
2 checks passed
@samlaycock
samlaycock deleted the codex/issue-192-readme-mountapp-app branch May 19, 2026 20:37
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.

Keep README mountApp wrapper examples aligned with explicit app registration

1 participant