Thomas Güttler and Claude Sonnet 4.6
be56232f00
feat: linting + format automation + IMAP integration tests against Stalwart
...
- Add `format` task (fvm dart format .) and pre-commit dart-format hook
- Fix pre-commit task-check hook to use nix develop --command task
- Add CI format-check step (dart format --set-exit-if-changed .)
- Enable directives_ordering, curly_braces_in_flow_control_structures,
discarded_futures, unnecessary_await_in_return, require_trailing_commas
- Apply 330 trailing-comma fixes (dart fix --apply) across all files
- Wrap intentional fire-and-forget futures with unawaited() to satisfy
discarded_futures lint in account_sync_manager, email_repository_impl,
and UI screens
- Add test/integration/email_repository_imap_test.dart: 8 tests against
real Stalwart (sync, body fetch+cache, send, search, flag/move/delete)
- Remove 14 fake-IMAP unit tests migrated to Stalwart integration tests
- Fix flushPendingChanges move test: create Trash folder before IMAP MOVE
- Lower coverage gate 85%→80%: IMAP paths now tested by Stalwart (real),
not counted in unit-test lcov
- Delete LINTING.md (plan fully executed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-20 18:08:09 +02:00
Thomas Güttler and Claude Sonnet 4.6
33d1e21bc9
perf: cut integration-ui test time from 250s to 28s
...
- Fix HOME override that caused FVM to re-download 220MB Flutter SDK on
every run; use XDG_DATA_HOME instead to isolate app data without
touching HOME
- Switch DB path from getApplicationDocumentsDirectory() to
getApplicationSupportDirectory() so XDG_DATA_HOME isolation works and
stale accounts don't leak between test runs
- Replace fixed pump(5s/3s) waits with pumpUntil() polling at 200ms so
tests stop waiting as soon as the UI is ready (23s of dead wait → 8s)
- Add timing instrumentation (ts() in shell, _log()/Stopwatch in Dart)
- Fix CI integration-ui job: was mixing subosito flutter with fvm flutter;
now uses fvm consistently with actions/cache for ~/.fvm, ~/.pub-cache,
and build/linux
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-18 13:25:16 +02:00
Thomas Güttler
c7a121e386
stalwart-dev/integration_ui_test.sh working! great!
2026-04-18 12:05:20 +02:00
Thomas Güttler
6621f434fa
task check works, run not.
2026-04-17 12:17:51 +02:00
Thomas Güttler
9ce598d21c
task check, working again.
2026-04-17 10:05:31 +02:00
Thomas Güttler and Claude Sonnet 4.6
24482c7e4b
Push coverage to 87%: remove 4 screens from excluded, add nav/search tests
...
- run_unit_tests.sh and CI now run unit + widget tests together for coverage
- Removed account_list, email_list, mailbox_list, settings screens from
_excluded (all ≥70% when measured with widget tests)
- Added tests: mailbox tile tap, account tile tap, empty-state button,
settings Remove confirmation, email search submit/results/sync/edit
- FakeEmailRepository accepts searchResults for testing search paths
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-16 15:29:40 +02:00
Thomas Güttler
99a46e1589
test.
2026-04-16 15:14:18 +02:00
Thomas Güttler and Claude Sonnet 4.6
818f66c738
Fix dart→flutter in CI; add pre-commit hook and install-hooks task
...
- ci.yml: dart run/dart test → flutter pub run/flutter test (all 3 jobs)
- hooks/pre-commit: runs flutter analyze + flutter test before every commit
- Taskfile: add install-hooks task (copies hooks/pre-commit → .git/hooks/)
- LATER.md: remove resolved items (enough_mail fork, pre-commit, GH CI)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-16 09:55:15 +02:00
Thomas Güttler and Claude Sonnet 4.6
03d35387f7
Linting, tests, README, CI, and code quality improvements
...
Linting:
- analysis_options.yaml: flutter_lints base + 20 additional rules
(prefer_single_quotes, avoid_print, cancel_subscriptions,
unawaited_futures, empty_catches, always_declare_return_types, …)
- unused_import / dead_code treated as errors
pubspec.yaml:
- Remove 6 unused packages: freezed, freezed_annotation, json_annotation,
json_serializable, riverpod_generator, collection
- Add test: ^1.25.0 for pure-Dart unit tests
Testable utilities (extracted from screen code):
- lib/core/utils/html_utils.dart — htmlToPlain()
- lib/core/utils/format_utils.dart — fmtSize()
- lib/core/utils/logger.dart — thin debugPrint wrapper
Unit tests (test/unit/, no device required):
- html_utils_test.dart — 13 cases covering tags, entities, edge cases
- format_utils_test.dart — B / KB / MB / GB formatting
- email_model_test.dart — EmailAddress JSON roundtrip, toString, EmailDraft
- account_sync_backoff_test.dart — exponential backoff + clamping
Taskfile:
- task test → dart test test/unit/ (fast, no device)
- task test-flutter → flutter test (widget tests)
- task check → analyze + unit tests in parallel
README rewrite:
- Covers user flow (download, add account)
- Developer flow: nix develop, direnv allow, task codegen, task check
- Platform status table (Linux done, others pending)
- Project layout diagram
- Schema-change workflow
CI (.github/workflows/ci.yml):
- analyze-and-test job: flutter analyze + dart test on every push/PR
- integration job: Nix + Stalwart on push to main
- build-linux job: flutter build linux --release
Logging:
- Replace all bare catch (_) {} with log() calls
- Sync backoff errors now print account email + retry delay
- STATUS failures on \Noselect mailboxes logged at debug level
- STARTTLS failures logged before continuing without TLS
.gitignore:
- Add .direnv/, .flutter-plugins-dependencies
- Add all platform generated-plugin wiring files
- Add .env / .env.local
- Add linux/build/
.env.example: documents optional STALWART_PORT overrides
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-16 08:11:29 +02:00