Repository navigation
Open
Labels
Description
Problem
This issue remains actionable on current main after the browser preview and runtime overhauls. Two introductory pages still drift from _MAIN_TEMPLATE in src/pythonnative/cli/pn.py:
docs/examples.mdsays the generatedapp/main.py"already returns a small counter." The scaffold is a stack navigator with Home and Detail screens, a counter on Home, an "Open detail" button that passes the count, and a Back button on Detail.docs/getting-started.mdintroduces a different listing as "A minimalapp/main.pylooks like." The actual scaffold also includes aDetailParamsTypedDict,pn.use_route(DetailParams), a themed Home screen inside aScrollView, and the "Open detail" and "Back" buttons.- The navigation paragraph immediately after the getting-started example still says each pushed screen runs in its own reconciler host. The current architecture uses a shared logical application tree; native navigation presents screens while preserving their component state.
Assigned to @ernesthenry. Use the current _MAIN_TEMPLATE as the source of truth, not line numbers or API descriptions from older issues. These source and documentation files have the same content in main and pending PR #86 at the time of this triage.
Requested change
- Describe the scaffold in
docs/examples.mdas a small stack navigator with a counter on Home and a Detail screen. Keep the advice about replacing it with another example. - Replace the getting-started listing with the current
_MAIN_TEMPLATEcontents, including its import, typed route params, labels, and Back button. Introduce it as the filepn initgenerates. - Update the nearby navigation explanation to match the shared logical tree and native screen presentation described in
docs/concepts/architecture.md; remove the per-screen reconciler-host claim.
Keep this a documentation change to those two pages. Don't change the scaffold or runtime APIs. Follow AGENTS.md and the documentation style guide: straight quotes, no em dashes, and CMOS grammar.
Verification
- Scaffold a temporary project with
pn initand compare itsapp/main.pywith the documentation listing. - Follow the documented browser preview steps and verify that the counter, Open detail button, displayed count, and Back button work.
uv run --group docs mkdocs build --strictpasses, and the updated pages render correctly.
Suggested commit message
docs(mkdocs): align introductory docs with the pn init scaffold
Activity
ernesthenry commentedon Sep 3, 2026
Heeello @owenthcarey I would like to work on this
[-]Docs describe the `pn init` scaffold as "a small counter", but it now generates a stack navigator[/-][+]Align the getting-started and examples docs with the current `pn init` scaffold[/+]owenthcarey commentedon Sep 9, 2026
@ernesthenry, I checked this against current
main, and the documentation mismatch is still present. Your assignment stays in place.I've refreshed the issue to match the current scaffold: copy
_MAIN_TEMPLATEinto the getting-started listing, describe the Home/Detail navigator accurately, and update the nearby paragraph that still describes a separate reconciler host for each pushed screen. The browser preview remains the way to try the example. The issue now has a concrete scope so you don't have to reconcile the older API changes yourself.