From e9ee2c4e45f8a1059331ab5dccaf940f007da599 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Mon, 20 Apr 2026 13:51:17 +0200 Subject: [PATCH] fix(task-view-customizer): scope Group By to current work context (#7279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Group By: Tag / Group By: Project pulled tasks from every project when used inside a specific project view, because de1b5d485c (fix for #7050) deliberately switched the source to all undone tasks for these two options. That closed #7050 but broke the more common case reported in #7279 (and its duplicate #7290). - TaskViewCustomizerService: revert customizeUndoneTasks() to the work context's undoneTasks$, drop _allUndoneTasksWithSubTasks$ and the cross-store selector/switchMap. - Hide Group By: Project in a PROJECT context (it would collapse into one group) via a new availableGroupOptions computed signal backed by isActiveWorkContextProject$. - Sanitize any stored group=project state inside the service's context-load subscription, not from a lazy panel effect — the panel is only instantiated when the mobile bottom-sheet customizer opens. - Drop the now-redundant cross-context selection guard in WorkViewComponent and retire its #7269 test block: after this fix customizedUndoneTasks.list is always a subset of undoneTasks, so the scenario those tests constructed can no longer occur. - Stub isActiveWorkContextProject$ in all WorkContextService test doubles so the service's toSignal() call has something to subscribe to. Closes #7290. --- .../task-view-customizer-panel.component.html | 2 +- .../task-view-customizer.service.spec.ts | 99 ++++++++++--------- .../task-view-customizer.service.ts | 71 +++++++------ .../work-view/work-view.component.spec.ts | 45 ++------- .../features/work-view/work-view.component.ts | 5 - 5 files changed, 97 insertions(+), 125 deletions(-) diff --git a/src/app/features/task-view-customizer/task-view-customizer-panel/task-view-customizer-panel.component.html b/src/app/features/task-view-customizer/task-view-customizer-panel/task-view-customizer-panel.component.html index f7d8f651b7..83e670f976 100644 --- a/src/app/features/task-view-customizer/task-view-customizer-panel/task-view-customizer-panel.component.html +++ b/src/app/features/task-view-customizer/task-view-customizer-panel/task-view-customizer-panel.component.html @@ -99,7 +99,7 @@ - @for (opt of OPTIONS.group.list; track opt.type) { + @for (opt of customizerService.availableGroupOptions(); track opt.type) {