Skip to content

Align admin routing docs and tab-path conventions with implementation - #487

Merged
ddon merged 1 commit into
BeamLabEU:devfrom
mdon:dev
Apr 12, 2026
Merged

Align admin routing docs and tab-path conventions with implementation#487
ddon merged 1 commit into
BeamLabEU:devfrom
mdon:dev

Conversation

@mdon

@mdonmdon commented Apr 11, 2026

Copy link
Copy Markdown
Contributor
  • Rewrite custom-admin-pages.md with explicit anti-pattern section covering layout loss and cross-live_session navigation failure modes
  • Correct claim that dynamic segments require a route module; tab_to_route/1 splices paths verbatim, so live_view: on a tab supports :id/:slug via visible: false hidden tabs (as real modules like posts/catalogue do)
  • Correct claim that admin_routes/0 accepts controller/forward/scope; the quoted block is spliced inside live_session :phoenix_kit_admin which only permits live declarations — redirect non-LiveView routes to generate/1 or public_routes/1 with phoenix_kit_sync and phoenix_kit_publishing as refs
  • Fix Mix task name (phoenix_kit.gen.admin.page) and argument shape in Igniter generator section to match actual parse_args/2 in the task
  • Fix LayoutWrapper attr name from url_path to current_path in AGENTS.md and remove non-existent current_locale_base example
  • Convert tab-path examples to the relative-form convention used by every real plugin across ADMIN_README.md, dashboard/README.md, tab.ex moduledoc, dashboard.ex, registry.ex, config.ex, tabs_initializer.ex, and the two dev_docs guides
  • Convert the built-in jobs tab from absolute to relative path form for consistency with the rest of the ecosystem
  • Add historical-exploration banner to 2025-12-30 routing-architecture guide so readers know Strategy 1 was not adopted
  • Add cross-session caveat note to PHOENIXKIT_AWS_COMPATIBILITY.md explaining the full-page-reload limitation of the override pattern
  • Fix Igniter generator After Generation section to stop teaching a separate-live_session pattern that recreates the known bug

Motivation: these docs were drifting ahead of the implementation and would have led module authors into the exact "parent-router hand-registration" bug class (layout loss + cross-live_session navigation crash) that we just finished warning against in every other file. Every claim here is now traceable to a file:line ref in integration.ex, auth.ex, tab.ex, or layout_wrapper.ex.

- Rewrite custom-admin-pages.md with explicit anti-pattern section covering
layout loss and cross-live_session navigation failure modes
- Correct claim that dynamic segments require a route module; tab_to_route/1
splices paths verbatim, so live_view: on a tab supports :id/:slug via
visible: false hidden tabs (as real modules like posts/catalogue do)
- Correct claim that admin_routes/0 accepts controller/forward/scope; the
quoted block is spliced inside live_session :phoenix_kit_admin which only
permits live declarations — redirect non-LiveView routes to generate/1 or
public_routes/1 with phoenix_kit_sync and phoenix_kit_publishing as refs
- Fix Mix task name (phoenix_kit.gen.admin.page) and argument shape in
Igniter generator section to match actual parse_args/2 in the task
- Fix LayoutWrapper attr name from url_path to current_path in AGENTS.md
and remove non-existent current_locale_base example
- Convert tab-path examples to the relative-form convention used by every
real plugin across ADMIN_README.md, dashboard/README.md, tab.ex moduledoc,
dashboard.ex, registry.ex, config.ex, tabs_initializer.ex, and the two
dev_docs guides
- Convert the built-in jobs tab from absolute to relative path form for
consistency with the rest of the ecosystem
- Add historical-exploration banner to 2025-12-30 routing-architecture guide
so readers know Strategy 1 was not adopted
- Add cross-session caveat note to PHOENIXKIT_AWS_COMPATIBILITY.md explaining
the full-page-reload limitation of the override pattern
- Fix Igniter generator After Generation section to stop teaching a
separate-live_session pattern that recreates the known bug
Motivation: these docs were drifting ahead of the implementation and would
have led module authors into the exact "parent-router hand-registration"
bug class (layout loss + cross-live_session navigation crash) that we just
finished warning against in every other file. Every claim here is now
traceable to a file:line ref in integration.ex, auth.ex, tab.ex, or
layout_wrapper.ex.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ddon
ddon merged commit fda20cc into BeamLabEU:devApr 12, 2026
Sign up for freeto 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

@mdon@ddon