Skip to content

fix[tasks]: also hide cancelled tasks from default tabs#2168

Merged
peterchinman merged 1 commit intomainfrom
peter/hide-cancelled-tasks
Mar 25, 2026
Merged

fix[tasks]: also hide cancelled tasks from default tabs#2168
peterchinman merged 1 commit intomainfrom
peter/hide-cancelled-tasks

Conversation

@peterchinman
Copy link
Copy Markdown
Contributor

No description provided.

@peterchinman peterchinman requested a review from a team as a code owner March 25, 2026 15:54
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

Walkthrough

The changes update task filtering logic in the soup filter system. In soup-filter-presets.ts, the tasks view tab presets are modified to use active-task instead of task-not-completed for both the assigned-to-me and created-by-me filter configurations. Correspondingly, in filters/configs.ts, the task-not-completed filter definition is replaced with a new active-task filter that matches tasks meeting additional criteria: the task must not be completed and must not be canceled. The filter label is updated from "Not Completed" to "Task active". These changes align the filter presets with the updated filter logic across the codebase.

Poem

🐰 Hopping through the filters bright,
From incomplete to active light,
Canceled tasks now fade away,
Only vibrant work stays in play!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to evaluate whether it relates to the changeset. Add a description explaining why cancelled tasks should be hidden from default tabs and how this improves the user experience.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: hiding cancelled tasks from default task tabs, which aligns with modifications to filter presets and filter logic across the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch peter/hide-cancelled-tasks

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

@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@js/app/packages/app/component/next-soup/filters/configs.ts`:
- Around line 395-398: The filter ID was renamed to 'active-task' which will
break restoring persisted filters still using 'task-not-completed'; update the
filters config to preserve backward compatibility by accepting the old ID: add
an alias or migration that maps 'task-not-completed' -> 'active-task' when
loading/restoring (the restore logic lives in soup-view/soup-view.tsx), or
register an additional filter entry with id 'task-not-completed' that uses the
same predicate (taskFilter + !isCompleted + !isCanceled) so existing serialized
states continue to apply; ensure the same label/behavior is preserved and only
the canonical id is 'active-task'.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0e36d87e-0919-453c-845d-73a1f3b8f00e

📥 Commits

Reviewing files that changed from the base of the PR and between cfb8e71 and 12e83e3.

📒 Files selected for processing (2)
  • js/app/packages/app/component/app-sidebar/soup-filter-presets.ts
  • js/app/packages/app/component/next-soup/filters/configs.ts

Comment on lines +395 to +398
id: 'active-task',
label: 'Task active',
predicate: (entity) =>
taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity),
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.

⚠️ Potential issue | 🟠 Major

Preserve backward compatibility for persisted filter IDs.

Line 395 renames the filter ID to active-task, but cached filter IDs are serialized/restored elsewhere (js/app/packages/app/component/next-soup/soup-view/soup-view.tsx), so existing persisted task-not-completed states can stop reapplying after deploy. Keep a compatibility alias (or add a migration) to avoid silent filter loss for returning users.

Suggested compatibility patch
     {
       id: 'active-task',
       label: 'Task active',
       predicate: (entity) =>
         taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity),
     },
+    {
+      // Backward-compatibility alias for persisted presets/cached filter state.
+      id: 'task-not-completed',
+      predicate: (entity) =>
+        taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity),
+    },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
id: 'active-task',
label: 'Task active',
predicate: (entity) =>
taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity),
{
id: 'active-task',
label: 'Task active',
predicate: (entity) =>
taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity),
},
{
// Backward-compatibility alias for persisted presets/cached filter state.
id: 'task-not-completed',
predicate: (entity) =>
taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity),
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@js/app/packages/app/component/next-soup/filters/configs.ts` around lines 395
- 398, The filter ID was renamed to 'active-task' which will break restoring
persisted filters still using 'task-not-completed'; update the filters config to
preserve backward compatibility by accepting the old ID: add an alias or
migration that maps 'task-not-completed' -> 'active-task' when loading/restoring
(the restore logic lives in soup-view/soup-view.tsx), or register an additional
filter entry with id 'task-not-completed' that uses the same predicate
(taskFilter + !isCompleted + !isCanceled) so existing serialized states continue
to apply; ensure the same label/behavior is preserved and only the canonical id
is 'active-task'.

@peterchinman peterchinman merged commit 075ee95 into main Mar 25, 2026
24 checks passed
@peterchinman peterchinman deleted the peter/hide-cancelled-tasks branch March 25, 2026 16:17
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