Skip to content

feat(tasks): surface default status filter#4144

Open
gbirman wants to merge 10 commits into
mainfrom
gab/macro-1849-show-enabled-filter-states-for-task-statuses
Open

feat(tasks): surface default status filter#4144
gbirman wants to merge 10 commits into
mainfrom
gab/macro-1849-show-enabled-filter-states-for-task-statuses

Conversation

@gbirman

@gbirman gbirman commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

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).

gbirman added 7 commits June 16, 2026 14:34
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.
@macro-application

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c21a2076-41ca-40ff-b9cc-5fb96e98206a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR refactors task status filtering across the Tasks view. Two shared constants for open-task status FilterIDs and server-side property fragments are extracted, replacing hardcoded include/exclude logic and the active-task client filter marker in the assigned-to-me and created-by-me tab presets. A new useTaskStatusFilter hook is introduced, providing isActive, toggle, and enableAll with batched predicate and queryFilters coordination. The ConsolidatedFilter type gains optional onOnly and isValueSoleActive fields, and ValueDropdownContent renders a per-option "Only/All" button when onOnly is present. UnifiedFilterDropdown instantiates the hook to route Tasks Status category interactions, and adds "Only/All" helpers for non-status multi-value categories. useFilterRefinements wires these together into a dedicated always-present Status chip, excludes the status category from generic chip aggregation, and updates resetToTabDefaults to call enableAll() on open-set task tabs.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title follows conventional commits format with 'feat:' prefix and is well under 72 characters (42 chars), clearly summarizing the main change of surfacing the default task status filter.
Description check ✅ Passed The PR description clearly describes the main changes: surfacing task status filter's default as a persistent chip and adding Only/All interaction to multi-select filters.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gbirman gbirman marked this pull request as draft June 16, 2026 21:18
@gbirman gbirman changed the title feat(tasks): surface default status filter; Only/All on checkbox filters feat(tasks): surface default status filter Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ce115d0 and 4ff4c6d.

📒 Files selected for processing (5)
  • js/app/packages/app/component/app-sidebar/soup-filter-presets.ts
  • js/app/packages/app/component/next-soup/soup-view/filters-bar/consolidated-filter-chip.tsx
  • js/app/packages/app/component/next-soup/soup-view/filters-bar/task-status-filter.ts
  • js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
  • js/app/packages/app/component/next-soup/soup-view/filters-bar/use-filter-refinements.tsx

gbirman added 3 commits June 16, 2026 17:25
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.
@gbirman gbirman marked this pull request as ready for review June 16, 2026 22:03
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