KaiselRouter.set(...) and KaiselNavigator.restoreStack(...) do the same thing under different names.
From context.shell().current you only get a KaiselNavigator, so code that deliberately assigns a branchs stack reads as state restoration:
// "pop this tab back to its root" when the active tab is tapped again
shell.current.restoreStack([DashboardTabRoute(item)]);
versus the equivalent at the root:
router.set([SomeRoute()]);
restoreStack is the right name for its other caller (state restoration), but at a deliberate-assignment call site it misleads — a reviewer reasonably asks what is being restored.
Suggestion
Add set to KaiselNavigator as an alias for restoreStack, or rename for symmetry and keep the old name deprecated for a release. Small, but it is on the path anyone building a branched shell with "tap active tab to reset" behaviour will walk.
KaiselRouter.set(...)andKaiselNavigator.restoreStack(...)do the same thing under different names.From
context.shell().currentyou only get aKaiselNavigator, so code that deliberately assigns a branchs stack reads as state restoration:versus the equivalent at the root:
restoreStackis the right name for its other caller (state restoration), but at a deliberate-assignment call site it misleads — a reviewer reasonably asks what is being restored.Suggestion
Add
settoKaiselNavigatoras an alias forrestoreStack, or rename for symmetry and keep the old name deprecated for a release. Small, but it is on the path anyone building a branched shell with "tap active tab to reset" behaviour will walk.