Skip to content

move to production#3770

Merged
Baalmart merged 7 commits into
masterfrom
staging
Jul 8, 2026
Merged

move to production#3770
Baalmart merged 7 commits into
masterfrom
staging

Conversation

@Baalmart

@Baalmart Baalmart commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

github-actions Bot and others added 7 commits July 8, 2026 00:18
- Remove research_mode feature-flag gate so events capture for all users;
  drop the now-unused flag and isAnalyticsEnabled getter
- Add forecast events (forecast_viewed, forecast_scope_changed)
- Add share funnel events (share_sheet_opened with source, share_tab_selected,
  share_completed gated on ShareResult success)
- Add Clean Air Forum filter funnel events (tab opened, selfie source/capture,
  filter shared, wall consent and submission sent/failed)
- Return ShareResult from AirQualityShareService so only real shares count
- Enable lifecycle event capture and switch personProfiles to identifiedOnly
- Add PosthogObserver for automatic $screen tracking and name all
  MaterialPageRoute push sites via RouteSettings
- Register is_guest super property on guest entry/login; reset identity on
  session expiry fallback to guest
- Delete unused manual session tracking (SDK manages sessions)
- Split AnalyticsService: core transport (capture/identity/super props) stays
  in analytics_service.dart; typed event wrappers move to per-domain extension
  files under services/analytics/, re-exported so call sites are unchanged
- Inject AnalyticsService into AuthBloc and SurveyBloc (defaulting to the
  singleton) so bloc tests can mock analytics, matching the repository
  injection convention
- Fold share-tab label and analytics name into the _ShareTab enhanced enum,
  restoring the single-entry-per-tab promise
PosthogObserver fires Posthog().screen on navigation; in tests the channel
throws MissingPluginException, which the SDK only guards as
PlatformException, failing the app-boot test.
…hygiene

- resetUser() now re-registers is_guest=true after clearing identity, making
  guest fallback an invariant of every identity reset (logout, expiry)
- Runtime SessionExpired handler resets analytics identity like the
  app-start expiry path already did
- Failure events report the exception type instead of raw e.toString() so
  API response details are not sent to PostHog (CAF wall + survey submission)
… paths

Sweep for the same class of issue as the review findings: account deletion,
the app-start error fallback, and the session-expiry cleanup-failure path all
emitted GuestUser without resetUser(), leaving events attributed to the prior
identity. Account deletion was the worst case - a deleted user's device kept
reporting under their identity. resetUser() is safe in catch blocks since it
never throws.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b6da1e20-e302-4a66-997a-82036bbc73f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Baalmart
Baalmart merged commit 7fe88c1 into master Jul 8, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants