Skip to content

Conversation

@gonfff
Copy link
Owner

@gonfff gonfff commented Jan 13, 2026

No description provided.

Copy link

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 adds a testing date override feature that allows developers to set a custom system date for testing purposes, controlled by a compile-time feature flag (ENABLE_TESTING_DATE).

Changes:

  • Introduces AppClock class as a centralized abstraction for date/time operations with override capability
  • Adds UI in settings screen to select and manage the testing date override
  • Integrates the clock abstraction throughout the app, replacing direct DateTime.now() calls with nowProvider() in key areas

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/application/app_clock.dart New clock abstraction with date override support and feature flag
lib/domain/repositories/settings_repository.dart Added methods for persisting testing date override
lib/infrastructure/repositories/drift_settings_repository.dart Implementation for storing/retrieving date override from storage
lib/application/settings/get_testing_date_override_use_case.dart Use case for retrieving stored testing date
lib/application/settings/set_testing_date_override_use_case.dart Use case for persisting testing date
lib/application/app_dependencies.dart Integrated AppClock and testing date use cases into dependency injection
lib/main.dart App initialization to load and apply testing date override
lib/presentation/types/settings_callbacks.dart Added callback type for testing date changes
lib/presentation/screens/settings_screen.dart UI for selecting and resetting testing date override
lib/presentation/widgets/settings_sheet.dart Passes testing date parameters to settings screen
lib/presentation/screens/subscriptions_screen.dart Integrates clock provider and refreshes on date changes
lib/presentation/screens/analytics_screen.dart Uses clock provider for date calculations
lib/presentation/widgets/add_subscription_sheet.dart Uses clock provider for default dates
lib/presentation/screens/currency_rates_screen.dart Uses clock provider for date boundaries
lib/presentation/viewmodels/subscriptions_view_model.dart Uses clock provider and adds refresh method for date changes
lib/presentation/l10n/app_localizations.dart Adds localization strings for testing feature in English and Russian
test/application/app_clock_test.dart Tests for AppClock override functionality
test/application/settings/testing_date_override_use_cases_test.dart Tests for date override use cases
test/presentation/l10n/app_localizations_test.dart Updated to verify new localization keys

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

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