Skip to content

0.3.0

Latest

Choose a tag to compare

@skydoves skydoves released this 18 Sep 13:19
2d9e22a

This release lets the graph build itself: transitions are inferred from your navigation call sites, navDiff renders navigation changes as a picture for pull requests, the graph exports to Mermaid for your README, and navLint adds a health check on the merged graph.

Upgrading will not touch a committed baseline. Inference is on by default, but inferred transitions stay out of the .nav baseline unless you opt in with baselineIncludesInferred = true, so navCheck sees no change. Update the IDE plugin to 0.3.0 to see inferred transitions drawn dashed.

What's Changed

Added

  • Transitions inferred from your navigation call sites (#26): KSP reads declarations only, so it never sees inside entry<Home> { … backStack.add(Feed) }. The new inferNavEdges task scans Kotlin sources for navigation calls inside an entry<Route> { } / composable<Route> { } block or a @NavDestination body and adds what it finds as EdgeConfidence.INFERRED, drawn dashed everywhere so it is never mistaken for a declared edge. Matching is by method name, so a custom wrapper like navigator.add(Detail(id)) works with only the plugin applied. A reference that does not resolve to a known route is dropped, so inference cannot invent a destination, and an explicit @NavEdge always wins.
  • Visual navDiff for pull requests (#26): exportNavDiffHtml and exportNavDiffImage render the graph coloured against the committed .nav baseline, with additions in green, removals as a red dashed ghost node, and changes in amber. It compares the exact lines navCheck compares, so the picture and the build cannot disagree.
  • Mermaid export (#26): exportNavGraphMermaid writes a flowchart that GitHub markdown renders natively, so the navigation graph can live in a README and be regenerated on every build. Declared transitions draw -->, inferred ones -.->.
  • navLint (#27): a health check on the merged graph, where the .nav baseline only reviews change. Reports screens with no path from the start destination, a missing or duplicated start, and routes no @NavDestination binds. Warns by default, and navgraph { failOnNavLint } gates CI.
  • Aggregation keeps the richest copy of a node field by field rather than picking one whole copy by thumbnail count, so an umbrella module that merely referenced a route no longer discards the owning module's click target and source location.
  • IDE: "Show inferred transitions" (Settings → NavGraph → Edges) to hide the dashed edges and see only what @NavEdge declares.

Fixed

  • The IDE plugin installs on Android Studio Rabbit and every later IDE (#28, #29): the plugin declared until-build = "261.*", so IntelliJ platform 262 reported Incompatible: requires IDE build 261.* or earlier and refused to install it, although nothing in the plugin is 262-incompatible. The upper bound is removed rather than raised to 262, and the Plugin Verifier now covers builds through 263, so the range is verified rather than asserted.

Full Changelog: 0.2.1...0.3.0