Skip to content

Conversation

@ABTastyAdel
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 73.94366% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.30%. Comparing base (ac24940) to head (508039d).

Files with missing lines Patch % Lines
lib/visitor/strategy/default_strategy.dart 70.00% 21 Missing ⚠️
lib/Storage/database_management.dart 66.66% 3 Missing ⚠️
lib/decision/bucketing_manager.dart 0.00% 3 Missing ⚠️
lib/visitor.dart 90.62% 3 Missing ⚠️
lib/cache/interface_cache.dart 0.00% 2 Missing ⚠️
lib/visitor/strategy/no_consent_strategy.dart 0.00% 2 Missing ⚠️
lib/visitor/visitor_delegate.dart 86.66% 2 Missing ⚠️
lib/visitor/strategy/panic_strategy.dart 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           4.1.2-beta      #55      +/-   ##
==============================================
- Coverage       76.57%   75.30%   -1.28%     
==============================================
  Files              66       67       +1     
  Lines            2801     2867      +66     
==============================================
+ Hits             2145     2159      +14     
- Misses            656      708      +52     
Files with missing lines Coverage Δ
lib/cache/default_cache.dart 90.47% <100.00%> (+3.98%) ⬆️
lib/model/exposed_flag.dart 100.00% <100.00%> (ø)
lib/visitor/Ivisitor.dart 100.00% <ø> (ø)
lib/visitor/strategy/not_ready_strategy.dart 40.74% <ø> (+1.45%) ⬆️
lib/visitor/strategy/panic_strategy.dart 23.33% <0.00%> (+3.88%) ⬆️
lib/cache/interface_cache.dart 0.00% <0.00%> (ø)
lib/visitor/strategy/no_consent_strategy.dart 42.85% <0.00%> (-11.69%) ⬇️
lib/visitor/visitor_delegate.dart 65.82% <86.66%> (-1.92%) ⬇️
lib/Storage/database_management.dart 76.19% <66.66%> (+3.96%) ⬆️
lib/decision/bucketing_manager.dart 1.28% <0.00%> (-0.02%) ⬇️
... and 2 more

... and 15 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac24940...508039d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

class FSData extends ChangeNotifier {
// Apikey
String _apiKey = "apiKey"; //
String _apiKey = "DxAcxlnRB9yFBZYtLDue1q01dcXZCw6aM49CQB23"; //
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

remove the key

@ABTastyAdel ABTastyAdel requested a review from Copilot November 3, 2025 16:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements flag activation deduplication to prevent redundant activation hits for the same campaign/variation during a visitor session, and includes various improvements to caching, authentication handling, and dependency updates.

  • Adds session-based tracking (30 min) to deduplicate flag activations for the same campaign/variation group
  • Implements selective visitor cache lookup logic to check anonymousId when visitorId doesn't exist
  • Removes mode restrictions for authenticate/unauthenticate methods to work in both DECISION_API and BUCKETING modes

Reviewed Changes

Copilot reviewed 28 out of 31 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
lib/visitor/visitor_delegate.dart Implements deduplication logic tracking activated variations per session
lib/visitor/strategy/default_strategy.dart Refactors activation logic to handle deduplicated flags and skip network requests
lib/visitor.dart Adds sessionDuration tracking and visitor lookup optimization
lib/model/exposed_flag.dart Adds alreadyActivatedCampaign field to track deduplicated activations
lib/cache/interface_cache.dart Adds visitorExists method to check cache without data retrieval
lib/cache/default_cache.dart Implements visitorExists with database query
lib/Storage/database_management.dart Adds SQL query to check visitor existence
lib/decision/bucketing_manager.dart Fixes assignment history to merge instead of clearing
pubspec.yaml Updates package version to 4.2.0-beta
test/activate_test.dart Adds comprehensive test for deduplication feature
test/tracking_manager_test.dart Tests session expiration with manipulated sessionDuration
example/lib/widgets/configuration.dart Fixes Mode comparison logic and improves error logging
example/lib/Providers/fs_data.dart Updates example configuration values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2025

@ABTastyAdel ABTastyAdel closed this Nov 4, 2025
@ABTastyAdel
Copy link
Collaborator Author

ABTastyAdel commented Nov 4, 2025

Already merged in 4.2.0-beta

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants