2.6 KiB
2.6 KiB
Testing And Debugging
Baseline Commands
flutter analyze
flutter test
dart run build_runner build --delete-conflicting-outputs
Focused suites:
flutter test test/features/share_intake
flutter test test/features/ai_digest
flutter test test/features/local
flutter test test/features/sync
flutter test test/core/llm
flutter test test/integrations/backend
Manual Smoke Tests
Fake backend:
- Launch with
USE_FAKE_BACKEND=true. - Sign in with fake credentials.
- Add a person.
- Add a moment.
- Add an idea.
- Add a reminder.
- Open Settings and verify flags.
Share intake:
- Settings ->
Simulate Share Capture. - Paste a sender-prefixed text share.
- Confirm review sheet behavior.
- Verify profile attachment or Share Inbox routing.
- Open profile and check facts/messages/signals.
AI digest:
- Configure provider in Settings.
- Run LLM Debug if needed.
- Enable weekly digest.
- Run Private Digest Now.
- Open AI Review.
- Accept and dismiss drafts.
Notifications:
- Request notification access from Settings.
- Create or update reminders.
- Verify scheduler tests still pass.
- Test real delivery on device where possible.
Debug Surfaces
Settings includes:
- LLM Debug
- LLM diagnostics export
- Run Private Digest Now
- Open AI Review
- Request Notification Access
- Simulate Share Capture
- Open Share Inbox
- Share Diagnostics
Sync view includes:
- pending changes
- rejected changes
- repair actions
- retry/requeue tools
Common Failures
Share intent delivered nothing
Check:
ENABLE_WHATSAPP_SHARE_INTAKE- iOS extension target build
- App Group ID matches Runner and extension targets
ReceiveSharingIntent.instance.getInitialMedia()- Share Diagnostics in Settings
LLM digest creates bad suggestions
Check:
AnonymizedLlmContextBuilderpayload- sensitive/unreviewed facts filtering
- prior suggestions included
- source age and
shared_message_datetime - parser response tests
Background digest does not run
This can be normal. iOS background execution is best effort. Verify manual run first, then check Workmanager setup, background modes, charging/network policy, and run-state backoff.
Full widget tests fail due layout hit targets
Some app-flow tests are sensitive to viewport/layout. Prefer focused tests for feature work, then investigate full-suite failures separately with screenshots or widget tree dumps.
Test Data Rules
- Avoid real names, messages, phone numbers, or URLs in fixtures.
- Use synthetic names and pseudonymous tokens.
- Add regression tests for parser edge cases.
- Add privacy assertions when prompt payloads change.