Commit Graph
295 Commits
Author SHA1 Message Date
Thomas SharedInboxandClaude Sonnet 4.6 9ed85e1c51 fix(test): fix _zOrderIndex race by syncing focus before field/screen transitions
RawAutocomplete's OverlayPortalController.hide() was called twice:
once when focus left the To field and again when ComposeScreen was popped,
triggering the _zOrderIndex assertion in overlay.dart.

Fix by:
1. pump() after entering the To field so the overlay has a frame to close
   before the Subject field takes focus.
2. unfocus() + pump() before tapping Send so the overlay is already hidden
   when the screen pops, preventing a second hide() on unmount.

Remove the _zOrderIndex string-filter from FlutterError.onError — the
root cause is fixed rather than suppressed.

Fixes #79

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 23:06:57 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 ebff60a4d4 fix(ui): guard ref.read with mounted checks in _delete after async gaps
After showDialog and after the two repo awaits (getEmail/deleteEmail),
the widget may have been disposed — calling ref.read on a disposed
ConsumerStatefulElement throws "Cannot use 'ref' after the widget was
disposed." Add if (!mounted) return; at both points.

Fixes #80

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 23:04:11 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 7aa9ddbe07 fix(ci): make SSH deploy steps continue-on-error
SSH secrets (SSH_USER, SSH_HOST, SSH_PRIVATE_KEY) are not yet configured
as repository secrets. Mark the four SSH-dependent steps continue-on-error
so the Play Store deploy job succeeds while those secrets are pending.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 23:02:47 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 251e9d051e fix(ci): pass ANDROID_KEYSTORE_PASSWORD to deploy-apk-to-server step
The deploy-apk-to-server task depends on build-android which signs the
APK — it needs the keystore password or the packageRelease Gradle task
fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:52:49 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 c3b814db54 fix(test): restore ErrorWidget.builder immediately after app.main()
_verifyErrorWidgetBuilderUnset is called from _runTestBody after testBody()
returns, but addTearDown callbacks run after _runTestBody — so teardown is
too late for this check. Restore ErrorWidget.builder inline, right after
app.main() sets it, so the binding sees the original value when it verifies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:39:41 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 97cf35a10a fix(test): restore ErrorWidget.builder in E2E teardown
app.main() also sets ErrorWidget.builder to its CrashScreen handler.
The test binding's _verifyErrorWidgetBuilderUnset check fires when
ErrorWidget.builder != its pre-test value after the test completes.
Save and restore ErrorWidget.builder alongside FlutterError.onError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:32:48 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 4e5b523ccc fix(test): filter _zOrderIndex overlay assertion in E2E error handler
OverlayPortalController.hide() asserts _zOrderIndex != null before
clearing it. In headless tests without navigation animations, rapid
screen dismissal can trigger hide() twice (once on focus loss, once on
widget unmount) — a Flutter framework race that overlay.dart itself
notes should not happen during rebuilds. Filter it alongside the
existing DEFUNCT/DISPOSED suppressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:26:53 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 a4cbe35b0f fix(test): override FlutterError.onError after app.main() to fix E2E hang
app.main() synchronously sets FlutterError.onError to its crash-screen
handler, overwriting the filter the test had registered first. The test
binding's _runTest finally-block checks FlutterError.onError != _recordError
and fires assertion '_pendingExceptionDetails != null', which prevents the
integration test framework from calling exit() — causing the process to hang
for the full 360-second timeout.

Fix: capture the binding's error recorder (bindingError) before app.main(),
call app.main() first, then install the DEFUNCT/DISPOSED filter pointing at
bindingError, and restore to bindingError in teardown. This keeps the crash
handler from interfering with the test binding's error tracking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:19:11 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 cc108b4788 fix(sync): cancel backoff/idle timers on stop to prevent process hang
Future.any([Future.delayed(N), stopSignal.future]) left unfired Timers
alive after stop() fired the signal — pending Timers kept the Dart event
loop running and prevented the process from exiting, causing the E2E
integration test to time out (exit 124) instead of exiting cleanly.

