Skip to content

feat: add set alias to KaiselNavigator - #75

Open
awishere wants to merge 1 commit into
Mastersam07:devfrom
awishere:codex/add-navigator-set-alias
Open

feat: add set alias to KaiselNavigator#75
awishere wants to merge 1 commit into
Mastersam07:devfrom
awishere:codex/add-navigator-set-alias

Conversation

@awishere

@awishere awishere commented Aug 4, 2026

Copy link
Copy Markdown

Closes #73.

Adds set(...) as an assignment-oriented alias for restoreStack(...) on
the type-erased KaiselNavigator API.

The alias delegates to the existing restoration path, preserving route type
validation, guards, and history behavior. The strongly typed
KaiselRouter<R>.set(List<R>) API remains unchanged.

A regression test covers assigning a stack through a value statically typed
as KaiselNavigator.

Testing:

  • dart format --output=none --set-exit-if-changed .
  • dart analyze packages/kaisel_core packages/kaisel packages/kaisel_devtools packages/kaisel_lint/lib packages/kaisel_lint/test
  • dart test in packages/kaisel_core
  • flutter test --no-pub --coverage test/.test_optimizer.dart in packages/kaisel
  • flutter test --no-pub --coverage test/.test_optimizer.dart in packages/kaisel_devtools
  • dart test --coverage=coverage in packages/kaisel_lint

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (55ee3ec) to head (dc0f119).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #75   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         2322      2323    +1     
=========================================
+ Hits          2322      2323    +1     
Flag Coverage Δ
kaisel 100.00% <100.00%> (ø)
kaisel_core 100.00% <100.00%> (ø)
kaisel_devtools 100.00% <100.00%> (ø)
kaisel_lint 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

chore: alias set() onto KaiselNavigator for symmetry with KaiselRouter

1 participant