Skip to content

fix: browser pipe not added when running dashboard standalone - #6

Merged
jimsynz merged 2 commits into
mainfrom
fix/compose-core-in-subtasks
Mar 23, 2026
Merged

jimsynz merged 2 commits into
mainfrom
fix/compose-core-in-subtasks

Conversation

@jimsynz

@jimsynz jimsynz commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #3

  • Fix find_dev_routes_block AST pattern matching — the old pattern matched a bare :compile_env atom but Sourceror's AST for Application.compile_env(...) uses a dot-call form, so the function never matched any existing dev_routes blocks
  • When an existing dev_routes block is found without live_dashboard, navigate into the scope "/dev" and insert the route + import rather than emitting a warning or creating a duplicate block
  • Ensure subtasks compose their prerequisites (router composes core, dashboard composes endpoint + live) so standalone invocation works correctly

Test plan

  • New test: standalone phx.install.dashboard invocation composes prerequisites and adds :browser pipeline
  • New test: live_dashboard is inserted into an existing dev_routes block without duplication
  • All 157 existing tests pass

jimsynz added 2 commits March 23, 2026 15:04
Router now composes `phx.install.core` and dashboard composes
`phx.install.endpoint` and `phx.install.live` so that running these
tasks standalone sets up the application module and supervision tree.

Closes #4
Fix `find_dev_routes_block` to match the actual Sourceror AST for
`Application.compile_env(...)` — the old pattern matched a bare
`:compile_env` atom call but the real AST uses a dot-call form
(`{{:., _, [{:__aliases__, _, [:Application]}, :compile_env]}, _, args}`).

When an existing dev_routes block is found without `live_dashboard`,
navigate into the scope "/dev" and insert the route + import rather
than emitting a warning or creating a duplicate block.
@jimsynz
jimsynz force-pushed the fix/compose-core-in-subtasks branch from 55446e0 to 332b1cb Compare March 23, 2026 03:08
@jimsynz
jimsynz merged commit bb85ef4 into main Mar 23, 2026
2 checks passed
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.

Browser pipe not added

1 participant