Commit Graph
5108 Commits
Author SHA1 Message Date
Dang Dat 20f216baa7 HOTFIX Support iOS 26 2026-05-08 10:34:41 +07:00
Dat Dang a3e8fdb5af HOTFIX iOS 26 release build (#4501) 2026-05-08 09:51:12 +07:00
Dang Dat 845161cb62 HOTFIX Sentry disable default replay 2026-05-07 15:33:14 +07:00
Dat H. Pham 6ac0b97796 Bump version to v0.28.12 v0.28.12 2026-05-05 16:24:25 +07:00
Dat H. Pham 1f29e96c21 Upgrade xcode to version 26 2026-05-05 16:24:25 +07:00
Dat H. Pham 6ef53bb56b Bump version to v0.28.11 v0.28.11 2026-05-05 15:15:20 +07:00
Dat H. Pham 7b67c0677d Bump version to v0.28.10 2026-05-05 15:13:06 +07:00
Dat H. Pham 83e6deb508 Fix Fastlane for iOS and Android 2026-05-05 15:13:06 +07:00
Dat H. Pham d36742d4b3 Bump version to v0.28.9 v0.28.9-rc01 2026-05-05 14:50:17 +07:00
Dat H. Pham 5e1348f261 Fix sentry minified (#4481) 2026-05-05 14:19:28 +07:00
Dat Vu 3b47b799fe Implement not include events filter for search (#4451) 2026-05-05 11:04:48 +07:00
Dat Vu ba1ac18314 fix(logger): Reduce Sentry noise with targeted error logging (ADR-0076) (#4467) 2026-05-05 11:01:45 +07:00
Dat Dang 5e4ffcba41 TF-4475 Fix mobile misplaced inline when picked (#4476) 2026-05-04 09:29:01 +07:00
Dat Vu 53d0c25ce4 docs(adr): add ADR-0086 for Android composer draft loss on background (#4477) 2026-04-29 18:52:37 +07:00
Dat H. Pham b0e349029f fix(logging): minor issue for logging and docs 2026-04-28 11:31:12 +07:00
dab246 1a30b3f681 refactor(logging): rename handles() to canHandle() for clarity 2026-04-28 11:31:12 +07:00
dab246 86a3097f19 fix(sentry): wrap addBreadcrumb with unawaited to avoid blocking callers 2026-04-28 11:31:12 +07:00
dab246 772a8b8453 style(logging): remove section divider comments in console_log_handler_test 2026-04-28 11:31:12 +07:00
dab246 6a6a9c2509 refactor(sentry): simplify _captureExceptionInternal by unifying withScope setup 2026-04-28 11:31:12 +07:00
dab246 26ed041e34 refactor(logging): pass LogRecord to handles() and add default implementation via acceptsLevel() 2026-04-28 11:31:12 +07:00
dab246 4c0fa41d5b refactor(logging): move LogRecord construction into LogRecord.build factory 2026-04-28 11:31:12 +07:00
dab246 885c8e56aa test(logging): add handlerKey, fault-isolation, and critical-level coverage
- handlerKey: verify two instances of same class with distinct keys coexist,
  same key replaces existing handler, both handlers receive dispatched records
- fault-isolation: verify handles()/handle() throwing does not crash dispatch
  and remaining handlers still receive the record
- critical level: verify Level.critical maps to SentryLevel.fatal in both
  captureException and captureMessage paths of SentryEventHandler
2026-04-28 11:31:12 +07:00
dab246 c712c9b4b0 feat(logging): support multi-instance handlers via handlerKey
Add handlerKey to LogHandler so that two instances of the same concrete
class can coexist in AppLoggerRegistry (e.g. two ConsoleLogHandlers with
different formatters, or two Sentry handlers targeting different DSNs).

Default key is runtimeType.toString(), preserving existing dedup behaviour
for handlers that do not override it.

Also add @visibleForTesting on resetForTesting() and convert LogHandler
from abstract interface class to abstract class so the default handlerKey
implementation is inherited without requiring each implementor to redeclare it.
2026-04-28 11:31:12 +07:00
dab246 e84b621981 fix(logging): guard handles() in dispatch and replace stale handlers on re-register
- Wrap both handles() and handle() in a single try/catch so a throwing
  handles() cannot abort the pipeline or crash callers
- Replace existing handler by runtimeType instead of silently keeping
  the stale instance, so re-registering with a new config takes effect
- Add recursion-safety comment in SentryManager.addBreadcrumb catch
  block to lock in the invariant for future handler additions
2026-04-28 11:31:12 +07:00
dab246 6c5948557c fix(logging): isolate handler failures and fix fake reporter override
- Wrap each handler.handle() in try/catch so a failing handler does not
  abort the remaining handlers or bubble exceptions to callers
- Fix _FakeSentryReporter.addBreadcrumb signature to match SentryReporter
  interface (add level and category named parameters)
2026-04-28 11:31:12 +07:00
dab246 28000d4636 fix(logging): propagate level/category on breadcrumbs, align captureMessage signature
- addBreadcrumb gains level (default SentryLevel.debug) and category
  params in SentryReporter interface and SentryManager implementation;
  SentryBreadcrumbHandler passes level: SentryLevel.debug, category: 'log'
  so breadcrumbs on error events are clearly labelled in Sentry UI
- captureMessage param order aligned to {extras, level} in SentryManager
  to match the SentryReporter interface declaration
- Test: _FakeSentryReporter updated; new test case asserts level/category
2026-04-28 11:31:12 +07:00
dab246 1b4723ef05 fix(logging): restore per-call webConsoleEnabled as first-class flag
webConsoleEnabled was deprecated in favour of a global constructor flag,
but that removed the ability to force specific log calls visible on web
in release/profile mode — a legitimate need for auth and Sentry init
diagnostics.

Carry webConsoleEnabled through the full pipeline:
LogRecord → buildLogRecord → _dispatch → public log functions.
ConsoleLogHandler reads the flag from the record rather than from its
constructor, so per-call opt-in works independently of build mode.

On web:
- handles() always returns true (filter deferred to handle())
- handle() prints only when record.webConsoleEnabled || isDebugMode

Existing call sites (authorization_interceptors, sentry_config) that
pass webConsoleEnabled: true are preserved and functional again.
2026-04-28 11:31:12 +07:00
dab246 c36384fb73 test(logging): strengthen handler pipeline tests
- app_logger_registry: add _OtherFakeHandler subclass; fix
  'dispatches to multiple handlers' to register two distinct types
  and assert both receive the record; use const LogRecord
- sentry_breadcrumb_handler: track capturedExceptions/capturedMessages
  in fake; assert both are empty in 'does not call' test
- sentry_event_handler: add SentryLevel to fake captured records;
  assert mapped severity in captureException/captureMessage tests
2026-04-28 11:31:12 +07:00
dab246 eb329d8a48 fix(logging): deprecate per-call webConsoleEnabled parameter
Web console output is now configured globally via ConsoleLogHandler
at startup. The parameter is retained for source compatibility.
2026-04-28 11:31:12 +07:00
dab246 29c89c34b2 fix(logging): pass SentryLevel through reporter interface
SentryReporter.captureException and captureMessage now accept a
SentryLevel parameter so handlers can forward the mapped severity.
SentryEventHandler maps Level.critical → fatal, Level.error → error.
SentryManager forwards the level via scope.level.
2026-04-28 11:31:12 +07:00
dab246 57975331d5 test(logger): add unit tests for logging pipeline (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 f2048b2503 refactor(logger): centralize handler registration in registerLogHandlers (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 9876db67f8 feat(logger): add SentryEventHandler and SentryBreadcrumbHandler (ADR-0078)
refactor(logger): register Sentry handlers at startup for mobile and web (ADR-0078)
2026-04-28 11:31:12 +07:00
dab246 2633c774c5 refactor(sentry): extract SentryReporter interface for handler testability (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 8ff856b490 feat(sentry): add addBreadcrumb method to SentryManager (ADR-0078)
feat(logger): add SentryEventHandler and SentryBreadcrumbHandler (ADR-0078)
2026-04-28 11:31:12 +07:00
dab246 bebffa7196 refactor(logger): register ConsoleLogHandler at app startup (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 2e0f419281 refactor(logger): delegate app_logger public API to AppLoggerRegistry (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 9b6c768e69 refactor(logger): add AppLoggerRegistry dispatcher and ConsoleLogHandler (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 49a6b33baa refactor(logger): add LogFormatter interface and platform-specific formatters (ADR-0078) 2026-04-28 11:31:12 +07:00
dab246 3b42d3b873 refactor(logger): add LogRecord, LogHandler, Level core abstractions (ADR-0078) 2026-04-28 11:31:12 +07:00
Dat Vu 746ebe8a23 TF-4363 [Thread] Display by collapsed thread in search (#4364) 2026-04-23 18:20:10 +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
Dat H. Pham fe014a009f ADR for release version for mobile 2026-04-22 15:41:28 +07:00
dab246 968604fd3c TF-4269 Read sentry_release from pubspec.yaml in Fastfile for iOS and Android
Replace last_git_tag with pubspec.yaml as the source for sentry_release
to match the same version string that CI uses when uploading symbols.
This guarantees consistency between what the app reports to Sentry and
what the release.yaml workflow uses for symbol uploads.
2026-04-22 15:41:28 +07:00
dab246 51c7627aea TF-4269 Replace addBreadcrumb with capture at all early-return paths in NSE
Breadcrumbs are only flushed to Sentry when attached to a capture event.
Since every addBreadcrumb call was immediately followed by a return, those
breadcrumbs were never sent. Replace them with capture(message:) so each
early exit is recorded as a Sentry event directly.
2026-04-22 15:41:28 +07:00
Dat H. Pham 892d15b8c5 Bump version to v0.28.4-rc01 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 9d400bed5a Bump version to v0.28.3-rc10 2026-04-22 15:41:28 +07:00
dab246 0295334d8a TF-4269 Fix Sentry release version sync across platforms
Use --dart-define=SENTRY_RELEASE=<full-tag> in Fastlane so the app
reports the same version string to Sentry as CI uses when uploading
symbols, bypassing iOS CFBundleShortVersionString stripping.

- Android Fastfile: add --dart-define=SENTRY_RELEASE (build-name unchanged)
- iOS Fastfile: pass DART_DEFINES via xcargs (increment_version_number unchanged)
- Dart: read SENTRY_RELEASE dart-define first, fall back to PackageInfo.version
- NSE/Web unaffected: NSE reads from Keychain, Web falls back to PackageInfo
2026-04-22 15:41:28 +07:00
dab246 700a4c993f Bump version to v0.28.3-rc09
Signed-off-by: dab246 <tdvu@linagora.com>
2026-04-22 15:41:28 +07:00