fix[tasks]: also hide cancelled tasks from default tabs#2168
fix[tasks]: also hide cancelled tasks from default tabs#2168peterchinman merged 1 commit intomainfrom
Conversation
WalkthroughThe changes update task filtering logic in the soup filter system. In Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
js/app/packages/app/component/app-sidebar/soup-filter-presets.tsjs/app/packages/app/component/next-soup/filters/configs.ts
| id: 'active-task', | ||
| label: 'Task active', | ||
| predicate: (entity) => | ||
| taskFilter(entity) && !isCompleted(entity) && !isCanceled(entity), |
There was a problem hiding this comment.
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.
| 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'.
No description provided.