Skip to content

refactor: migrate to navigation 3 - #90

Merged
OffRange merged 22 commits into
v2from
refactor/navigation-3
Sep 1, 2026
Merged

OffRange merged 22 commits into
v2from
refactor/navigation-3

Conversation

@OffRange

@OffRange OffRange commented Sep 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

OffRange and others added 22 commits August 31, 2026 16:04
The old `RouteDestination` interface only existed to hand nav-2 a
graph destination, which nav-3 keys do not need. Its replacement is
the shared entry decorators every back stack is rendered with.

`URI_PATTERN` went with the nav-2 deep link syntax; the `otpauth`
scheme and host it encoded are now named on their own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nJBXmDWn2x1xS4dTi458g
The list kept a highlight of its own and only cleared it when auto
selection turned off, so a detail dropped from the back stack behind
it left a row marked as open with an empty pane beside it.

`resetHighlight()` becomes `setHighlight(itemId)`, and the caller
that owns the pane passes what it is showing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nJBXmDWn2x1xS4dTi458g
Every feature exported a `NavGraphBuilder` extension that built a
nav-2 graph. Each is now an `EntryProviderScope<NavKey>` extension
adding the same screens as nav-3 entries, taking the metadata its
host wants to attach to them.

The activities that hosted a graph of their own (autofill, create
and provide passkey) drive a `NavBackStack` and a `NavDisplay`
instead of a `NavController` and a `NavHost`.

Route keys move next to the entries that read them and are plain
`NavKey`s. They stay flat: a back stack key is saved with
kotlinx.serialization, so the pending TOTP import travels as
primitives rather than as a nested field.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nJBXmDWn2x1xS4dTi458g
The navigation bar and the create button used to be switched on by
reading the shape of the back stack, which meant every new screen
had to be thought about in that one place.

A destination now carries its own shell as nav-3 metadata, resolved
against the current window: `Always`, `Never`, or `BesideListPane`
for a detail that only keeps the shell while the list is up. A
destination that declares nothing owns the whole window, so a screen
added without a policy shows up bare rather than borrowing chrome it
was never checked against.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nJBXmDWn2x1xS4dTi458g
The single `NavHost` becomes a `NavDisplay` over state the app owns:
a launch stack carrying whatever has to happen before the app proper
(unlocking, first run, an incoming `otpauth://` link), and one back
stack per navigation bar destination.

Each destination keeps its own history, so switching tabs and coming
back lands where the user left off. Picking the tab already showing
is what pops it to its base. Nothing sits under a base, so back from
there closes the app rather than walking out through destinations
already moved on from.

`AppNavigator` is the only thing that writes to those stacks, which
puts the rules for what replaces what in one place: a detail swaps
rather than stacks, the edit form stacks on the item it edits, and
an auto-selected detail is dropped when the window narrows enough to
hand it the whole screen.

The dashboard's two panes are a list-detail scene over one stack
instead of the old nested graph plus `DetailType`, and the item the
detail pane holds is what the list highlights.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nJBXmDWn2x1xS4dTi458g
@OffRange
OffRange merged commit ae1e2e3 into v2 Sep 1, 2026
9 checks passed
@OffRange
OffRange deleted the refactor/navigation-3 branch September 1, 2026 18:35
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.

1 participant