Skip to content

Persist selected filter on Upcoming screen #142

Open

Description

@MessiasLima

Description

The Upcoming screen will introduce pill-shaped filter dropdowns for completion status as part of #139.
The available filters are: All, Unfinished, and Completed. The default selected filter is "Unfinished".
Currently the filter value is held only in memory inside the ViewModel. When the user leaves the screen, kills the app, or the process is recreated, the filter resets to "Unfinished". We need to persist the last selected filter so it is restored on the next app launch.

Scope

In scope: a persistence layer for the active completion-status filter value (All, Unfinished, Completed), read/write from the UpcomingViewModel, and restoration on startup.

Out of scope: syncing the preference across devices or to Supabase.

Acceptance criteria

  • GIVEN the user changes the filter on the Upcoming screen
    WHEN the app process is killed and restarted
    THEN the previously selected filter (All, Unfinished, or Completed) is restored
  • GIVEN the filter value is persisted
    WHEN the app reads it on launch
    THEN the default filter "Unfinished" is used if no prior value was saved
  • GIVEN the filter preference is stored locally
    WHEN unit tests run
    THEN the storage layer has test coverage with Kotest assertions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions