@src/components/filters/GlobalFilterBar.tsx /projects 画面にも HUMAN フィルターを追加してほしい。…
- User
@src/components/filters/GlobalFilterBar.tsx
/projects画面にも HUMAN フィルターを追加してほしい。 /asignees` 画面と同じ形で、クリックしたら課題一覧から当該ユーザーの課題が非表示になる。 フィルターの順番は Grouped By > Project > Human > Status Assistant
The user wants to add a "HUMAN" filter to the
/projectspage, similar to how it works on the/assigneespage. When clicking a human filter, issues assigned to that user should be hidden from the issue list. The filter order should be: Grouped By > Project > Human > Status.Let me first read the OVERVIEW.md as required by the rules, then explore the codebase to understand the current filter implementation.
Assistant
次に、
/projectsページと/assigneesページの実装を確認して、Human フィルターがどのように動作しているかを把握します。Now I need to understand how the
/projectspage uses the GlobalFilterBar and how the/assigneespage implements the Human filter. Let me explore the project structure to find these pages and understand the data flow.Assistant
もう少し詳しく確認が必要です。
/projectsページと layout の実装を確認します。Now I have a good understanding of the codebase. Let me clarify a key point:
The user wants to add a Human filter to the
/projectspage. On the/assigneespage, the Human section in GlobalFilterBar is actually a shortcut that scrolls to the assignee section, not a filter that hides/shows issues. The actual filtering on/assigneesis done viaAssigneeSidebarwithactiveAssignees.But the user says: "クリックしたら課題一覧から当該ユーザーの課題が非表示になる" - when clicked, issues from that user should be hidden from the list.
This is different from what the current
/assigneesHuman section does (which scrolls). The user wants a toggle filter where clicking a human hides their issues. Let me re-read the request more carefully to understand if they're asking for the same behavior as/assigneesor something different.On
/assignees, the assignee filter in GlobalFilterBar doesn't actually hide issues—it scrolls to them instead. The real filtering happens through AssigneeSidebar. But for , the user seems to want a toggle filter similar to how projects work, where clicking a human toggles their issues on and off. I need to examine the projects page implementation to understand how that filtering mechanism works and then apply something similar for the assignees view.Assistant
ProjectDataContextの実装と、ProjectSectionの課題フィルター部分を確認します。Now I need to understand the ProjectDataContext to see what data is available, particularly the assignee-related data that could be used for the Human filter on the projects page. Let me also check the ProjectSection component to understand how filtering is applied at the project level.
Assistant
- User
Assistant
まず
GlobalFilterBarに Human トグルフィルターの props と UI を追加します。Assistant
次にトグルロジックと「全選択判定」を追加します。
Assistant
次に、Human トグルフィルターの UI セクションを、既存の assignee ショートカットセクションの直後・Status セクションの直前に追加します。
Assistant
次に
layout.tsxで projects ビュー時に Human フィルター props を渡します。Assistant
ProjectsPageでactiveAssigneesを取得し、ProjectSectionに渡します。Assistant
filteredIssuesの件数カウントもactiveAssigneesを考慮するように更新します。Assistant
最後に
ProjectSectionにglobalActiveAssigneesprop を追加し、課題フィルタリングに組み込みます。Assistant
次に
filteredIssuesの計算にglobalActiveAssigneesによるフィルタリングを追加します。Assistant
全てのタスクが完了しました。変更内容をまとめます。
変更概要
4つのファイルを変更し、
/projectsページに Human トグルフィルターを追加しました。1.
GlobalFilterBar.tsx-- フィルター UI の追加showHumanToggleFilter,humanToggleOptions,activeHumans,hasUnassignedHuman,onHumanToggleChangeの5つの新しい props を追加toggleHuman()トグルロジックとallHumansActive判定を追加- Project セクションと Status セクションの間に Human トグルフィルターの UI を挿入(All ボタン + 各担当者ボタン + 未割当ボタン)
2.
layout.tsx-- props の接続!isAssigneesView(= プロジェクトビュー)の時に、filteredAssigneeOptions.assigneesとactiveAssigneesを Human トグルフィルターに渡すよう設定
3.
projects/page.tsx-- コンテキストからの取得と受け渡しuseProjectData()からactiveAssigneesを取得- 各
ProjectSectionにglobalActiveAssignees={activeAssignees}を渡す filteredIssuesのカウントにもactiveAssigneesによるフィルタリングを反映
4.
ProjectSection.tsx-- 課題フィルタリングglobalActiveAssignees?: Set<string>prop を追加