87 Commits
Author SHA1 Message Date
Dat Dang 62f5e8fd47 Fix web Patrol flakes and remove dead GitHub nightly Android workflow (#5127) 2026-11-18 18:54:05 +07:00
Dat Dang eab476da45 ci: cancel superseded workflow runs on the same PR (#5151)
* ci: cancel superseded workflow runs on the same PR

* ci: skip test reports for cancelled upstream runs

Addresses: 4583936850, 6931471819
https://github.com/linagora/tmail-flutter/pull/5151#discussion_r4583936850
https://github.com/linagora/tmail-flutter/pull/5151#issuecomment-6931471819

* ci: rely on called workflow concurrency for memory-check label runs

Addresses: 4583936853, 6931471819
https://github.com/linagora/tmail-flutter/pull/5151#discussion_r4583936853
https://github.com/linagora/tmail-flutter/pull/5151#issuecomment-6931471819
2026-11-17 13:53:45 +07:00
Dat Vu 7405c072bc Drop unsafe-inline from the web CSP with a per-request script nonce (#5135) 2026-11-13 16:51:45 +07:00
Dat Vu 54fee9ffb5 Chore: upgrade Flutter to 3.47.9 (#5083) 2026-11-11 17:21:45 +07:00
Dat Dang 1ca9c82acb Add automated memory leak check for web and Android (#5113) 2026-11-09 09:19:45 +07:00
Dat Vu 44976aaf92 Run iOS Native Unit Tests On Pull Requests (#5116)
* ci: run TwakeMailTests iOS unit tests on pull requests that change ios/

* ci: stop persisting the checkout token and keep the xcodebuild status when xcbeautify fails in ios-native-test

* ci: pick an iPhone on the newest iOS runtime and annotate xcodebuild launch failures in ios-native-test

* ci: run ios-native-test on pubspec and iOS setup script changes and drop the unused Firebase env step

* ci: time out the ios-native-test step before the job and print the raw log when xcbeautify fails

* ci: raise the ios-native-test job timeout to 60 minutes so setup fits beside the 35-minute test step
2026-11-09 09:17:07 +07:00
Dat Dang cab851c4fe Speed up the Patrol integration suites with a backend per test, web workers and FTL shards (#5068) 2026-11-06 15:32:36 +07:00
Dat H. Pham 4f776e5572 fix(ci): pass SENTRY_AUTH_TOKEN as BuildKit secret, not build-arg (#5088) 2026-11-03 17:32:33 +07:00
Dat Dang 8be9171f41 Keep CI logs to diagnose flaky Patrol tests (#5029) 2026-10-28 15:31:59 +07:00
Dat Dang 94869ef006 Check every HTML pipeline on its own viewer with named rule sets (#5020) 2026-10-22 13:04:45 +07:00
Dat Dang 9c025709df Pass secrets to the release security scan (#5014) 2026-10-21 10:48:27 +07:00
Dat H. Pham fe148f2f81 Test HTML email display rules on every viewer and pane width (#4966) 2026-10-21 05:01:30 +07:00
Dang Dat cf7959c6b6 fix(ci): pin web integration test runner to ubuntu-24.04
Playwright does not support chromium on ubuntu-26.04, which ubuntu-latest now resolves to.
2026-10-20 15:40:06 +07:00
Dat H. Pham 97e93affcf Harden Dependabot lockfile recompile against package build code
Resolve with --no-build against manylinux_2_34 (semgrep 1.179.0 ships no
older Linux wheel, so uv fell back to building its sdist), install the
lockfiles wheels-only, and push only lockfiles and overrides.txt, failing
on any other change. Keep the original lockfile until uv succeeds, and
note that Dependabot stops rebasing a PR once this commit lands.
2026-10-20 10:04:26 +07:00
Dat H. Pham 3c1b484f1b Recompile security lockfiles on Dependabot PRs
Dependabot edits the hash-pinned requirements files line by line, so the
mcp bump kept the 1.29.0 hashes in requirements-mobsfscan.txt and moved
requirements-semgrep.txt to mcp 1.30.0 although semgrep 1.179.0 pins
mcp==1.29.0.

Commit the uv inputs (*.in, overrides.txt), a compile-requirements.sh
that regenerates every lockfile from them while keeping existing pins as
preferences, and a workflow that runs it on Dependabot PRs, checks each
lockfile installs with --require-hashes, and pushes the result.
2026-10-20 10:04:26 +07:00
Dat Dang c936325076 2509 Add release security scan workflow (#4958) 2026-10-19 11:15:28 +07:00
Dat H. Pham e7f287473c [MCP Marionette] Use MCP to drive the UI (#4916) 2026-10-07 11:37:30 +07:00
dab246 5399267098 TF-4809 Part 3: Restore web Sentry after consent is re-enabled 2026-10-05 12:22:17 +07:00
Dat Vu 585b1083f8 Run every test in CI without registration (#4903) 2026-09-28 17:19:54 +07:00
Dang Dat 4909d45223 TF-4805 Add browser and stub tests for PlatformWebSelectionDomAdapter
Addresses: 5149817875
https://github.com/linagora/tmail-flutter/pull/4813#pullrequestreview-5149817875
2026-09-11 09:27:57 +07:00
Dat Dang 0120702963 Add manual Sentry web image workflow (#4814) 2026-09-10 09:28:46 +07:00
Dat Dang de880a8b5c Implement fetchJson for workplace web (#4804) 2026-09-09 17:01:57 +07:00
Dat Vu 3debda2ba1 TF-4799 Fix HTML Mail be truncated in width (#4806) 2026-09-09 05:02:09 +07:00
Dat H. Pham a405777be7 fix: write flutter test report to a file instead of stdout 2026-08-27 15:32:53 +07:00
Dat Dang 32740868b1 TF-4728 Delete unused drive picker architecture (#4763) 2026-08-19 11:05:16 +07:00
Dat Dang 7d7ad0f150 TF-4727 [Part-2] Add web OPFS drive file stager and strategy selection (#4746)
* TF-4726 Add web OPFS drive file stager and strategy selection

TF-4727: streams a drive document via fetch()/ReadableStream into an
Origin Private File System temp file, uploaded via raw XHR (the only
upload FileUploader can't do). drive_transfer_strategy_factory_web.dart
picks OPFS vs. the already-merged buffered strategy based on cached
feature detection. Depends only on the drive_transfer interfaces and
the buffered strategy already merged; independent of the IO stager.

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3763755085

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3763755085

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3763760860

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3763760860

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3763766518

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3763766518

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3763775476

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3763775476

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3763839738

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3763839738

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764281232

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764281232

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764291419

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764291419

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764661702

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764661702

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764662457

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764662457

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764620926

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764620926

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764626632

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764626632

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764601732

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764601732

* fixup! TF-4726 Add web OPFS drive file stager and strategy selection

review-comment: 3764608947

https://github.com/linagora/tmail-flutter/pull/4746#discussion_r3764608947
2026-08-12 16:45:58 +07:00
Dat Vu e9b412dbfa TF-4664 Fix can't set my break line in my answer where I want (#4734) 2026-08-06 18:07:03 +07:00
Dat Vu bf804ee25e TF-4738 Fix response view while drive picker loading display prevent drive picker (#4740) 2026-07-31 09:17:17 +07:00
Dat Dang 5cb37046d5 TF-4674 Handle download no extension attachment (#4701) 2026-07-15 12:09:57 +07:00
Dat Dang 709d19eaf8 HOTFIX Remove github pages CI (#4704) 2026-07-14 20:53:42 +07:00
Dat H. Pham b88920c652 [CI] Try to run web E2E in release also (#4657) 2026-07-01 15:11:46 +07:00
Dat Dang 7ad09bd2d5 TF-4449 Drive backend integration (#4629) 2026-06-30 13:31:54 +07:00
Dat H. Pham ce211a0354 ci: upload gym log artifact on iOS build failure 2026-05-22 17:56:47 +07:00
dab246 6443ef80b1 Update CI cache key to hash single workspace pubspec.lock 2026-05-21 13:25:43 +07:00
Dat Dang 3851df15c6 Patrol isolate Android tests (#4469)
* Patrol POC replace Firebase Test Lab with local Android emulator

Replace GCloud auth, Firebase Test Lab, and ngrok with a local Android AVD via
reactivecircus/android-emulator-runner on CI. The backend runs in Docker and is
reachable from the emulator at the QEMU host alias 10.0.2.2.

CI / scripts:
- Remove Google Cloud auth, Firebase run step, and ngrok tunnel
- Add KVM, Gradle, and AVD cache setup; shard tests across 4 parallel runners
- Scripts: drop ngrok, point jmap.properties to 10.0.2.2, manage cleanup via trap
- prebuild.sh: parallelize module builds, suppress noisy output
- provisioning.sh: parallelize james-cli/curl calls, fix hardcoded container IP

Backend reset for test isolation:
- Add backend-reset-server.py: HTTP server that restarts tmail-backend and
  re-runs provisioning on POST /reset, so each test starts with a clean state
- Add BackendResetClient.dart: Dart client called in patrolTearDown
- Reduce visibleTimeout 30s → 10s; allow insecure connections in debug mode

* Patrol POC fix flaky tests

Replace fixed pumpAndSettle delays with waitUntilVisible/waitUntilExists so
tests react to actual UI state rather than arbitrary timeouts.

- Add PatrolFileExtensions.toFileInfo() and use it in composer robot/scenario utils
- Guard MobileEditorWidget.dispose() under isIntegrationTesting to prevent teardown crash
- Fix scroll direction (AxisDirection.down) in calendar attendee button scroll
- Add scrollTo() before tap in label modal robot and edit-tag scenario
- Wait on EmailTileBuilder (not label name) after email provisioning — more reliable
- Inline image: wait for HtmlContentViewer to contain base64 data before asserting
- Use native platform wait for inline image in upload scenario
- Remove unnecessary Future.delayed and extra pumpAndSettle calls
- Pre-select English before switching language to ensure deterministic starting state
- Fix app_grid back-press sequence
2026-05-11 08:09:31 +07:00
Dat Dang a3e8fdb5af HOTFIX iOS 26 release build (#4501) 2026-05-08 09:51:12 +07:00
Dat H. Pham 1f29e96c21 Upgrade xcode to version 26 2026-05-05 16:24:25 +07:00
dab246 60381b36ba TF-4269 Fix misleading comments and add NSE breadcrumb for background push
- Add breadcrumb after foreground check so it only fires on background processing
- Fix ADR and CI/Fastfile comments: pubspec is always X.Y.Z, no -rc suffix
2026-04-22 15:41:28 +07:00
dab246 85f2e6546c TF-4269 Apply PR review: breadcrumbs, log error details, and code cleanup for NSE Sentry integration
- Replace capture(message:) with addBreadcrumb(level: .warning) in NotificationService for non-error diagnostic checkpoints
- Add addBreadcrumb method to SentryManager with category/level support
- Include error details in KeychainController SentryConfig decode failure log
- Split combined guard into two separate guards to distinguish nil state vs unchanged state
- Remove dead do-catch block in onComplete closure; use errors.forEach to capture real errors
- Translate Vietnamese doc comment to English in SentryManager
2026-04-22 15:41:28 +07:00
dab246 0ec37d998c TF-4269 Fix Sentry
release version: keep full version including -rc suffix

      Use full pubspec version (e.g. 0.28.3-rc08) as SENTRY_RELEASE for both
      Android and iOS, matching the version the app reports at runtime.
      Validation still compares base versions only (strips -rc suffix) to
      allow rc tags to match the base version in pubspec.
2026-04-22 15:41:28 +07:00
dab246 cdedbf4e6b TF-4269 Fix Sentry dSYM upload: find xcarchive via find instead of gym_archive_path.txt
lane_context[XCODEBUILD_ARCHIVE] was unreliable — replace with find on
~/Library/Developer/Xcode/Archives to locate the Runner xcarchive directly.
2026-04-22 15:41:28 +07:00
dab246 230cbf647f TF-4269 Integrate Sentry into iOS NSE and automate dSYM upload in CI 2026-04-22 15:41:28 +07:00
Dat Dang b18813a096 Patrol web POC (#4450)
* Patrol POC add UIKeys to production widgets for web testability

Add semantic UIKeys to composer widgets, login controller, mailbox
dashboard, thread view, and web finger extension to enable reliable
widget targeting in Patrol web integration tests.

* Patrol POC add web login and send email Patrol integration test scenarios

Add web-specific test scenarios (login with basic auth, send email),
a new web_send_email_test entry point, and a web tag in TestTags.
Update test_base, requires_login_mixin, composer_robot, and
thread_robot to support web platform.

* Patrol POC add Patrol web integration test workflow and scripts

Add GitHub Actions workflow for running Patrol web integration tests.
Add patrol-web-integration-test-with-docker.sh and
patrol-web-local-integration-test-with-docker.sh scripts.
Minor fix to patrol-local-integration-test-with-docker.sh.

* Patrol POC update gitignore and web/index.html for Patrol web support

* poc: implement cross-platform robot factory architecture

Introduces Abstract Factory + conditional export infrastructure from
ADR-0081. Platform selection resolved at compile time via dart.library.html
— no if/else in any logic class.

New structure:
- factories/: RobotFactory, Mobile/WebRobotFactory, conditional provider
- robots/abstract/: AbstractLogin/Thread/ComposerRobot interfaces
- robots/mobile/: thin wrappers over existing robots
- robots/web/: WebComposerRobot overrides addContent for web
2026-04-21 14:34:47 +07:00
Dat Dang 77e2381ca9 Upgrade Flutter to 3.38.9 (#4455) 2026-04-17 17:39:29 +07:00
Dat Vu 1d594804b5 TF-4268 Automate Sentry symbol upload for Android release builds (#4442) 2026-04-14 12:32:03 +07:00
dungphampt a91cd8f86f sentry intergration & upload source map (#4311) 2026-02-06 23:11:17 +07:00
dab246 d686b66f75 TF-4058 Update E2E test to compatible with flutter version 3.32.8 2025-10-15 13:54:34 +07:00
dab246 bac16e3c29 TF-4058 Upgrade flutter version to 3.32.8 for CI and Dockerfile 2025-10-15 13:54:34 +07:00
dab246 c15353ccad fix(ci): prevent "No space left on device" by cleaning up and using release build 2025-09-29 21:22:23 +07:00
DatDang 4fd0931c9e TF-3586: Upgrade Flutter to 3.27.4 2025-07-30 15:24:57 +07:00