V1.0.0 Release#13
Merged
Merged
Conversation
Significant refactoring and restructuring of `Router.fs`: - Removed several types and modules, introduced `RouteDisposables` and `RouteInfo.RouteUnit`. - Simplified navigation logic with a new `Navigable` module and `Router` class. - Enhanced state management and navigation capabilities. Introduced `IDisposableBag` interface and updated `RouteContext`: - Added `disposables` field and `addDisposable` method to `RouteContext`. - Introduced `NavigationError<'View>` type for navigation errors. - Modified `NavigationState`, `RouteGuard<'View>`, and `GetView<'View>` types. - Removed `children` field from `RouteDefinition<'View>` and `RouteTrack<'View>` type. - Updated `GuardResponse` and `CacheStrategy` types.
Replaced `ValueTask` with `CancellableValueTask` from `IcedTasks` library across the codebase, including `RouteGuard` and `GetView` delegate types. Updated `navigate` function in `Navigable` module to accept a `token` parameter directly, removing `CancellableTaskResult.getCancellationToken()`. Adjusted `guard.Invoke` and `getContent.Invoke` calls to pass `token` directly. Reordered namespaces in `Router.fs` and `Router.fsi`, removed `Navs` namespace from `Router.fsi`, and added `System.Threading.Tasks` to `Types.fs`.
Updated Navs.Interop with additional open statements. Modified Route's Define method to use cancellableValueTask. Added CanActivate and CanDeactivate methods in Guard module. Refactored Route module in DSL.fs with inline functions. Removed child and children methods from Route type. Updated DSL.fsi to reflect changes in DSL.fs. Converted Route module's cache function to let/val binding.
Updated Navs.fsproj to target .NET 8.0 and 9.0 frameworks and use preview language version. Refactored `navigate` function in `Router.fs` to handle cancellation tokens more robustly, adding multiple checks and appropriate error handling. Introduced `IsNavigationCancelled` active pattern for handling navigation cancellation errors. Updated `Router` type to use `build` method for initialization, reflected in test cases and modules. Refactored `Navigate` method to handle cancellation tokens effectively and ensure state is set to `Idle` if navigation is canceled or fails. Updated `Routes` module in `DSL.fs` to use `GetView` with `ValueTask` for `getContent` function, adding cancellation tokens to test cases. Updated `NavigationState`, `RouteContext`, `Navigation`, `Guards`, and `Cancellation` modules to use `Router.build` method and handle cancellation tokens. Converted `canActivate` and `canDeactivate` functions to asynchronous versions. Updated `NavigateByName` method to check for cancellation before proceeding. Updated `open` statements in `Router.fs` and `DSL.fs` to include necessary namespaces.
- samples/CSharpToo: upgrade Avalonia packages to version 11.1.0 - samples/FuncUI: upgrade Avalonia and FuncUI packages to versions 11.1.0 and 1.5.1 - samples/Routerish: upgrade Avalonia and NXUI packages to version 11.1.0 - src/Navs.Avalonia: upgrade Avalonia package to version 11.1.0 - src/Navs.FuncUI: upgrade Avalonia and FuncUI packages to versions 11.1.0 and 1.5.1 - src/Navs: update FSharp.Data.Adaptive to version 1.2.24 and IcedTasks to version 0.11.8 feat(Routerish): add counter route with state management
- Updated `fantomas` version from `6.3.16` to `7.0.2` in `dotnet-tools.json`. - Added `<Nullable>enable</Nullable>` in `Navs.fsproj`. - Updated `FsToolkit.ErrorHandling` version from `4.18.0` to `5.0.0` in both `Navs.fsproj` and `UrlTemplates.fsproj`.
- Added optional ILogger parameter to AvaloniaRouter, FuncUIRouter, and TerminalGuiRouter constructors for logging capabilities. - Included Microsoft.Extensions.Logging package in multiple project files.
- Introduced `ILogger` parameter to various functions in `Navs.Router`. - Enhanced `navigate` function to log cache hits and route resolutions. - Added logging for guard checks and navigation states. - Updated `attemptRedirect` to log redirect stack and errors. - Modified `Router.build` method to accept an optional logger.
- Introduced a new project for NxuiDeclarative with necessary configurations. - Added a new launch configuration for debugging the NxuiDeclarative sample. - Created a build task for the NxuiDeclarative project.
- Updated route handlers to explicitly return Control type for consistency. - Adjusted "books" route definition for proper type casting. - Ensured "guid" route handler returns Control type.
- Updated Route class to include new constructors for various handler types. - Introduced SyncGuard and AsyncGuard types for route guard functionality. - Refactored method signatures to improve type safety and clarity. - Added documentation comments for better understanding of route functionalities.
- Added optional parameters for initialUri and noView in Routes. - Updated navigateToFirstRoute to use initialUri for navigation. - Improved documentation for Routes constructor. - Introduced initial navigation logic in RouterOutlet with optional logger.
…#15) * chore: move to central package management upgrade version across all the projects surfaces * chore: fix null warning * chore: fix compilation issues * fix compilation issues * samples: upgrade samples to net10.0, Avalonia 12, Terminal.Gui 2.4, NXUI 12 - Bump sample TFMs from net9.0 to net10.0 to match source projects - Upgrade Avalonia 11.x -> 12.0.5 and drop deprecated Avalonia.Diagnostics package - Replace deprecated NXUI.FSharp with NXUI 12.0.0 (use NXUI.Extensions + PascalCase methods) - Upgrade Terminal.Gui to 2.4.11 and drop direct System.Text.Json reference - Bump CSharp.Data.Adaptive to 1.2.26 to align with FSharp.Data.Adaptive - Fix FuncUI counter decrement button (was incrementing instead of decrementing) - Convert Samples.sln to Samples.slnx - Run fantomas across the repo * fix: fix the shit ass edit from the llm
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Resolved Since Last Review
Files Reviewed (3 files)
Previous Review Summaries (3 snapshots, latest commit 7b2396e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 7b2396e)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Resolved Since Last Review
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Previous review (commit c9ea8b6)Status: 6 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Resolved Since Last Review
Additional Notes
Files Reviewed (57 files)
Fix these issues in Kilo Cloud Previous review (commit fe0b96c)Status: 8 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Additional Notes (not inline-commented)
Files Reviewed (57 files)
Reviewed by mimo-v2.5-pro · Input: 38K · Output: 5.7K · Cached: 232.4K |
- add ionide keep a changelog - add a release workflow
… protection, thread-safe cache - Router.fs: dispose previous active route's resources only after activation guards and content resolution pass (was disposed before, leaving a broken view on failed navigations) - Router.fs: protect redirect chains against cycles (visited-pair tracking) and unbounded depth; add optional maxRedirectDepth param to Router.build (default 5) forwarded to attemptRedirect - Router.fs: use ConcurrentDictionary for the route cache so concurrent navigations can't corrupt state - Navs.FuncUI/Library.fs: pass the caught exception to LogError instead of discarding it on initial-navigation failure - TGUI/Extensions.fs: Text cval extension now reads/writes Text, not the copy-pasted Title - UrlTemplates/UrlTemplate.fs: fix 'Requred' typo in error message - docs/Navs/Adapters.md: remove duplicate Router.build call - CHANGELOG.md: add Fixed section and maxRedirectDepth entry
The parameter bounds the number of distinct redirect pairs followed, which guards against redirect cycles (the actual infinite-loop risk). The previous name implied linear chain capping, which is neither intended nor enforced - linear chains terminate on their own. Bound the count via visited.Count instead of the ineffective redirectStack.Count check, and document all build parameters to clear FS3390 xmldoc warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tracking PR is going to stay here as a placeholder while we finish up the v1 release. The RCs and previews will be produced from this branch until v1 is out