feat(tasks): add Backlog view filter for tasks not assigned to a day

未关闭 适合新手
#328 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, typescript
领域
frontend

调研方向

从 TaskFlow.Web/src/pages/TasksPage.tsx 开始,重点查看 ViewFilter、matchesViewFilter 和现有的视图筛选芯片;然后阅读 TasksPage.test.tsx,参考页面筛选交互测试。添加 Backlog 选项,使其匹配 currentJournalDate 为 null 的任务,并验证它能与现有筛选条件组合使用且会更新计数。所要求的单元测试和交互测试通过,且前端行覆盖率保持在至少 80%,即为完成。

由索引模型根据 Issue 内容生成。

描述

Groomed 2026-10-28 — ready for implementation.

Waits for the monorepo move (#397). This changes the API, so it is built after the assistant moves into this repo and the MCP change ships in the same PR (checked by the integration and error-code tests).

Original Description

Summary

Add a Backlog option to the view filters on the Tasks page (TaskFlow.Web/src/pages/TasksPage.tsx). It shows every task that is not currently assigned to a journal day, so unplanned work is easy to find and triage.

Background

A task is "assigned to a day" when it is linked to a journal entry through TaskItem.CurrentJournalEntryId. The frontend exposes that date as currentJournalDate. A task with no currentJournalDate is in the backlog.

The existing view chips are All, Active today, Scheduled future, and Completed history. matchesViewFilter in TasksPage.tsx already switches on currentJournalDate, so this should be a new ViewFilter case rather than a new mechanism.

Acceptance criteria

  • A Backlog chip appears in the existing view filter group on the Tasks page.
  • Selecting Backlog shows only tasks where currentJournalDate is null, meaning tasks not linked to any journal day.
  • Tasks linked to any journal day, past, today, or future, are excluded.
  • Backlog combines with the status, project, and search filters the same way the other view chips do.
  • The task count in the filter row reflects the Backlog filter.
  • Unit tests cover the Backlog case in matchesViewFilter and the chip interaction in TasksPage.test.tsx.
  • Frontend coverage stays at or above the 80% line threshold.

Out of scope

  • Backend changes. The filter uses data the Tasks API already returns.
  • Changing how tasks are assigned to days or how carry-forward works.
  • Bulk-assigning backlog tasks to a day.

Open question

Should Backlog include completed tasks that were never assigned to a day? The literal reading ("not currently assigned to a day") includes them. The default is to include them unless the owner says otherwise.


User Story

As a TaskFlow user, I want a Backlog view filter on the Tasks page that shows tasks not assigned to any journal day, so that unplanned work is easy to find and triage.

Acceptance Criteria

  • Given the Tasks page loads, a Backlog chip appears in the existing view filter group alongside All, Active today, Scheduled future, and Completed history.
  • Given tasks with and without a journal day, selecting Backlog shows only tasks whose currentJournalDate is null.
  • Given tasks linked to a journal day in the past, today, or the future, selecting Backlog shows none of them.
  • Given Backlog is selected, the status checkboxes decide whether completed unassigned tasks appear. With Completed unchecked (the default), they are hidden. With Completed checked, they are shown.
  • Given Backlog is selected, applying the status, project, or search filter shows only tasks that match Backlog and every applied filter.
  • Given Backlog is selected, the task count in the filter row equals the number of tasks shown.
  • Given Backlog is selected and no tasks qualify, the existing empty state appears.
  • The test suite covers the Backlog case of matchesViewFilter and the Backlog chip interaction in TasksPage.test.tsx, and frontend line coverage stays at or above 80%.

Edge Cases

  • matchesViewFilter falls through to default: return true, so a missing backlog case would silently behave like All. Tests should guard against this.
  • matchesViewFilter is not exported. Direct unit tests need an export or a move to lib/, or the case can be covered through page tests. The team should pick one.
  • Deleting a journal day unassigns its tasks, so they reappear in Backlog (subject to the status checkboxes).
  • A backlog child whose parent is assigned is promoted to a root row (TasksPage.tsx :285-287). Decide whether that display is acceptable under Backlog.
  • The "No project" filter is a different concept from Backlog and must not be confused with it.

Out of Scope

  • Backend changes. Filtering is fully client-side.
  • Changes to how tasks are assigned to days, or to carry-forward.
  • Bulk-assigning backlog tasks to a day.
  • Changes to the existing view chips, including Active today's completed exclusion.
  • Editing the duplicate copies under .claude\worktrees\.... Changes target C:\code\TaskFlow\TaskFlow.Web\src only.
主要语言
C#
星标
1
派生
0
平均合并
2 小时 2 分钟
30 天内合并 PR
98

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nevridge/TaskFlow 的其他 Issue

查看 nevridge/TaskFlow 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。