feat(tasks): surface default status filter#4144
Conversation
Open task tabs (Assigned / Created) now seed Not Started / In Progress / In Review as active filters instead of relying on an implicit completed/ canceled exclusion, so the always-present Status chip shows what's being filtered out by default. Unchecking the last enabled status resets to the default set.
The Status chip's clear (✕) and the "Clear all" button now enable every status instead of restoring the open-set default, and the chip is dropped when every status is selected since that isn't a filter. Unchecking the last status in the dropdown still snaps back to the default.
The status selection can never be empty: unchecking the final enabled status now re-enables every status (matching the chip's clear), which reads as no filter and drops the chip.
Both the status chip dropdown and the Filter menu's Status submenu now show a per-row "Only" that narrows to a single status and flips to "All" on the sole choice. Extracts the shared status multi-select mechanics into useTaskStatusFilter so both surfaces behave identically.
The per-category chip and the Filter menu rows now expose Only/All for every multi-select checkbox filter (priority, type, attachment, mail status, …), matching the task status behavior. "Only" narrows to one value, flipping to "All" on the sole value, which clears the category. Searchable filters like assignee are untouched.
Unchecking the last status now leaves the selection empty (no filter → all statuses shown, chip drops) instead of re-enabling every status.
Status uses plain checkboxes again (chip and filter menu); Only/All stays on priority and the other multi-select checkbox filters.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR refactors task status filtering across the Tasks view. Two shared constants for open-task status 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@js/app/packages/app/component/next-soup/soup-view/filters-bar/task-status-filter.ts`:
- Around line 46-49: The toggle function currently allows unchecking all active
statuses, resulting in an empty set, which conflicts with the intended behavior.
Modify the toggle function to check if unchecking the status with ID would
result in an empty active set. If it would be the last active status being
unchecked, restore the default open statuses instead of proceeding with the
normal toggle. Otherwise, proceed with the regular setStatus call. This ensures
the active status set never becomes empty and automatically resets to defaults
when the last checkbox is unchecked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9bbd2b0b-ab81-4959-b496-dbe1eab24474
📒 Files selected for processing (5)
js/app/packages/app/component/app-sidebar/soup-filter-presets.tsjs/app/packages/app/component/next-soup/soup-view/filters-bar/consolidated-filter-chip.tsxjs/app/packages/app/component/next-soup/soup-view/filters-bar/task-status-filter.tsjs/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsxjs/app/packages/app/component/next-soup/soup-view/filters-bar/use-filter-refinements.tsx
Removes the per-row Only/All from the filter chips and the Filter menu added earlier in this branch. The task status default chip stays; the other multi-select filters are plain additive checkboxes again.
The status chip's ✕ and "Clear all" now empty the status selection (no checkboxes → all statuses shown) instead of re-checking every status.
Cut the long explanatory comments added in this branch down to terse one-liners, dropping the ones the code already makes clear.
Surfaces the task status filter's default (Not Started / In Progress / In Review) as an always-visible chip so the implicit filtering is clear, rather than defaulting to an empty/hidden state. Status uses plain checkboxes; unchecking the last status clears the filter (shows all).