fix(ai): show accurate toast when local model is loading or downloading#2486
Conversation
'Model not ready. Download the local model first.' was shown for all non-ready model states, including when the model was already downloaded and actively loading (preparing/checking). Now shows a state-specific message so users are not told to download a model that is already present.
|
Caution Review failedPull request was closed or merged during review WalkthroughThe PR adds status-aware local-AI error toasts and i18n strings, converts Expo auth error constructors/callers to object-style parameters, nests a JWT option under ChangesAI Model Status Toast Updates
Expo auth error shape changes
JWT plugin option shape
Sentry captureApiException refactor
Tooling
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…Biome ignore Move disablePrivateKeyEncryption under the jwks key where JwtOptions expects it, and exclude .expo auto-generated files from Biome checks.
Coverage Report for API Unit Tests Coverage (./packages/api)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Coverage Report for Expo Unit Tests Coverage (./apps/expo)
File CoverageNo changed files found. |
captureApiException, toAuthError, and AuthClientError constructor all had 2 parameters, violating the no-owned-max-params lint rule. Each is refactored to accept a single options object; all call sites updated.
Summary
modelStatus:downloading→ "Model is still downloading, please wait."preparing/checking→ "Model is still loading, please wait."idle/ other → "Download the local model first."Test plan
preparingstate — confirm toast says "Model is still loading, please wait."downloading— confirm toast says "Model is still downloading, please wait."idle) — confirm toast says "Download the local model first."Summary by CodeRabbit