Replace all four occurrences with an explicit Timer that completes the
stop-signal and is cancelled in a finally block, so the Dart isolate can
exit as soon as the sync loops are stopped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:03:26 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 4b83d3e456 feat(cd): continuous delivery — scp APK to server and build Hugo history
- scripts/generate_build_history.py: SSH into server, list APKs under
  public_html/builds/YYYY/MM/DD/, fetch commit titles from Codeberg API,
  and write Hugo content pages to website/content/builds/
- Taskfile: add deploy-apk-to-server and generate-build-history tasks;
  add --exclude='*.apk' to website-deploy rsync so APKs survive redeploy
- CI: after Play Store deploy, set up SSH key, scp APK, generate history,
  then deploy website
- .gitignore: exclude website/content/builds/ (generated at deploy time)
- website/hugo.toml: add Builds nav item

Closes #73

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:46:56 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 a29d0e93b4 feat(sync): add View log button to sync error banner
When a sync failure banner appears in the email list screen, a new
'View log' button navigates directly to the account's sync log screen
so the user can see the full error details.

Also creates issue #75 for the first-snooze-in-new-account failure.

Closes #13

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:35:59 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 02b0fec0b6 feat(compose): autocomplete To/Cc from local address history
Adds RawAutocomplete<EmailAddress> to the To and Cc fields in the
compose screen. As the user types (minimum 2 chars), suggestions are
fetched from the local DB by searching from/to/cc columns of cached
emails. Selecting a suggestion appends it to any existing addresses
already in the field (comma-separated).

New repository method searchAddresses() returns deduplicated
EmailAddress objects matching the query string.

Closes #11

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:30:17 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 032595d7d5 feat(hooks): add pre-commit check for binary file additions
Blocks accidental commits of build artifacts, databases, and compiled
binaries. Image and font formats (png, jpg, svg, ttf, woff, etc.) are
allowed. Uses git diff --numstat binary detection (-  -  path).

Closes #4

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:12:52 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 26a9a5e6f3 feat(crash): add app version and device info to crash reports
Issue reports now include:
- App version (from package_info_plus)
- OS name and version (non-personal, from dart:io Platform)
- Error and stack trace wrapped in triple-backtick code blocks
  so Codeberg renders them as preformatted text

Closes #59

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:52:40 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 6f030213a7 fix(ci): fetch last 50 commits so changelog has all entries
actions/checkout defaults to fetch-depth: 1 (shallow clone).
generate-changelog runs git log -n 50, so only one entry appeared
in the built app. Fetching 50 commits gives a complete changelog.

Closes #64

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:45:21 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 9686785abf docs(issue-template): remove auto-assigned State/Ready label
The user should set State/Ready manually when the issue is ready
to be worked on, not automatically on creation.

Closes #74

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:43:43 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 47bdf3ec35 fix(ci): reduce verbose output in CI jobs
- Add --no-warn-dirty to all nix develop calls to suppress Git dirty-tree warnings
- Switch integration test reporter from expanded to compact (per-test names suppressed on success)
- Show only summary line on integration test success, matching unit/widget test behavior

Closes #8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:42:37 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 d932f59f25 fix(ui): show all SnackBars for 5 seconds instead of Flutter default 4s
Closes #17

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:37:06 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 2985198d9c fix(repo): guard moveEmail/setFlag/deleteEmail against missing rows
getSingle() throws 'Bad state: No element' when the email row is gone
(race condition in batch operations or already deleted). Switch to
getSingleOrNull() and return early so batch moves/flags/deletes on
stale IDs fail silently instead of crashing.

Closes #58

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 20:32:25 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 ca28bd01af fix(imap): fetch full message for attachment download to fix base64 decoding
A partial BODY.PEEK[n] fetch omits the section's MIME headers, so
enough_mail's decodeContentBinary() has no Content-Transfer-Encoding
and returns the raw base64 string instead of the decoded bytes.
Fetching BODY.PEEK[] gives enough_mail the full MIME structure and
getPart(fetchPartId) correctly decodes the attachment.

