Skip to content

Fix Trip Editor public progress URL#310

Merged
stef-k merged 4 commits into
mainfrom
fix/trip-editor-public-progress-url-308
May 19, 2026
Merged

Fix Trip Editor public progress URL#310
stef-k merged 4 commits into
mainfrom
fix/trip-editor-public-progress-url-308

Conversation

@stef-k
Copy link
Copy Markdown
Owner

@stef-k stef-k commented May 19, 2026

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:

  • public URL could generate https://example.test/Public/TripViewer/View/{tripId}
  • progress URL generated https://example.test/Public/TripViewer/View/{tripId}?progress=1

After:

  • public URL generates https://example.test/Public/Trips/{tripId}
  • progress URL generates https://example.test/Public/Trips/{tripId}?progress=1

Implementation notes:

  • Named the existing public trip view attribute route as PublicTripView.
  • Updated Trip Editor read-state/metadata generation to use Url.RouteUrl(...) against that named route.
  • Strengthened controller tests so the previous 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 tests
  • dotnet build - passed, 0 warnings/errors
  • dotnet test - passed, 1548 tests
  • dotnet run --project tools/Wayfarer.LocCheck -- --warn 400 --fail 600 - passed with existing warning-threshold files; no hard failures
  • git diff --check origin/main...HEAD - passed
  • git ls-files -- .local playwright-report test-results screenshots traces wwwroot/vite/trip-editor wwwroot/dist - no tracked artifacts reported

Manual 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.

@stef-k stef-k merged commit 14d711c into main May 19, 2026
1 check passed
@stef-k stef-k deleted the fix/trip-editor-public-progress-url-308 branch May 19, 2026 06:15
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.

Fix Trip Editor progress public URL route

1 participant