Skip to content

Harden core app stability and offline media flow - #24

Merged
krishna3554 merged 1 commit into
mainfrom
codex/implement-core-app-hardening-measures
May 15, 2026
Merged

krishna3554 merged 1 commit into
mainfrom
codex/implement-core-app-hardening-measures

Conversation

@krishna3554

Copy link
Copy Markdown
Owner

Motivation

  • Improve app robustness by adding global crash/error reporting and replacing silent catches with recorded non-fatal errors and user-visible fallbacks.
  • Reduce storage and network impact by compressing captured photos before producing overlays and by lowering final overlay JPEG quality.
  • Make map thumbnails and static map requests resilient and fast by adding caching for map assets.
  • Ensure reliable backups with offline-first queueing and automatic retry when connectivity returns, and make gallery scrolling performant by decoding thumbnail-sized images.

Description

  • Add a central reporter ErrorReporter that initializes Firebase Crashlytics and wires FlutterError.onError, PlatformDispatcher.instance.onError, and zoned error capture in main.dart.
  • Add ImageCompressionService to compress camera captures before overlay generation and lower final JPEG quality in ImageOverlayService.
  • Implement connectivity and offline backup plumbing via ConnectivityService and an enhanced BackupService that persists a retry queue, exposes uploadPhotosForUser, and starts auto-retry on reconnect; queueing is invoked after a successful local save in the result flow.
  • Improve camera/gallery/result error handling to surface messages to users and report non-fatal errors via ErrorReporter, and switch gallery grid thumbnails to resized decoding (cacheWidth) for lower memory and faster loads.
  • Cache map assets by switching OSM tile thumbnails to CachedNetworkImage and making Google static map fetches go through a BaseCacheManager fallback; add related dependencies in pubspec.yaml.

Testing

  • Ran git diff --check to validate diffs and whitespace issues (passed with no errors).
  • Attempted to run flutter pub get but it failed in this environment because the Flutter SDK is not available (flutter: command not found), so dependency resolution and package-level build/tests were not executed here.
  • No platform/integration tests were executed in this environment; further CI/run-by-developer verification is recommended (install Flutter, run flutter pub get, then flutter analyze and flutter test on a machine with the SDK).

Codex Task

@krishna3554
krishna3554 merged commit 2bc6d42 into main May 15, 2026
0 of 3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb09f1f026

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +26 to +27
BackupService({ConnectivityService? connectivityService})
: _connectivityService = connectivityService ?? ConnectivityService();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep BackupService constructible at existing call sites

Changing BackupService to a non-const constructor breaks the existing const BackupService() field initializer in lib/features/account/screen/account_screen.dart, so the app will no longer compile whenever that screen is analyzed/built. Either update that call site to drop const or preserve a const-compatible constructor path.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant