From 2c7df0d80d451d15742baa696e488b93e7adec58 Mon Sep 17 00:00:00 2001 From: Phelipe Lorran <112786693+httpsphl@users.noreply.github.com> Date: Fri, 9 Oct 2026 13:25:47 -0300 Subject: [PATCH 1/2] feat(app): state filters in the conversation list Chips for all, needs you, working and unread, with counts; a crew with nothing in the chosen state steps aside. Window-only, not remembered. --- app/src/features/crews/Sidebar.tsx | 12 +++- app/src/features/crews/StateFilters.tsx | 48 +++++++++++++ app/src/features/crews/stateFilter.test.tsx | 42 +++++++++++ app/src/features/crews/stateFilter.ts | 77 +++++++++++++++++++++ app/src/i18n/en/crews.ts | 7 ++ app/src/i18n/es/crews.ts | 7 ++ app/src/i18n/pt-BR/crews.ts | 7 ++ 7 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 app/src/features/crews/StateFilters.tsx create mode 100644 app/src/features/crews/stateFilter.test.tsx create mode 100644 app/src/features/crews/stateFilter.ts diff --git a/app/src/features/crews/Sidebar.tsx b/app/src/features/crews/Sidebar.tsx index ec59085c..c3d0c8f8 100644 --- a/app/src/features/crews/Sidebar.tsx +++ b/app/src/features/crews/Sidebar.tsx @@ -6,7 +6,7 @@ import { type Messages, useT } from "../../i18n"; import { when } from "../../lib/format"; import { plainText } from "../../lib/plainText"; import type { Activity, Bot, Crew } from "../../lib/protocol.gen"; -import { activityOf, botsOf, crewList } from "../../store/app"; +import { activityOf, crewList } from "../../store/app"; import { useApp } from "../../store/context"; import { isUnread, unreadIn } from "../../store/seen"; import { CountBadge } from "../../ui/Badge"; @@ -22,6 +22,8 @@ import { CrewDialog } from "./CrewDialog"; import { setAllCollapsed, setCollapsed, useCollapsed, useCollapsedSet } from "./collapsed"; import { useCrewActions } from "./crewActions"; import { row } from "./SidebarPages"; +import { StateFilters } from "./StateFilters"; +import { filteredBots, useStateFilter } from "./stateFilter"; /** Crews as sections and their bots as conversations (spec 15.1). */ export function Sidebar() { @@ -63,6 +65,7 @@ export function Sidebar() { onClick={() => setCreating(true)} /> + {crews.length > 0 && }