Commit Graph
97 Commits
Author SHA1 Message Date
Dang Dat 281bc510e3 ci: stop a hung Android memory check on silence and keep logcat
The first Android run hung for 39 min between two tests and was only
cancelled by the 60 min job limit. Kill patrol after 4 min without output
once the tests start (10 min during the Gradle build), print Flutter logs
and save logcat on failure. Android job limit is 35 min.
2026-11-06 15:40:29 +07:00
Dang Dat 2bc85d5d99 ci: run the memory leak check on release tags and memory-check PRs
Run the check on web and Android in profile mode against a local backend, in
parallel with the security scan on tags. Add the Android profile build type
and the docs.

Refs #4365
2026-11-06 15:40:29 +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 8b00548822 Show the LLM section of the security report unfolded (#5087) 2026-11-03 14:02:49 +07:00
dependabot[bot] 8969fb7a8c Build(deps): Bump setuptools from 84.0.0 to 84.1.0 in /.github/security (#5074)
Bumps [setuptools](https://github.com/pypa/setuptools) from 84.0.0 to 84.1.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v84.0.0...v84.1.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 84.1.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 20:56:42 +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
dependabot[bot] 149fb754a3 Build(deps): Bump uv from 0.11.17 to 0.13.4 in /.github/security (#5019)
Bumps [uv](https://github.com/astral-sh/uv) from 0.11.17 to 0.13.4.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.11.17...0.13.4)

---
updated-dependencies:
- dependency-name: uv
  dependency-version: 0.13.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-21 10:55:38 +07:00
dependabot[bot] 89b506e331 Build(deps): Bump certifi in /.github/security (#5018)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2026.7.22 to 2026.10.19.
- [Commits](https://github.com/certifi/python-certifi/compare/2026.07.22...2026.10.19)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.10.19
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-21 10:54:48 +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 8021dfa82d Limit Dependabot to security-scan tooling in one weekly PR
Drop the docker (production nginx image) and github-actions entries so
Dependabot never touches what ships, and group the scanner pip and
opencode npm updates into a single weekly multi-ecosystem PR.
2026-10-20 10:04:26 +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
dependabot[bot] 040e4080b3 Build(deps): Bump mcp from 1.29.0 to 1.30.0 in /.github/security
Bumps [mcp](https://github.com/modelcontextprotocol/python-sdk) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases)
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md)
- [Commits](https://github.com/modelcontextprotocol/python-sdk/compare/v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: mcp
  dependency-version: 1.30.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-20 10:04:26 +07:00
Dat H. Pham 05ae9e4ce3 Cover pipeline call sites and quote escaping; drop tests that prove nothing 2026-10-20 10:03:55 +07:00
Dat H. Pham fa2213d1c9 fixup! Require review when HTML transform or display fixtures change 2026-10-20 10:03:55 +07:00
Dat H. Pham 047adddcf4 Lock HTML sanitizer policy and transform pipelines with golden files 2026-10-20 10:03:55 +07:00
Dat H. Pham 62a923d7d8 Require review when HTML transform or display fixtures change 2026-10-20 10:03:55 +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