Skip to content

Conversation

@kristofnemere
Copy link
Contributor

@kristofnemere kristofnemere commented Nov 28, 2025

Test plan:

  1. Open the Student app
  2. Navigate to the ToDo list
  3. Verify the default time period filter shows items from 4 weeks ago to this week
  4. Open the filter settings and verify default selections are "4 weeks ago" (past) and "This Week" (future)
  5. Verify analytics correctly tracks whether default filters are being used
  6. Run unit tests to verify all tests pass with new default values

Expected behavior:

  • ToDo list loads with default filters: 4 weeks past, this week future
  • Filter screen shows correct default selections

refs: MBL-19567
affects: Student
release note: Updated default time period for ToDo list to show items from 4 weeks ago through this week

  • Dark/light mode testing
  • Landscape/tablet testing
  • Accessibility testing
  • Product approval (if needed)

Updated default time period values for ToDo filters to align with
product requirements:
- Past date range: Changed from ONE_WEEK to FOUR_WEEKS (4 weeks ago)
- Future date range: Changed from ONE_WEEK to THIS_WEEK

The Georgian calendar week calculation logic remains unchanged
(locale-aware week boundaries).

Changes:
- ToDoFilterEntity: Updated default pastDateRange and futureDateRange
- ToDoListViewModel: Updated default filter checks in
  trackFilterLoadingEvent() and isFilterApplied()
- ToDoFilterViewModel: Updated initial selectedPastOption and
  selectedFutureOption values
- Updated corresponding unit tests to reflect new default values

Test plan:
- Verify ToDo list loads with default filters (4 weeks past, this week future)
- Verify filter analytics correctly identifies default vs custom filters
- Verify all unit tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@kristofnemere kristofnemere changed the title [MBL-19567] Update ToDo filter default time periods [MBL-19567][Student] Update ToDo filter default time periods Nov 28, 2025
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Review Summary

This PR updates the default date range filters for the To-Do list feature from 1 week (past/future) to 4 weeks (past) and "this week" (future). The changes are well-contained and consistently applied across the codebase.

Issues Found

  • Default value inconsistency in ToDoFilterUiState.kt: The data class default parameters still use ONE_WEEK for both past and future selections, but everywhere else in the PR these have been changed to FOUR_WEEKS (past) and THIS_WEEK (future). This inconsistency could cause bugs where the UI state doesn't match expected defaults.

Positive Aspects

Consistent updates across all layers: The changes are applied consistently across ViewModels, entities, and test files
Test coverage: All affected tests have been updated to reflect the new default values
No breaking changes: The change only affects default values, not the functionality itself
Clear intent: The PR makes the default date range more useful by showing more past items (4 weeks vs 1 week) while keeping future items focused on the current week

Recommendations

  1. Update the default parameters in ToDoFilterUiState.kt (lines 25, 27) to match the new defaults
  2. Consider if a database migration is needed - since ToDoFilterEntity has default values that changed, existing users with no saved filters will see the new defaults, but users with explicitly saved filters using old defaults will keep their old values (which may be the desired behavior)

Code Quality

The code follows project conventions and the changes are straightforward. No security concerns, performance issues, or architectural problems identified.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

🧪 Unit Test Results

✅ 📱 Student App

  • Tests: 1226 total, 0 failed, 0 skipped
  • Duration: 0.000s
  • Success Rate: 100%

✅ 🌅 Horizon

  • Tests: 449 total, 0 failed, 0 skipped
  • Duration: 32.069s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 2418 total, 0 failed, 0 skipped
  • Duration: 53.571s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 4093
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Fri, 28 Nov 2025 14:54:42 GMT

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

📊 Code Coverage Report

✅ Student

  • PR Coverage: 42.77%
  • Master Coverage: 42.77%
  • Delta: +0.00%

✅ Teacher

  • PR Coverage: 25.45%
  • Master Coverage: 25.45%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 22.56%
  • Master Coverage: 22.56%
  • Delta: +0.00%

📈 Overall Average

  • PR Coverage: 30.26%
  • Master Coverage: 30.26%
  • Delta: +0.00%

Copy link
Contributor

@kdeakinstructure kdeakinstructure left a comment

Choose a reason for hiding this comment

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

QA 👍

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Student Install Page

Copy link
Contributor

@adamNagy56 adamNagy56 left a comment

Choose a reason for hiding this comment

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

QA +1

Updated testDefaultValues() to expect FOUR_WEEKS (past) and THIS_WEEK
(future) instead of ONE_WEEK for both.
Updated two tests to work with new default date ranges:

1. clickDateBadgeNavigatesToCalendar:
   - Changed assignment from 3 days to 1 day in the future
   - Ensures assignment is always within 'This Week' default range

2. pastDateRangeFilterShowsOlderItems:
   - Changed old assignment from 2 weeks to 5 weeks ago
   - Updated comment to reflect new 4-week default
   - Assignment is now outside default range as intended
   - Still verifies filter selection works correctly
Updated two tests to work with new default date ranges:

1. clickDateBadgeNavigatesToCalendar:
   - Restored assignment to 3 days in the future (original logic)
   - Added explicit filter setup to 'Next Week' before test
   - Ensures assignment is always visible regardless of current day

2. pastDateRangeFilterShowsOlderItems:
   - Changed old assignment from 2 weeks to 3 weeks ago
   - Updated to test filter changes properly:
     * Default (4 weeks): both assignments visible
     * Change to Last Week (1 week): old assignment hidden
     * Change to 4 Weeks Ago: old assignment visible again
   - Now properly tests that filter controls item visibility
@kristofnemere kristofnemere merged commit 80a2e64 into master Nov 28, 2025
18 checks passed
@kristofnemere kristofnemere deleted the MBL-19567-fix-todo-default-filters branch November 28, 2025 14:43
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.

5 participants