Fix Trip Editor public progress URL#310
Merged
Merged
Conversation
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.
Summary
Fixes #308.
Root cause: Trip Editor metadata URL generation used
Url.Action("View", "TripViewer", new { area = "Public", ... }). Because the public trip view endpoint is an attribute route, MVC could fall back to the conventional public-area route and generate/Public/TripViewer/View/{tripId}instead of the canonical/Public/Trips/{tripId}route.Before:
https://example.test/Public/TripViewer/View/{tripId}https://example.test/Public/TripViewer/View/{tripId}?progress=1After:
https://example.test/Public/Trips/{tripId}https://example.test/Public/Trips/{tripId}?progress=1Implementation notes:
PublicTripView.Url.RouteUrl(...)against that named route.Url.Action(...)path is no longer masked by a permissive URL-helper mock.Validation
dotnet test tests/Wayfarer.Tests/Wayfarer.Tests.csproj --filter "FullyQualifiedName~TripEditorControllerTests|FullyQualifiedName~TripEditorTagsShareProgressControllerTests|FullyQualifiedName~TripEditorMetadataControllerTests"- passed, 46 testsdotnet build- passed, 0 warnings/errorsdotnet test- passed, 1548 testsdotnet run --project tools/Wayfarer.LocCheck -- --warn 400 --fail 600- passed with existing warning-threshold files; no hard failuresgit diff --check origin/main...HEAD- passedgit ls-files -- .local playwright-report test-results screenshots traces wwwroot/vite/trip-editor wwwroot/dist- no tracked artifacts reportedManual deployed validation is still required after this PR is deployed, because the fix has been validated locally through backend route-generation tests and not against the deployed environment that originally produced the 404.