Commit Graph
100 Commits
Author SHA1 Message Date
Thomas Güttler f0eff7dc7c Merge branch 'drop-nix' 2026-06-08 22:44:55 +02:00
Thomas Güttler 517f7a6aa8 chore: drop nix and migrate to container-based development 2026-06-08 22:34:48 +02:00
Thomas Güttler 913e5493f5 chore: move go.mod to repository root 2026-06-05 15:11:30 +02:00
Thomas Güttler 2612f4dbcd chore: rename go module path for remote go run 2026-06-05 14:50:17 +02:00
Thomas Güttler 31c0479fc9 new name. 2026-06-05 10:11:56 +02:00
Thomas Güttler bde782f511 new pre-commit hook config 2026-06-05 10:09:17 +02:00
Thomas Güttler 3db1bd8ac2 remove old snooze plan. 2026-06-05 08:39:16 +02:00
Thomas Güttler 515b12dd0f clean up on main (remove plan.md) 2026-06-05 08:37:51 +02:00
Thomas Güttler 2ceabcacf0 clean up (on main) 2026-06-05 08:34:50 +02:00
Thomas Güttler a56eca0851 clean up in README 2026-06-05 08:21:13 +02:00
Thomas Güttler 85c9df604b ... 2026-06-05 08:19:48 +02:00
Thomas Güttler 68950e6888 Merge branch 'issue-421-bug-report' 2026-06-04 22:18:00 +02:00
Thomas Güttler 59a9ed9109 Implement bug report uploading backend and Flutter client UI (#421) 2026-06-04 22:14:04 +02:00
Thomas Güttler 6b1627b4c9 playstore icons 2026-06-04 14:26:10 +02:00
Thomas Güttler 65ac023622 fix wiget tests. 2026-06-04 12:08:48 +02:00
Thomas Güttler 838eee66bd icon.svg 2026-06-04 11:12:07 +02:00
Thomas Güttler b0a09939c9 chore: migrate all workflows to SSH-based Dagger engine and remove stunnel legacy 2026-06-02 17:40:35 +02:00
Thomas Güttler 8ea8d71f42 fix: format, analyze-fix and update mocks 2026-06-02 17:10:16 +02:00
Thomas Güttler 3520f161e3 fix: update website workflow with correct Dagger setup and SOPS_AGE_KEY 2026-06-02 17:00:54 +02:00
Thomas Güttler ed247baaac fix: use more robust Dagger connection verification 2026-06-02 16:55:18 +02:00
Thomas Güttler 69bd7f5962 fix: use SSH tunnel for Dagger remote connection 2026-06-02 16:52:16 +02:00
Thomas Güttler e0ecac20aa fix: ensure remote DAGGER_HOST is set and use more robust SSH setup 2026-06-02 16:24:56 +02:00
Thomas Güttler f9e0fadb68 fix: use ssh-keyscan to populate known_hosts for Dagger 2026-06-02 16:21:49 +02:00
Thomas Güttler aebc1e508e fix: use ssh-agent for Dagger remote connection 2026-06-02 16:18:06 +02:00
Thomas Güttler 375fd18f9f fix: use full SSH URL for Dagger remote to avoid config include issues 2026-06-02 16:14:51 +02:00
Thomas Güttler ba21b802eb fix: use _EXPERIMENTAL_DAGGER_RUNNER_HOST for Dagger SSH redirection 2026-06-02 13:31:11 +02:00
Thomas Güttler 7974c28102 fix: use absolute path for dagger in ssh wrapper 2026-06-02 13:23:41 +02:00
Thomas Güttler 6303cc5ac1 test: verify simplified ci.yml 2026-06-02 13:22:34 +02:00
Thomas Güttler 9744fe1379 debug: extremely simplify ci.yml 2026-06-02 13:22:05 +02:00
Thomas Güttler 39a65b97e9 test: verify Dagger SSH/SOPS fixes with dummy commit 2026-06-02 13:21:17 +02:00
Thomas Güttler e5c5dc9db8 fix: add IdentitiesOnly=yes to SSH config for Dagger 2026-06-02 13:20:20 +02:00
Thomas Güttler 6703ffd69b fix: use explicit ssh wrapper for dagger commands 2026-06-02 13:19:16 +02:00
Thomas Güttler 43eafbd4c2 debug: simplify workflow triggers to fix parsing error 2026-06-02 13:18:28 +02:00
Thomas Güttler ee1fccf340 fix: use _EXPERIMENTAL_DAGGER_RUNNER_HOST for SSH redirection 2026-06-02 13:16:33 +02:00
Thomas Güttler 5757176937 debug: add SSH connection test to setup_dagger_remote.sh 2026-06-02 12:51:41 +02:00
Thomas Güttler 180035ec55 fix: re-apply ci.yml with clean format 2026-06-02 12:50:39 +02:00
Thomas Güttler 68dabc56d0 test: trigger CI again 2026-06-02 12:48:39 +02:00
Thomas Güttler 8ee411d1c8 fix: use --output-type json for SOPS decryption 2026-06-02 12:45:34 +02:00
Thomas Güttler ec3ebfa4a3 fix: update CI workflow for SSH/SOPS and SOPS_AGE_KEY 2026-06-02 12:44:35 +02:00
Thomas Güttler d206c5aa79 test: trigger CI to verify Dagger SSH/SOPS pipeline 2026-06-02 12:42:20 +02:00
Thomas Güttler 1e2d1b6063 chore: migrate to SOPS and SSH for Dagger engine access 2026-06-02 11:10:29 +02:00
Thomas GüttlerandClaude Sonnet 4.6 f6bb6aed82 ci: empty commit to verify Dagger cache
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 11:34:21 +02:00
Thomas GüttlerandClaude Sonnet 4.6 007e7b57f1 fix: revert CacheSharingModeLocked to fix deadlock in Check()
Locked exclusive cache access caused concurrent Dagger operations inside
Check() to deadlock waiting on each other, resulting in a 60-minute timeout.
Shared mode is correct here — cache volumes are pre-warmed so pub get is fast.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 11:19:41 +02:00
Thomas GüttlerandClaude Sonnet 4.6 0ea06e8634 fix: use CacheSharingModeLocked instead of dagger.Locked
dagger.Locked is not exported in this SDK version; the correct
constant is dagger.CacheSharingModeLocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 10:16:02 +02:00
Thomas GüttlerandClaude Sonnet 4.6 592efae934 perf: lock cache volumes and add --no-pub to fix Dagger cache misses
flutter pub get was not being cached by Dagger because the pub-cache
CacheVolume used Shared mode: concurrent writes from the check and
deploy-playstore jobs made the mount non-deterministic, causing a cache
miss on every run. Locked mode gives each operation exclusive access so
the output snapshot is stable and Dagger can cache subsequent steps.

Also add --no-pub to both flutter build commands: pub get already ran
explicitly in Setup(), so skipping it again inside the build step avoids
a duplicate network-touching operation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 09:45:39 +02:00
Thomas GüttlerandClaude Sonnet 4.6 9466f03936 perf: use commit timestamp as build number to enable Dagger cache hits
$(date +%s) changed every run, making the flutter build WithExec args
unique each time and busting the Dagger layer cache (500s build every run).

$(git log -1 --format=%ct HEAD) is stable for the same commit, so a
retry of a failed upload gets a full cache hit on the build step.
Still monotonically increasing across commits, satisfying Play Store.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 09:20:05 +02:00
Thomas Güttler b79ea77f69 ci: empty commit to measure cache performance 2026-05-18 09:06:56 +02:00
Thomas GüttlerandClaude Sonnet 4.6 ef8268a41e fix: rename duplicate build-android-bundle task to build-android-bundle-local
The old fvm-based task had the same name as the new Dagger-based one,
causing go-task to error immediately (1-second CI failure).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 08:37:18 +02:00
Thomas GüttlerandClaude Sonnet 4.6 8783bcf5f0 fix: unique build number and split build/upload steps
- Pass --build-number $(date +%s) to flutter build for both APK and AAB
  so each CI run gets a unique version code (fixes "already been used" error)
- Extract UploadToPlayStore(aab, playStoreConfig) as its own Dagger function
  so the build and upload are independently callable
- Add build-android-bundle task (exports AAB via dagger export) and
  upload-android-bundle task (calls UploadToPlayStore with the local file)
- CI deploy-playstore job now has two steps: Build Android Bundle and
  Upload to Play Store, so a failed upload can be retried without rebuilding
- deploy-apk also gets --build-number to avoid version code collisions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 08:18:33 +02:00
Thomas GüttlerandClaude Sonnet 4.6 484a183a19 fix: pass release keystore into Dagger Android builds
Both BuildAndroidApk and BuildAndroidRelease were using the debug
signing config because the keystore and password were never forwarded
into the Dagger container. Add setupKeystore() helper that decodes
ANDROID_KEYSTORE_BASE64 into android/app/upload-keystore.jks and
sets ANDROID_KEYSTORE_PASSWORD, then wire both secrets through
DeployApk, PublishAndroid, and the Taskfile/CI env blocks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 07:49:45 +02:00
Thomas GüttlerandClaude Sonnet 4.6 3c403369fb ci: verify keystore SHA1 before Play Store build
Decodes ANDROID_KEYSTORE_BASE64 and prints the SHA1 fingerprint via
keytool before invoking the Dagger build, to confirm which key is in
the secret vs. what the build actually uses.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 07:20:25 +02:00
Thomas Güttler 24cafd1a93 ci: retrigger to capture Play Store error with debug logging 2026-05-18 06:25:12 +02:00
Thomas Güttler 2cc6188a43 fix: log HTTP status and response body on Play Store upload failure
Without the response body we can't tell why Google Play rejects the
upload. Logs the status code and first 500 bytes of the response for
both the init POST and the upload PUT on each failed attempt. Also
moves the init call inside the try/except so init failures are retried.
2026-05-18 05:49:55 +02:00
Thomas Güttler 83654fb4c9 fix: re-initialize resumable upload URL on each retry attempt
The resumable upload URL returned by Google Play is session-specific and
expires after a failed attempt. Retrying with the same URL always fails.
Also broadens the caught exception from HTTPError to RequestException so
timeouts and connection errors are retried too.
2026-05-18 05:06:42 +02:00
Thomas Güttler 0733a4bf8a ci: trigger run after runner security fix 2026-05-17 22:58:11 +02:00
Thomas Güttler 21cc94110d Revert "ci: switch to codeberg-small runner to avoid workspace permission failure"
This reverts commit 32b465bd1a.
2026-05-17 22:50:18 +02:00
Thomas GüttlerandClaude Sonnet 4.6 5562f82f35 ci: rename runner label from dagger-dagger to ubuntu-latest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:11:57 +02:00
Thomas Güttler 0b3b28b23a docs: add README for sharedinbox-runner setup 2026-05-08 12:56:29 +02:00
Thomas Güttler 67e6b4ebb9 chore: unify runner naming to sharedinbox-runner 2026-05-08 12:55:16 +02:00
Thomas Güttler 06cf8c7f99 chore: simplify runner to run as root from /opt/sharedinbox-runner 2026-05-08 12:40:12 +02:00
Thomas Güttler 5d33befe51 chore: set runner working dir to / and use absolute paths 2026-05-08 12:20:04 +02:00
Thomas Güttler b314a0c1b6 feat: migrate CI to Codeberg Actions and add self-hosted runner config
- Added .forgejo/workflows/ci.yml for thin CI orchestration.
- Configured Dockerized Codeberg runner with Nix support in codeberg-runner/.
- Added systemd service for persistent runner execution.
- Added GEMINI.md for project CI/Nix conventions.
- Added Taskfile task for Linux release builds.
2026-05-08 12:04:42 +02:00
Thomas Güttler 626b7b49f9 chore: remove accidental log file commit 2026-05-08 11:19:49 +02:00
Thomas Güttler 43e1744614 feat: implement optimized Undo for delete and move actions
- Added UndoService with 10-action history stack.
- Integrated Undo Snackbar into EmailListScreen and EmailDetailScreen.
- Added EmailRepository.cancelPendingChange to optimize undo by removing
  unsynced local mutations.
- Fixed sorting bug in compareMailboxes for unknown roles.
- Increased unit coverage to 83% with new model and utility tests.
- Verified with full test suite (task check).
2026-05-08 11:14:54 +02:00
Thomas Güttler 1a4571f016 gitigore .task 2026-05-08 07:54:03 +02:00
Thomas Güttler 8d268f1165 Implement multi-account search and improve repository fakes
- Extended search to support global queries across all accounts.
- Updated SearchScreen to handle optional account context and unified results.
- Centralized mailbox comparison logic in Mailbox model.
- Added copyWith to Account model.
- Fixed race conditions and incorrect overrides in unit, widget, and integration tests.
- Reached 80% unit test coverage.
2026-05-08 01:01:18 +02:00
Thomas Güttler cd0892763c Implement Thread View UI and repository support
- Created ThreadDetailScreen with expandable email cards and HTML support.
- Added observeEmailsInThread to EmailRepository and implementation.
- Updated navigation in EmailListScreen to route multi-message threads to the new view.
- Updated test mocks (FakeEmailRepository) across unit, widget, and integration tests.
- Documented progress in done.md and updated next.md.
2026-05-08 00:14:50 +02:00
Thomas Güttler 656d4b46d7 Optimize deployment, fix E2E flakiness, and implement database-backed threading
- Optimize task deploy-android with marker files and source/generate tracking.
- Fix flaky Android E2E test with pumpAndSettle and safety delays.
- Implement global CrashScreen and error handlers in main.dart.
- Refactor threading to use a persistent Threads table for performance.
- Add database indexes and migration for schema v18.
- Enhance coverage gate with ghost path checks and increased coverage (82%).
2026-05-07 22:07:54 +02:00
Thomas Güttler 3c90818845 Harden Android deployment and implement dynamic port allocation
- Replace fixed ports with dynamic allocation (port 0) for all Stalwart listeners, including ManageSieve.
- Require KVM acceleration for Android integration tests; fail early with setup instructions if /dev/kvm is inaccessible.
- Require all ANDROID_APK_SCP environment variables for deployment; fail early if any are missing.
- Revert emulator boot timeouts to standard values (120s device / 60s boot) now that software emulation is disabled.
2026-05-07 07:35:27 +02:00
Thomas Güttler ae5a48016c Fix Android deployment pipeline and integration tests
- Run integration tests sequentially in Taskfile.yml to avoid port 4190 (ManageSieve) conflict.
- Add ManageSieve listener to Stalwart config for better test coverage.
- Increase Android emulator boot timeout and add software-mode flags (-accel off, -no-boot-anim, -gpu swiftshader_indirect) to accommodate environments without KVM.
- Update LATER.md with notes on software emulation performance.
2026-05-06 21:54:41 +02:00
Thomas Güttler 9ba6677308 chore: remove MobSF (overkill for current needs) 2026-05-06 20:47:27 +02:00
Thomas Güttler 90b2d3c9e3 chore: remove accidental crash log 2026-05-06 09:58:46 +02:00
Thomas Güttler 2f58fb7a08 fix: IMAP attachments (size/download) and immediate sync for deletions
- Fix IMAP attachment sizes showing as '0 B' by falling back to decoded content length.
- Fix IMAP attachment downloads failing for single-part fetches by falling back to root message.
- Implement immediate server-side sync for deletions/flags using a new onChangesQueued stream.
- Automate FVM SDK setup and add 'task setup'.
- Make MobSF optional in build-android to handle environment restrictions.
- Update test fakes to match EmailRepository interface changes.
2026-05-06 09:58:42 +02:00
Thomas Güttler 848d8f2c5b later.md 2026-05-05 08:19:34 +02:00
Thomas GüttlerandClaude Sonnet 4.6 569273d7ff feat: restrict plain-text connections to localhost only
Hides the SSL/TLS toggle in add/edit account screens when the host is
not localhost; enforces SSL in connectImap/connectSmtp for non-localhost
hosts so plaintext can never be configured accidentally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 07:35:56 +02:00
Thomas GüttlerandClaude Sonnet 4.6 d4d61b2b39 feat: sync-now button on sync log screen
Adds a sync icon to the AppBar of the sync log screen. Tapping it wakes
the account's idle/wait loop immediately and shows a spinner until the
next log entry arrives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 07:23:34 +02:00
Thomas GüttlerandClaude Opus 4.7 dad239e0b6 feat: drop Sieve fields from add-account; auto-probe ManageSieve
The IMAP/SMTP add-account form no longer asks for a ManageSieve host,
port, or SSL toggle. After the account is saved, a background probe
opens TCP+STARTTLS to the IMAP host on port 4190 and stores a
tri-state result (manageSieveAvailable: null / true / false). The
"Email filters" menu item is hidden when the probe records false, so
servers that don't expose ManageSieve don't surface a dead menu.

Edge-case overrides (different sieve host, non-standard port, plain
TCP) remain available in Edit Account, and changing them clears the
cached probe result so the next save re-probes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 16:14:41 +02:00
Thomas GüttlerandClaude Opus 4.7 da383d0957 feat: ManageSieve STARTTLS + clearer TLS-mismatch errors + broader connection test
The "Email filters" screen was failing with WRONG_VERSION_NUMBER because the
ManageSieve client was opening implicit-TLS sockets on port 4190, while RFC
5804 servers (Stalwart, Dovecot, Cyrus) listen plaintext on 4190 and expect
STARTTLS. ManageSieveClient.connect now opens plaintext, reads the capability
greeting, sends STARTTLS, hands the socket to SecureSocket.secure(), and
re-reads capabilities on the encrypted stream.

The same WRONG_VERSION_NUMBER error can hit IMAP/SMTP when the SSL toggle and
the chosen port disagree (e.g. SSL=on with SMTP port 587). New helper
lib/data/imap/tls_error.dart translates that BoringSSL error into a
TlsModeMismatchException naming the host/port and suggesting which port goes
with which TLS mode. connectImap, connectSmtp, and the ManageSieve TLS
upgrade all funnel through rethrowAsTlsHint so the same readable message
reaches the UI regardless of which protocol failed.

ConnectionTestService previously only verified IMAP/JMAP, so SMTP and
ManageSieve misconfig silently passed the "Try connection" button on the
edit-account screen and only surfaced when the user later tried to send
mail or open Email filters. After IMAP succeeds, the service now also
verifies SMTP (always — sending mail requires it) and ManageSieve (only
when manageSieveHost is explicitly set, since the section is collapsed by
default). Failures are prefixed with "SMTP:" or "ManageSieve:" so the
user can tell which leg of the connection is broken.

connectionTestServiceProvider now also watches smtpConnectProvider so the
E2E integration tests' plaintext SMTP override applies to the connection
check as well.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 10:31:55 +02:00
Thomas GüttlerandClaude Opus 4.7 fc270590c4 feat: ManageSieve (RFC 5804) Sieve script editing for IMAP accounts
Adds a minimal ManageSieve client so the existing "Email filters" UI
works for IMAP accounts, not just JMAP. SieveRepository becomes a
dispatcher that routes to JMAP or ManageSieve based on account.type.

Account model + DB schema v15 grow manageSieveHost/Port/Ssl fields
(default 4190 / TLS, host falls back to imapHost when blank). The Add
and Edit account screens expose them inside a collapsed ExpansionTile
to keep the form short for users who accept defaults.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 06:53:31 +02:00
Thomas GüttlerandClaude Opus 4.7 44d02afc46 feat: render HTML email bodies via flutter_html
Email detail screen now renders the message htmlBody with the flutter_html
widget when present, falling back to SelectableText for plain-text-only mail.
Remote http(s) images are blocked by default to defeat tracking pixels; an
opt-in "Load remote images" button reveals them per-screen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 20:10:18 +02:00
Thomas Güttler ab6dc89665 next.md 2026-04-28 16:58:57 +02:00
Thomas GüttlerandClaude Opus 4.7 1a62907703 feat: default new SMTP accounts to implicit TLS (port 465)
The SMTP SSL/TLS toggle in the add-account form now defaults to on with
port 465. Previously the default was port 587 with the toggle off
(STARTTLS — TLS was active under the hood, but the off toggle made users
think the connection was insecure). The MX-record fallback in the
discovery service was flipped the same way; autoconfig XML parsing is
unchanged so servers that advertise STARTTLS still get STARTTLS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 15:50:37 +02:00
Thomas GüttlerandClaude Opus 4.7 fb767a8489 fix: don't resurrect locally-deleted IMAP message on next sync
The incremental IMAP sync issued `UID ${lastUid + 1}:*` to look for new
mail. RFC 3501 §6.4.4 reverses `n:*` to `*:n` when n exceeds the largest
UID, so a server with one message at UID 1 and `lastUid=1` returned UID 1
for `UID 2:*` — re-fetching and re-inserting a row the user had just
deleted locally (whose pending change had not yet flushed).

`_fetchAndUpsertImap` now looks up the UIDs in the mailbox that have a
pending `delete` or `move` queued and skips the insert for those. The
existing `UID n:*` query is left intact so freshly-delivered SMTP mail
keeps driving StreamBuilder rebuilds in the E2E flow.

Regression test in `email_repository_imap_test.dart` deletes a synced
message and calls `syncEmails` directly — exactly what the in-app sync
button does — and asserts the row stays gone with the pending change
still queued.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 14:02:12 +02:00
Thomas GüttlerandClaude Opus 4.7 db05878aca fix: reap orphan Xvfb before integration-ui run
xvfb-run --auto-servernum picks a fresh display number, but if a previous
session left an orphan Xvfb process (e.g. killed mid-flight), the stale
/tmp/.X11-unix/X<N> socket and X<N>-lock still belong to that orphan, and
xvfb-run's cleanup at the end fails with "kill: No such process" — flipping
the script's exit status to non-zero even when the integration test itself
passed. Reap orphan Xvfb processes (pgrep -u $USER -x Xvfb) and remove their
display sockets and lock files before invoking xvfb-run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 12:42:34 +02:00
Thomas GüttlerandClaude Opus 4.7 2e2b7c3d9f fix: Android E2E aliceTile race + bundle deploy-android infra
The Android UI integration test failed at tap(aliceTile) with "0 widgets"
even though pumpUntil had just found the tile. On the slow software-rendered
emulator the route-pop animation finalises during pumpUntil's trailing 300 ms
settle, briefly leaving the tile out of the tree. Re-confirm with a second
pumpUntil before the tap.

Bundles the previously uncommitted infra changes that make task deploy-android
run end-to-end inside nix develop: Linux desktop runtime libs + GL software
rendering env in flake.nix, path_provider_android pin to <2.3 to avoid the
libdartjni SIGSEGV, deferred DB-path resolution after WidgetsFlutterBinding,
+iglx for xvfb-run, platform-tools on PATH, and a single pre-commit script
replacing the dart-format / task-check-fast pair.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 12:36:30 +02:00
Thomas Güttler d2226388d7 deploy to android works now. 2026-04-27 08:44:42 +02:00
Thomas Güttler 2c3802b2d9 ... 2026-04-27 08:09:27 +02:00
Thomas GüttlerandClaude Sonnet 4.6 65c75c365a feat: replace custom search TextField with Flutter SearchBar widget
SearchBar is always visible in the AppBar bottom slot — no toggle needed.
Removed _isSearching, manual debounce timer, and slide animation.
SearchController listener clears results when text is emptied.
Updated E2E and widget tests for the new widget tree.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 08:04:20 +02:00
Thomas GüttlerandClaude Sonnet 4.6 2b260edb52 feat: MX record fallback in account auto-discovery
When JMAP well-known and autoconfig XML both fail, query DNS-over-HTTPS
(dns.google) for MX records and use the highest-priority MX host as IMAP
(993/SSL) and SMTP (587/STARTTLS) server. No new dependencies needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 07:46:28 +02:00
Thomas GüttlerandClaude Sonnet 4.6 e22418c6dd feat: add Email filters entry to FolderDrawer for JMAP accounts
The Sieve script editor was only reachable via the hidden popup menu on
the account list. Adding an 'Email filters' tile to the drawer makes it
discoverable from any mailbox view for JMAP accounts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 07:40:01 +02:00
Thomas GüttlerandClaude Sonnet 4.6 527683172c feat: bulk actions on search results via long-press selection
Long-pressing a search result enters selection mode; tapping further
results toggles them. The existing bottom bar (Archive, Delete, Mark
as spam, Move to folder) operates on the selected emails via a new
_selectedSearchIds set. _selectedEmailIds returns the right IDs for
each mode (search vs. normal thread list).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 07:32:44 +02:00
Thomas GüttlerandClaude Sonnet 4.6 2074046bb3 feat: split search query into words for AND semantics
Searching for "foo bar" now matches emails containing both words rather
than the exact phrase. Each whitespace-separated term generates its own
IMAP criterion (OR SUBJECT "w" TEXT "w") — multiple top-level IMAP criteria
are ANDed by the protocol — and its own Drift LIKE clause for the local DB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 07:27:14 +02:00
Thomas GüttlerandClaude Sonnet 4.6 0103454e31 feat: add 'All accounts' entry to FolderDrawer for back-navigation
Users had no obvious way to return to the account list after opening an
account. Adding an 'All accounts' tile at the top of the drawer (visible in
both MailboxListScreen and EmailListScreen) lets users navigate to /accounts
from anywhere inside an account.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 07:20:16 +02:00
Thomas GüttlerandClaude Sonnet 4.6 9c74dec866 perf: speed up deploy-android via MobSF pre-warm and parallel integration tests
Start MobSF as a dep of build-android (_mobsf-start) so it warms up during
the APK build instead of blocking afterwards (saves up to 90 s). Add
_integrations task to run integration and integration-ui in parallel since
they use random Stalwart ports and different Flutter build targets.

Also add `docker rm ... || true` before `docker run` in both _mobsf-start and
mobsf_scan.sh to handle stopped-but-not-removed containers gracefully.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 07:13:13 +02:00
Thomas GüttlerandClaude Sonnet 4.6 a2d98ed9bc fix: Android E2E search — unfocus IME keyboard before polling results
On Android, the soft keyboard keeps viewInsets.bottom non-zero while the
search TextField is focused.  ListView.builder is allocated near-zero
height and renders 0 items, so find.text(subject) always finds nothing
even though the IMAP search returned results.  Unfocusing the primary
focus after enterText dismisses the keyboard and gives the results list
full body height before pumpUntil starts polling.

Also fix pumpUntil to use pump(300ms) instead of pumpAndSettle() so a
continuously-running animation (spinner under CPU load) never prevents
settling, and override accountConnectionStatusProvider so _AccountTile
never shows a CircularProgressIndicator during the test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 22:31:25 +02:00
Thomas GüttlerandClaude Sonnet 4.6 ad31a3bf14 docs: move accountConnectionStatusProvider task to done.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:23:59 +02:00
Thomas GüttlerandClaude Sonnet 4.6 e50ff3cd1d fix: override accountConnectionStatusProvider in E2E test to prevent spinner deadlock
CircularProgressIndicator in _AccountTile (from accountConnectionStatusProvider)
runs continuously and prevents pumpAndSettle() from ever settling on Android,
causing frame-pump storms that drop the StreamBuilder data state and make
tap(aliceTile) find 0 widgets.

Overriding the provider to return immediately means no spinner ever enters the
tree, so pumpUntil() can use pumpAndSettle() cleanly again.

Also adds task run-android (boots sharedinbox_test AVD and runs flutter run).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 21:22:38 +02:00
Thomas GüttlerandClaude Sonnet 4.6 c4928ef362 fix: Android E2E — robust account-tile finder, search debounce, DEFUNCT error filter
- pumpUntil uses ListTile-scoped finder so it doesn't exit early when
  'Alice' is still in the form's EditableText before navigation pops
- tap(aliceTile) reuses that same finder instead of a second find.text
- EmailListScreen search bar adds onChanged debounce (300ms) so the
  test never needs receiveAction(TextInputAction.search), which caused
  a keyboard-dismiss animation that triggered layout overflow in
  disposed render objects
- FlutterError.onError filter in the test suppresses DEFUNCT/DISPOSED
  overflow errors from Android's route-teardown layout passes
- integration_android_test.sh: force-stop + pm clear before uninstall
  so stale app data can't bleed into subsequent runs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 20:04:31 +02:00
Thomas GüttlerandClaude Sonnet 4.6 077ddbd9c3 fix: Android app startup — INTERNET permission, MobSF scan, E2E robustness
- Add INTERNET permission to main AndroidManifest.xml (was missing from
  release builds, causing all network calls to fail on device)
- Add scripts/mobsf_scan.sh: uploads release APK to MobSF after each
  build and asserts required permissions are declared; docker pull -q
  suppresses progress-bar noise
- Wire MobSF scan into build-android task; add mobsf-stop convenience task
- Fix _AccountTile subtitle overflow on Android: replace Column([Text,Text])
  with single Text('email\ntype') so ListTile can measure height correctly
- E2E test robustness on Android: use pumpUntil(find.text('Alice')) instead
  of pumpUntil(FAB)+expect to handle Drift background-isolate stream delay;
  add skipOffstage:false to tap; remove stale email-address assertion
- Uninstall app before each Android integration test run to clear leftover
  DB state and prevent "Unable to start the app" on repeated runs
- Update widget tests to use find.textContaining for merged subtitle text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:02:19 +02:00
Thomas GüttlerandClaude Sonnet 4.6 40cbf0b3b0 fix: Android E2E — use adb reverse instead of Platform.environment for Stalwart ports
Platform.environment is empty inside the Android app process, so the dynamic
IMAP/SMTP port numbers exported by the test script were never visible to the
Dart test code.  The test fell back to its defaults (127.0.0.1:1430/1025),
which aren't reachable inside the emulator.

Replace the export STALWART_IMAP_HOST=10.0.2.2 approach with
  adb reverse tcp:1430 tcp:$STALWART_IMAP_PORT
  adb reverse tcp:1025 tcp:$STALWART_SMTP_PORT
so the emulator's loopback ports 1430/1025 forward to the actual random host
ports — matching the test's hard-coded defaults exactly.  Clean up the
forwarding rules in the EXIT trap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:49:31 +02:00