Also adds an integration test that creates an email with a binary
attachment, syncs it, and asserts the downloaded bytes match the
original — this test failed before the fix.

Closes #70

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:44:09 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 3802ca57ed fix(ui): hide AppBar back button on Android/iOS
Mobile platforms provide OS-level back navigation (swipe gesture),
so the redundant AppBar back button only clutters the toolbar.
Desktop keeps it since there is no system back gesture.

Closes #69

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:29:25 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 53757595c4 revert(android): restore epoch seconds for build-number
The (YY-20)mmddHHMM formula generates ~605M for 2026, which is lower
than existing epoch-second deployments (~1.747B). Google Play rejects
version code regressions at commit time (403 Forbidden).

Blocked — see issue #63 for context.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:00:02 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 71a88358f5 docs: add issue template with label workflow reminder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 18:53:26 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 f0c0eeb9a4 docs(agents): add explicit fgj commands for issue label transitions
Makes the InProgress-first rule harder to skip by including the exact
command to run, so there is no ambiguity about how or when to do it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 18:49:00 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 28b86ec1be fix(android): use human-readable build number (YY-20)mmddHHMM
Replaces epoch seconds with a compact date-based integer so the Play
Store version code is interpretable by humans while staying below the
2 100 000 000 upper bound until ~2040.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 18:26:43 +02:00
Thomas SharedInbox caa238303e docs 2026-05-14 18:24:07 +02:00
Thomas SharedInbox c0d6699f92 AGENTS: issue workflow 2026-05-14 18:14:19 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 c46de2abb8 fix(android): use epoch seconds for versionCode, not yymmddhhmm
date +%y%m%d%H%M for 2026-05-14 17:17 = 2605141717 which exceeds
Android's 2100000000 versionCode cap, aborting the build.
Epoch seconds (~1.75B today) stay under the cap and remain unique.
Human-readable build-name (yymmddhhmm) is unchanged for issue #63.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 17:19:50 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 3dbd8f53be fix(ci): move Play Store deploy into ci.yml; drop release.yml
workflow_run is not supported by Forgejo Actions — release.yml never
fired after CI passed.  Port the deploy-playstore job into ci.yml with
needs: check + if: main, matching the pattern already used by build-linux.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 17:11:00 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 f7e75cd5b6 fix(test): update E2E test for onboarding screen + increase timeouts
The U7 onboarding view replaced "No accounts yet." with "Welcome to
SharedInbox", causing the E2E test to spin for the full timeout budget
(pumping slowly in headless CI) before failing. Fix the finder and
bump per-attempt timeout from 240s → 360s and CI job ceiling from
20 min → 30 min to give the full account-add → send → verify flow
room to complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 16:56:53 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 9c1d8cfe72 fix(ci): manage Xvfb directly to get accurate E2E exit codes
xvfb-run catches SIGTERM from `timeout`, kills its children, and exits 0,
making a timed-out test indistinguishable from a pass (CI #168 false positive).
Running Xvfb ourselves captures fvm flutter test's real exit code so timeouts
(exit 124) are correctly treated as failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 16:45:38 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 d12cdd6ca4 fix(e2e): kill stale processes + retry once on display init hang
Previous failed CI runs leave orphan sharedinbox/flutter processes that hold
onto Xvfb display resources, causing the next run's GTK app to hang during
initialisation (never connects back to the flutter test runner, no output
for 9+ min until timeout fires).

Fix:
- Kill stale sharedinbox/flutter processes before launching xvfb-run
- Retry the xvfb-run call once (4-min timeout per attempt) so a transient
  display-init hang doesn't permanently fail the job

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 16:27:48 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 5ede675668 fix(ci): revert to single task check step to preserve build cache
Splitting into separate steps breaks the Dart compilation cache that task
check builds up via parallelism. Without the shared cache, flutter test
integration_test/ -d linux rebuilds cold (9+ min instead of ~24s).

Keep the single 'nix develop --command task check' step which runs
analyze+build-linux+test in parallel (Task deps) and warms the cache
before the E2E test. Add timeout-minutes: 20 as a job-level safety net.
The xvfb-run timeout 600 (already in integration_ui_test.sh) still
prevents infinite hangs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 16:09:18 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 0d6a8062e4 fix(ci): increase E2E timeout to 10 min (was 5 min, too tight)
Sequential CI steps leave the runner under heavier load than the parallel
task check approach, so the E2E test can legitimately take 4-5 min.
Raise timeout 300→600 in integration_ui_test.sh and step timeout 6→12 min.
Job-level ceiling raised to 30 min to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 15:51:58 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 b95545dff2 fix(ci): generate changelog before analyze (assets/ must exist)
The assets/ directory is created by generate-changelog. Splitting CI into
separate steps meant analyze ran before any step created it, causing a
pubspec.yaml asset_directory_does_not_exist warning that fails the check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 15:39:39 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 c45b0e852e ci: add step-level timeouts and cap E2E hang at 5 min (#67)
- Split single 'Run Full Check Suite' step into named steps so per-step
  timing is visible in the CI UI
- Add timeout-minutes: 20 to the overall job and timeout-minutes: 6 to
  the UI E2E step — previously a stuck xvfb-run could hang for 23+ min
- Add 'timeout 300' to xvfb-run in integration_ui_test.sh so the E2E
  test exits with a clear error instead of hanging indefinitely

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 15:36:31 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 f6f10700f8 feat: select all, human-readable build version, release gated on CI
- Add Select All button to AppBar during selection mode (#15)
- Replace Unix timestamp build number with yymmdd-hhmm format (#63)
- Gate release.yml on CI workflow success via workflow_run event
- Update golden for email_list_selection to reflect new Select All button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 14:23:54 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 d8d0f89c68 fix(ci): switch Play Store uploader from httplib2 to requests
httplib2 raises RedirectMissingLocation on Google Play's resumable upload
redirects, causing every deploy since run #77 to fail. Replace google-api-python-client
+ google-auth-httplib2 with a direct requests-based implementation using
AuthorizedSession; drop httplib2 from flake.nix entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 12:12:56 +02:00
Bot of Thomas Güttler 1581d145a5 docs: SYNC.md — full email action lifecycle (D3) (#54) 2026-05-14 12:01:26 +02:00
Bot of Thomas Güttler 12639d1e24 feat: onboarding walkthrough for first-time users (U7) (#55) 2026-05-14 11:57:08 +02:00
Bot of Thomas Güttler 2f1bff8922 ci: enforce ui/→data/ layer boundary (A5) (#53) 2026-05-14 11:41:34 +02:00
Bot of Thomas Güttler dd66c3834d test: golden tests for key EmailListScreen states (T5) (#52) 2026-05-14 11:33:45 +02:00
Bot of Thomas Güttler 548f4e92dc perf: cache formatted date strings in EmailListScreen (P5) (#51) 2026-05-14 11:31:19 +02:00
Bot of Thomas Güttler 5311720a7e fix: open HTML email links in external browser (S4) (#50) 2026-05-14 11:26:33 +02:00
Bot of Thomas Güttler a723380560 perf: defer HTML-to-plain conversion off the UI thread (P3) (#49) 2026-05-14 11:14:23 +02:00
Bot of Thomas Güttler 499774d1a6 feat: add 'Mark all as read' to mailbox overflow menu (U8) (#48) 2026-05-14 10:58:33 +02:00
Bot of Thomas Güttler 132b6aeb9a feat: recent searches history in SearchScreen (U3) (#47) 2026-05-14 10:51:28 +02:00
Bot of Thomas Güttler efd5a1fc17 test: AccountSyncManager integration tests without real servers (A3) (#46) 2026-05-14 10:49:29 +02:00
Bot of Thomas Güttler 44e387bfb3 fix: treat TLS config errors as permanent in sync loops (R5) (#45) 2026-05-14 10:29:07 +02:00
Bot of Thomas Güttler 546b06ba5a test(T3): add contract test suites for Account/Mailbox/Email repositories (#43) 2026-05-14 10:20:32 +02:00