Fix label grouping and preserve user-defined exclude states#160
Merged
Conversation
What changed:
Normalize chore labels as {id, name} for dashboard rendering
Fix Jinja grouping logic so label filters and grouped label buttons work again
Remove the redundant label_details export
Why:
Preserves the single labels payload shape while restoring label grouping and filtering behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to how chore labels are handled, normalized, and filtered throughout the ChoreOps dashboard and backend. The main focus is to ensure labels are consistently represented as objects with both
idandnamefields, support case-insensitive filtering, and improve label grouping and display logic. These changes enhance the reliability of label-based filtering and grouping, especially when labels may be stored as either strings or objects.Label normalization and filtering improvements:
pref_exclude_label_list,pref_label_display_order) are now consistently lowercased for case-insensitive filtering and ordering incontext_v1.yaml.prepare_groups_v1.yaml, chores' labels are normalized into a structure containing both lowercased terms (for filtering) and display names, allowing robust exclusion and grouping regardless of the label format (string or mapping).Backend label handling updates:
{id, name}objects rather than plain strings, supporting both display and filtering needs in the dashboard. [1] [2] [3] [4]extra_state_attributesmethod now exposes the raw label list for compatibility, while the dashboard-facing attributes use the normalized label objects. [1] [2]Other logic adjustments:
completed, etc.) frompref_exclude_statesincontext_v1.yaml, giving more control to user preferences.These changes collectively make label-based features more reliable, flexible, and user-friendly across both backend and frontend components.