Skip to content

Fix 3 critical bugs: parallel API fetching, dart:io web breakage, festival URL sync - #209

Merged
richardthe3rd merged 11 commits into
mainfrom
claude/prioritize-impact-improvements-gqqLR
Feb 8, 2026
Merged

Fix 3 critical bugs: parallel API fetching, dart:io web breakage, festival URL sync#209
richardthe3rd merged 11 commits into
mainfrom
claude/prioritize-impact-improvements-gqqLR

Conversation

@richardthe3rd

Copy link
Copy Markdown
Owner
  • Parallelize beverage type fetching with Future.wait for ~7x faster load times
  • Remove dart:io import and SocketException handler that breaks web builds
  • Update URL via GoRouter when switching festivals in the selector

https://claude.ai/code/session_01Vzxb1yS3rRonMVEXEdivwx

…tival URL sync

- Parallelize beverage type fetching with Future.wait for ~7x faster load times
- Remove dart:io import and SocketException handler that breaks web builds
- Update URL via GoRouter when switching festivals in the selector

https://claude.ai/code/session_01Vzxb1yS3rRonMVEXEdivwx
…dling

- Use GoRouter.maybeOf instead of try/catch for null-safe router lookup
- Capture router reference before Navigator.pop to avoid stale context
- Replace SocketException with http.ClientException for cross-platform
  network error detection (works on web, Android, and iOS)
- Restore specific "No internet connection" error message for users

https://claude.ai/code/session_01Vzxb1yS3rRonMVEXEdivwx
Copilot AI review requested due to automatic review settings February 7, 2026 21:26
@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

LCOV of commit 1461020 during CI #36

Summary coverage rate:
  lines......: 77.5% (2235 of 2883 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate:
                                                      |Lines       |Functions  |Branches    
  Filename                                            |Rate     Num|Rate    Num|Rate     Num
  ==========================================================================================
  lib/providers/beer_provider.dart                    | 0.0%    222|    -     0|    -      0
  lib/services/beer_api_service.dart                  | 0.0%     43|    -     0|    -      0
  lib/widgets/festival_menu_sheets.dart               | 0.0%    177|    -     0|    -      0

@codecov

codecov Bot commented Feb 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/widgets/festival_menu_sheets.dart 57.14% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves app startup/perceived performance and web compatibility by parallelizing festival beverage fetching, removing dart:io-based network exception handling that breaks web builds, and syncing the selected festival with the GoRouter URL when changed via the selector.

Changes:

  • Fetch all beverage types concurrently via Future.wait in BeerApiService.fetchAllDrinks.
  • Replace SocketException handling with http.ClientException in provider error handling and tests (avoids dart:io on web).
  • Navigate via GoRouter when selecting a festival from the festival selector sheet.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/services/beer_api_service.dart Parallelizes multi-beverage fetching to reduce overall load time.
lib/providers/beer_provider.dart Updates network error mapping to web-safe http.ClientException.
lib/widgets/festival_menu_sheets.dart Adds GoRouter navigation to keep URL in sync when switching festivals.
test/provider_test.dart Updates tests to throw/assert http.ClientException instead of SocketException.
test/utf8_encoding_test.mocks.dart Adds generated Mockito mocks for UTF-8 encoding tests.

Comment thread lib/widgets/festival_menu_sheets.dart
@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://claude-prioritize-impact-imp.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

Copilot AI commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

@richardthe3rd I've opened a new pull request, #211, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 7 commits February 8, 2026 16:09
Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
… check

Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Use routing helpers in festival selector and preserve current tab
@github-actions

github-actions Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://claude-prioritize-impact-imp.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

@richardthe3rd
richardthe3rd merged commit 89b1e06 into main Feb 8, 2026
10 checks passed
@richardthe3rd
richardthe3rd deleted the claude/prioritize-impact-improvements-gqqLR branch February 8, 2026 16:24
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.

4 participants