Festival deep linking and logging Phase 1 - #191
Closed
richardthe3rd wants to merge 3 commits into
Closed
Conversation
Core Implementation:
- Update router.dart with festival-scoped URL structure (/:festivalId/...)
- Add festival validation and redirect logic in router
- Integrate BreadcrumbBar widget on all detail screens
- Update all screens to accept festivalId parameter
- Replace hard-coded navigation URLs with navigation helper calls
Provider Changes (lib/providers/beer_provider.dart):
- Add isValidFestivalId() method to validate against festival registry
- Add getFestivalById() method for festival lookup
Router Changes (lib/router.dart):
- Implement festival-scoped routes: /:festivalId/drink/:id, etc.
- Add root redirect: / → /{currentFestivalId}
- Add festival ID validation with automatic redirect for invalid IDs
- Sync provider state when URL changes to different festival
- Keep /about as global route (no festival scope)
Screen Updates:
- DrinksScreen: Add festivalId param, update all navigation calls
- FavoritesScreen: Add festivalId param, use navigation helpers
- DrinkDetailScreen: Add festivalId + BreadcrumbBar integration
- BreweryScreen: Add festivalId, pass to EntityDetailScreen
- StyleScreen: Add festivalId, pass to EntityDetailScreen
- FestivalInfoScreen: Add festivalId param
- EntityDetailScreen: Add festivalId + backLabel + BreadcrumbBar
- DrinkListSection: Add festivalId param to buildSlivers methods
Navigation Updates (main.dart):
- BeerFestivalHome: Extract festivalId from URL for tab navigation
- Update bottom nav to use festival-scoped paths
Status:
- Code analysis: PASSED (no code errors)
- Tests: REQUIRE UPDATES (constructor signatures changed)
- Manual testing: PENDING
Next Steps:
- Update all test files to pass festivalId arguments
- Fix mock-related errors in utf8_encoding_test.dart
- Perform manual deep link testing
- Update Phase 1 documentation
Test Updates: - Add festivalId parameter to all screen constructors in tests - Use 'cbf2025' as test festival ID consistently - Generate missing mocks for utf8_encoding_test.dart Files Updated: - test/brewery_screen_test.dart: Add festivalId to BreweryScreen - test/drink_detail_screen_screenshot_test.dart: Add festivalId to DrinkDetailScreen - test/drink_detail_screen_test.dart: Add festivalId to DrinkDetailScreen - test/drinks_screen_style_filter_test.dart: Add festivalId to DrinksScreen (2 places) - test/screens_test.dart: Add festivalId to FestivalInfoScreen - test/style_screen_screenshot_test.dart: Add festivalId to StyleScreen (2 places) - test/style_screen_test.dart: Add festivalId to StyleScreen Mock Generation: - Run build_runner to generate utf8_encoding_test.mocks.dart Test Results: - flutter analyze: ✅ PASSES (0 issues) - flutter test: ✅ 448 tests passed - Screenshot tests: 6 golden file mismatches (expected - BreadcrumbBar added) Note: Golden file failures are expected and require visual regeneration in proper display environment. All functional tests pass successfully.
Test failure comparison images are generated artifacts and should not be committed to the repository. These are created when golden file tests fail and contain pixel-by-pixel comparison images for debugging.
richardthe3rd
deleted the
claude/festival-deeplink-logging-phase1-j7no5
branch
December 27, 2025 10:09
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 pull request introduces festival-scoped routing throughout the app, ensuring that all navigation and URLs are contextualized to the currently selected festival. This enables deep linking, better browser support, and prepares the app for multi-festival support. The changes include major updates to the routing structure, refactoring of screen constructors to require a
festivalId, and consistent use of festival-aware navigation helpers.Routing and Navigation Overhaul:
lib/router.dartto use festival-scoped URLs (e.g.,/:festivalId/…) for all main and detail screens, with validation and redirection logic to ensure only valid festivals are accessible. The root path/now redirects to the current festival, and global routes like/aboutremain outside the festival scope. [1] [2]lib/main.dartand across screens to generate and use festival-aware paths, ensuring all navigation actions preserve the current festival context. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Screen and Widget Refactoring:
DrinksScreen,FavoritesScreen,DrinkDetailScreen,BreweryScreen,StyleScreen,FestivalInfoScreen) to require afestivalIdparameter, ensuring they always operate within the correct festival context. [1] [2] [3] [4] [5] [6]DrinkListSectionandEntityDetailScreento accept and usefestivalId, propagating context for navigation and data fetching. [1] [2] [3] [4] [5]Provider Enhancements:
BeerProviderto validate festival IDs and fetch festivals by ID, supporting the new routing logic and ensuring only valid festivals are accessible via URL.These changes collectively ensure that the app is robust to deep linking, festival switching, and navigation, with all screens and navigation actions aware of the current festival context.