feat(chat): add connectivity warning before model download#36
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a preflight connectivity check before initiating the on-device LLM model download, warning users when they’re offline or on mobile data.
Changes:
- Add
connectivity_plusdependency for network type detection. - Gate model download behind connectivity-based dialogs (no connection / mobile data warning).
- Add new localized strings (en/es/fr/de) and document the dependency in
SPEC.md(plus design/plan docs).
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Adds connectivity_plus as a direct dependency. |
| pubspec.lock | Locks connectivity_plus and related transitive packages. |
| lib/l10n/app_en.arb | Adds new dialog/button strings with ARB metadata. |
| lib/l10n/app_es.arb | Adds Spanish translations for connectivity warning strings. |
| lib/l10n/app_fr.arb | Adds French translations for connectivity warning strings. |
| lib/l10n/app_de.arb | Adds German translations for connectivity warning strings. |
| lib/features/chat/presentation/model_download_page.dart | Adds connectivity check + dialogs and gates download accordingly. |
| docs/superpowers/specs/2026-04-26-connectivity-warning-before-model-download-design.md | Adds design spec for the connectivity warning behavior. |
| docs/superpowers/plans/2026-04-26-connectivity-warning-before-model-download.md | Adds implementation plan for the feature. |
| SPEC.md | Documents connectivity_plus in a new “Connectivity” section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…completed crash Guard _startDownload() with a _downloading flag to prevent multiple simultaneous download attempts. Without this, rapid retry taps or page rebuilds could trigger overlapping flutter_gemma SmartDownloader instances, completing the same Future twice. Closes Crashlytics issue 8c0e50240cd828f1c248b2bdc9b57369.
Add app_it.arb with full Italian translations for all keys, register 'it' in both language name maps, and update SPEC.md to reflect 5 supported locales.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add 'it' to LocalePreference.supportedLanguageCodes so Italian is selectable in the language picker - Use Future.microtask for _startDownload in initState to avoid showing dialogs before the first frame - Set barrierDismissible: false on the no-connection dialog - Check explicitly for ConnectivityResult.mobile instead of !wifi to avoid false warnings on ethernet/VPN - Move _checkConnectivity inside try block so _downloading resets on exception - Use chatModelPreferenceStorageProvider instead of hardcoded key in reset logic - Close database via provider before deleting the file
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
connectivity_plusto detect network type (WiFi, mobile data, none) before starting the LLM model downloadTest plan
🤖 Generated with Claude Code