Feature/gh 286 post login user journey workspace - #293
Merged
PhilipWoulfe merged 10 commits intoJul 9, 2026
Conversation
added 9 commits
July 7, 2026 20:10
…ata is partial to prevent PRESEASON_CALCULATED_MISSING gh-286: fix Phil preseason question classification so bonus wording does not map PRE-* rows to RaceBonus
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the “post-login user journey workspace” by introducing role-based landing redirects, a persisted competition/season context selector, and a new competition leaderboard (with admin comparison + participant drilldown) backed by migration-run data.
Changes:
- Add configurable post-login routing and update Home/NavMenu to route users into the appropriate workspace.
- Add selection-context persistence (browser storage) and wire it into Race Selection + Results pages (including deep-linking).
- Introduce a new competition leaderboard API + UI (admin compare view, recent migration runs strip, participant drilldown) and expand test coverage across Web/API/worker.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/F1.Web.Tests/ResultsTests.cs | Updates Results tests to cover leaderboard UI, empty states, admin compare, drilldown, and query restore. |
| tests/F1.Web.Tests/RaceSelectionTests.cs | Updates race-selection tests for context persistence + driver-select targeting via a CSS class. |
| tests/F1.Web.Tests/NavMenuTests.cs | Adjusts nav tests for /selection route (context-restoring entrypoint). |
| tests/F1.Web.Tests/HomeTests.cs | Adds tests for role-based post-login routing. |
| tests/F1.Web.Tests/AppTests.cs | Adds test asserting non-admin access denied when navigating to admin routes. |
| tests/F1.Infrastructure.Tests/Contracts/MigrationScoreRecalculatorTests.cs | Adds coverage for preserving run-derived preseason scoring when generic preseason data is partial. |
| tests/F1.Infrastructure.Tests/Contracts/MigrationRaceSelectionParserTests.cs | Adds coverage for phil preseason prompt classification as Preseason. |
| tests/F1.Api.Tests/Services/CompetitionLeaderboardServiceTests.cs | Adds unit tests for leaderboard ordering, empty states, and participant detail sections. |
| tests/F1.Api.Tests/Integration/RacesEndpointTests.cs | Updates integration test to call the new leaderboard-shaped /races/results endpoint and validate payload. |
| tests/F1.Api.Tests/Integration/CompetitionLeaderboardRouteAccessIntegrationTests.cs | Adds integration tests for authz/forbidden behavior on compare views. |
| src/F1.Web/wwwroot/appsettings.json | Adds PostLoginRouting and SelectionContext configuration. |
| src/F1.Web/Services/SelectionContextService.cs | Adds persisted selection-context service + browser store abstraction. |
| src/F1.Web/Services/PostLoginLandingResolver.cs | Adds role-based landing resolver driven by configuration. |
| src/F1.Web/Program.cs | Registers new options + services for routing and selection context persistence. |
| src/F1.Web/Pages/Results.razor | Replaces old “Driver Standings” with competition leaderboard UI, admin compare, recent migration runs strip, drilldown, deep-linking. |
| src/F1.Web/Pages/RaceSelection.razor | Adds competition/season selector and restore-on-/selection behavior using persisted context. |
| src/F1.Web/Pages/Home.razor | Implements post-login redirect behavior using the resolver. |
| src/F1.Web/Models/CompetitionParticipantDetailResponse.cs | Adds client model for participant detail drilldown. |
| src/F1.Web/Models/CompetitionLeaderboardResponse.cs | Adds client model for leaderboard response. |
| src/F1.Web/Layout/NavMenu.razor | Updates Race Selection link to /selection entrypoint. |
| src/F1.Web/Configuration/SelectionContextOptions.cs | Adds option types for configured competition/season contexts. |
| src/F1.Web/Configuration/PostLoginRoutingOptions.cs | Adds option types for post-login routing. |
| src/F1.Web/Components/DriverSelectionList.razor | Adds .driver-selection class to selects for more robust DOM targeting in tests. |
| src/F1.DataSyncWorker/Services/Scoring/MigrationScoreRecalculator.cs | Merges fallback + generic preseason calculated scores to preserve run-derived data. |
| src/F1.DataSyncWorker/Services/Parsing/MigrationRaceSelectionParser.cs | Adjusts question id/category resolution to incorporate Phil 2025 contract behavior. |
| src/F1.Api/Services/CompetitionLeaderboardService.cs | Adds leaderboard + participant detail service reading from migration/import tables and H2H domain tables. |
| src/F1.Api/Program.cs | Replaces mock results endpoint with authorized leaderboard endpoints and adds admin-only compare gating. |
| src/F1.Api/Dtos/CompetitionLeaderboardDtos.cs | Adds DTOs for leaderboard + participant detail responses. |
| src/F1.Api/Configuration/CompetitionLeaderboardOptions.cs | Adds API configuration model for leaderboard contexts. |
| src/F1.Api/appsettings.json | Adds leaderboard contexts for philip, david, and main. |
| README.md | Documents new routing/context/leaderboard configuration. |
| docs/epics/gh-286-post-login-user-journey-and-competition-workspace/epic-post-login-user-journey-and-competition-workspace.md | Updates epic plan with Story E8 and related acceptance criteria. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.