Skip to content

Commit 8902acb

Browse files
committed
refactor: address review — helper-built paths and a fuller grep hint
Three of the five review comments were correct: - `provider_initializer.dart` built festival-root paths by interpolating `'/${provider.currentFestival.id}'` directly. AGENTS.md requires the typed helpers, so both sites now go through `buildFestivalHome()`. Output is identical; the helper adds a non-empty assert. - The `analyze` grep hint still suggested `error\|warning`, which now hides the info-severity findings that fail the task. Widened to `grep -nE 'info|warning|error'`. This means the moved widgets are no longer byte-identical to the originals as claimed in the PR description; the two `router.go` call sites are the only difference. The other two comments claimed `'key': ?value` is invalid Dart. It is a null-aware map entry, stable since 3.9 (this package requires >=3.10.0), and is what the now-fatal `use_null_aware_elements` lint asked for — reverting would fail `analyze`. Refuted on the threads. Refs #524, #527
1 parent 75f376d commit 8902acb

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/widgets/provider_initializer.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class _ProviderInitializerState extends State<ProviderInitializer>
9494

9595
// Check if we're on root path - redirect to festival home
9696
if (currentPath == '/') {
97-
router.go('/${provider.currentFestival.id}');
97+
router.go(buildFestivalHome(provider.currentFestival.id));
9898
return;
9999
}
100100

@@ -134,7 +134,8 @@ class _ProviderInitializerState extends State<ProviderInitializer>
134134
final queryString = currentUri.query.isNotEmpty
135135
? '?${currentUri.query}'
136136
: '';
137-
router.go('/${provider.currentFestival.id}$restOfPath$queryString');
137+
final festivalHome = buildFestivalHome(provider.currentFestival.id);
138+
router.go('$festivalHome$restOfPath$queryString');
138139
}
139140
} catch (e, stackTrace) {
140141
if (kDebugMode) {

mise-tasks/analyze.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ flutter analyze "$@" 2>&1 |
1010
tee "$ANALYZE_LOG"
1111
EXIT_CODE=${PIPESTATUS[0]}
1212
echo "---"
13-
echo "Grep with: grep -n 'error\|warning' $ANALYZE_LOG"
13+
echo "Grep with: grep -nE 'info|warning|error' $ANALYZE_LOG"
1414
exit "$EXIT_CODE"

0 commit comments

Comments
 (0)