Skip to content

Add persisted filtering (status/priority/tags) to Todo widgets and tests#803

Merged
multiplex55 merged 3 commits intomasterfrom
codex/enhance-todo-widget-with-filters
Feb 7, 2026
Merged

Add persisted filtering (status/priority/tags) to Todo widgets and tests#803
multiplex55 merged 3 commits intomasterfrom
codex/enhance-todo-widget-with-filters

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Provide compact, in-widget filter controls (status: all/open/done, minimum priority, tag selector) so users can focus their todo lists without leaving the dashboard.
  • Ensure filters are applied before sorting and row rendering so the visible list respects user filters while preserving existing sort/truncate behavior.
  • Persist filter state in widget JSON settings so preferences survive restarts and support migration from the legacy show_done flag.

Description

  • Added new enums and config fields for filtering: TodoStatusFilter, status, min_priority, and filter_tags to TodoWidgetConfig and analogous TodoFocusStatusFilter and fields to TodoFocusConfig. (files: src/dashboard/widgets/todo.rs, src/dashboard/widgets/todo_focus.rs).
  • Implemented compact settings UI controls: status dropdown, min-priority DragValue, and a tag selector populated from the current snapshot; these appear in both the settings UI and the widget header/summary area. (changes in settings_ui and summary rendering).
  • Applied composite filtering functions (status_match, priority_match, tags_match, entry_matches_filters) and a filter_entries helper so filtering is executed before sort_entries and truncation, preserving existing sort behavior.
  • Added migration helpers (migrate_config) and on_config_updated handlers to translate legacy show_done usage into the new status filter and to normalize tag lists, ensuring backward-compatible persisted config.
  • Added unit tests exercising filter composition and JSON round-trip persistence for both widgets: filters_combine_before_sorting and config_serialization_persists_filter_state in todo.rs, and focus_filters_by_status_priority_and_tags and focus_config_persists_filter_state in todo_focus.rs.

Testing

  • Ran cargo fmt --all, which completed successfully.
  • Attempted cargo test todo_widget -- --nocapture, but the test run failed to build in this environment because the alsa-sys crate requires the system alsa library (alsa.pc via pkg-config) which is not available; therefore the new unit tests could not be executed here.
  • The changes compile-formatted cleanly and unit tests are included and should run successfully in an environment with required native dependencies installed.

Codex Task

multiplex55 and others added 2 commits February 7, 2026 10:06
Add dashboard.json to .gitignore and apply small formatting/whitespace cleanups across several files for readability. Reorder/import mouse_gestures DB and usage modules in data_cache.rs, simplify and reflow long UI calls and closures in gesture_cheat_sheet.rs, mouse_gestures_dialog.rs, and plugins/mouse_gestures.rs, and tidy test formatting and imports in tests/mouse_gestures_service.rs and tests/mouse_gestures_settings.rs. These are non-functional stylistic changes to improve code consistency and maintainability.
@multiplex55 multiplex55 merged commit c4cfdf6 into master Feb 7, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/enhance-todo-widget-with-filters branch February 7, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant