Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

Revert "feat(issues): Working filter + agent-working badge on board (MUL-2452…" (#2927)

Naiyuan Qing85e363370e83
diff --git a/packages/core/issues/active-tasks-by-issue.ts b/packages/core/issues/active-tasks-by-issue.ts
deleted file mode 100644
index 5d7b7ef433..0000000000
--- a/packages/core/issues/active-tasks-by-issue.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { queryOptions } from "@tanstack/react-query";
-import { api } from "../api";
-import { agentTaskSnapshotKeys } from "../agents/queries";
-import type { AgentTask } from "../types/agent";
-
-// Active = a task that hasn't reached a terminal state yet. Mirrors the
-// detail-page `ListActiveTasksByIssue` SQL definition so the board badge
-// matches the issue-detail banner.
-const ACTIVE = new Set<string>(["queued", "dispatched", "running"]);
-
-// Stay-in-sync surface with `agentTaskSnapshotOptions(wsId)`: same queryKey
-// + same queryFn so TanStack Query's cache is shared (one fetch, multiple
-// projected views) and any future tweak there is mirrored here. The
-// staleTime/gcTime defaults are inherited from the global QueryClient,
-// matching the lifetime of the underlying snapshot.
-function snapshotBase(wsId: string) {
- return {
- queryKey: agentTaskSnapshotKeys.list(wsId),
- queryFn: () => api.getAgentTaskSnapshot(),
- staleTime: 30 * 1000,
- gcTime: 5 * 60 * 1000,
- refetchOnWindowFocus: true,
- } as const;
-}
-
-/**
- * Derived map: issue id → list of active agent tasks on that issue.
- *
- * Shares the workspace-wide `agentTaskSnapshot` cache key so the snapshot
- * is fetched once and shaped into multiple views; WS `task:*` events that
- * invalidate the snapshot automatically refresh this selector.
- */
-export function activeTasksByIssueOptions(wsId: string) {
- return queryOptions({
- ...snapshotBase(wsId),
- select: (tasks: AgentTask[]) => {
- const map = new Map<string, AgentTask[]>();
- for (const t of tasks) {
- if (!t.issue_id) continue;
- if (!ACTIVE.has(t.status)) continue;
- const arr = map.get(t.issue_id);
- if (arr) arr.push(t);
- else map.set(t.issue_id, [t]);
- }
- return map;
- },
- });
-}
-
-/**
- * Set of issue ids that currently have at least one active agent task.
- * Used by the Working filter for O(1) membership checks.
- */
-export function workingIssueIdsOptions(wsId: string) {
- return queryOptions({
- ...snapshotBase(wsId),
- select: (tasks: AgentTask[]) => {
- const ids = new Set<string>();
- for (const t of tasks) {
- if (!t.issue_id) continue;
- if (!ACTIVE.has(t.status)) continue;
- ids.add(t.issue_id);
- }
- return ids;
- },
- });
-}
diff --git a/packages/core/issues/stores/view-store.ts b/packages/core/issues/stores/view-store.ts
index e45df5f7ac..65d99b1122 100644
--- a/packages/core/issues/stores/view-store.ts
+++ b/packages/core/issues/stores/view-store.ts
@@ -67,7 +67,6 @@ export interface IssueViewState {
projectFilters: string[];
includeNoProject: boolean;
labelFilters: string[];
- workingOnly: boolean;
sortBy: SortField;
sortDirection: SortDirection;
cardProperties: CardProperties;
@@ -88,7 +87,6 @@ export interface IssueViewState {
toggleLabelFilter: (labelId: string) => void;
hideStatus: (status: IssueStatus) => void;
showStatus: (status: IssueStatus) => void;
- toggleWorkingOnly: () => void;
clearFilters: () => void;
setSortBy: (field: SortField) => void;
setSortDirection: (dir: SortDirection) => void;
@@ -107,7 +105,6 @@ export const viewStoreSlice = (set: StoreApi<IssueViewState>["setState"]): Issue
projectFilters: [],
includeNoProject: false,
labelFilters: [],
- workingOnly: false,
sortBy: "position",
sortDirection: "asc",
cardProperties: {
@@ -199,8 +196,6 @@ export const viewStoreSlice = (set: StoreApi<IssueViewState>["setState"]): Issue
if (state.statusFilters.includes(status)) return state;
return { statusFilters: [...state.statusFilters, status] };
}),
- toggleWorkingOnly: () =>
- set((state) => ({ workingOnly: !state.workingOnly })),
clearFilters: () =>
set({
statusFilters: [],
@@ -211,7 +206,6 @@ export const viewStoreSlice = (set: StoreApi<IssueViewState>["setState"]): Issue
projectFilters: [],
includeNoProject: false,
labelFilters: [],
- workingOnly: false,
}),
setSortBy: (field) => set({ sortBy: field }),
setSortDirection: (dir) => set({ sortDirection: dir }),
@@ -244,7 +238,6 @@ export const viewStorePersistOptions = (name: string) => ({
projectFilters: state.projectFilters,
includeNoProject: state.includeNoProject,
labelFilters: state.labelFilters,
- workingOnly: state.workingOnly,
sortBy: state.sortBy,
sortDirection: state.sortDirection,
cardProperties: state.cardProperties,
diff --git a/packages/core/package.json b/packages/core/package.json
index 3198960a82..52ce1cc753 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -26,7 +26,6 @@
"./issues": "./issues/index.ts",
"./issues/queries": "./issues/queries.ts",
"./issues/mutations": "./issues/mutations.ts",
- "./issues/active-tasks-by-issue": "./issues/active-tasks-by-issue.ts",
"./issues/ws-updaters": "./issues/ws-updaters.ts",
"./issues/config": "./issues/config/index.ts",
"./issues/config/status": "./issues/config/status.ts",
diff --git a/packages/views/issues/components/board-card.tsx b/packages/views/issues/components/board-card.tsx
index be4621846e..e8630151f1 100644
--- a/packages/views/issues/components/board-card.tsx
+++ b/packages/views/issues/components/board-card.tsx
@@ -7,11 +7,9 @@ import type { AnimateLayoutChanges } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import { toast } from "sonner";
import type { Issue, UpdateIssueRequest } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
import { CalendarClock, CalendarDays } from "lucide-react";
import { useQuery } from "@tanstack/react-query";
import { ActorAvatar } from "../../common/actor-avatar";
-import { WorkingBadge } from "./working-badge";
import { useUpdateIssue } from "@multica/core/issues/mutations";
import { useWorkspacePaths } from "@multica/core/paths";
import { useWorkspaceId } from "@multica/core/hooks";
@@ -62,12 +60,10 @@ export const BoardCardContent = memo(function BoardCardContent({
issue,
editable = false,
childProgress,
- activeTasks,
}: {
issue: Issue;
editable?: boolean;
childProgress?: ChildProgress;
- activeTasks?: AgentTask[];
}) {
const { t } = useT("issues");
const storeProperties = useViewStore((s) => s.cardProperties);
@@ -109,11 +105,8 @@ export const BoardCardContent = memo(function BoardCardContent({
return (
<div className="rounded-lg border-[0.5px] border-border bg-card py-3 px-2.5 shadow-[0_3px_6px_-2px_rgba(0,0,0,0.02),0_1px_1px_0_rgba(0,0,0,0.04)] transition-colors group-hover/card:border-accent group-hover/card:bg-accent group-data-[popup-open]/card:border-accent group-data-[popup-open]/card:bg-accent">
- {/* Row 1: Identifier (+ working badge when an agent is active on this issue) */}
- <div className="flex items-center justify-between gap-2">
- <p className="text-xs text-muted-foreground">{issue.identifier}</p>
- {activeTasks && activeTasks.length > 0 && <WorkingBadge tasks={activeTasks} />}
- </div>
+ {/* Row 1: Identifier */}
+ <p className="text-xs text-muted-foreground">{issue.identifier}</p>
{/* Row 2: Title */}
<p className="mt-1 text-sm font-medium leading-snug line-clamp-2">
@@ -271,7 +264,7 @@ const animateLayoutChanges: AnimateLayoutChanges = (args) => {
return defaultAnimateLayoutChanges(args);
};
-export const DraggableBoardCard = memo(function DraggableBoardCard({ issue, childProgress, activeTasks }: { issue: Issue; childProgress?: ChildProgress; activeTasks?: AgentTask[] }) {
+export const DraggableBoardCard = memo(function DraggableBoardCard({ issue, childProgress }: { issue: Issue; childProgress?: ChildProgress }) {
const p = useWorkspacePaths();
const {
attributes,
@@ -304,7 +297,7 @@ export const DraggableBoardCard = memo(function DraggableBoardCard({ issue, chil
href={p.issueDetail(issue.id)}
className={`group block transition-colors ${isDragging ? "pointer-events-none" : ""}`}
>
- <BoardCardContent issue={issue} editable childProgress={childProgress} activeTasks={activeTasks} />
+ <BoardCardContent issue={issue} editable childProgress={childProgress} />
</AppLink>
</div>
</IssueActionsContextMenu>
diff --git a/packages/views/issues/components/board-column.tsx b/packages/views/issues/components/board-column.tsx
index d030d37e95..96068f1f97 100644
--- a/packages/views/issues/components/board-column.tsx
+++ b/packages/views/issues/components/board-column.tsx
@@ -6,7 +6,6 @@ import { Tooltip, TooltipTrigger, TooltipContent } from "@multica/ui/components/
import { useDroppable } from "@dnd-kit/core";
import { SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
import type { Issue, IssueAssigneeType, IssueStatus } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
import { Button } from "@multica/ui/components/ui/button";
import {
DropdownMenu,
@@ -38,7 +37,6 @@ export function BoardColumn({
issueIds,
issueMap,
childProgressMap,
- activeTasksMap,
totalCount,
footer,
projectId,
@@ -47,7 +45,6 @@ export function BoardColumn({
issueIds: string[];
issueMap: Map<string, Issue>;
childProgressMap?: Map<string, ChildProgress>;
- activeTasksMap?: Map<string, AgentTask[]>;
totalCount?: number;
footer?: ReactNode;
/** When set, the per-column "+" pre-fills the project on the create form. */
@@ -124,12 +121,7 @@ export function BoardColumn({
>
<SortableContext items={issueIds} strategy={verticalListSortingStrategy}>
{resolvedIssues.map((issue) => (
- <DraggableBoardCard
- key={issue.id}
- issue={issue}
- childProgress={childProgressMap?.get(issue.id)}
- activeTasks={activeTasksMap?.get(issue.id)}
- />
+ <DraggableBoardCard key={issue.id} issue={issue} childProgress={childProgressMap?.get(issue.id)} />
))}
</SortableContext>
{issueIds.length === 0 && (
diff --git a/packages/views/issues/components/board-view.tsx b/packages/views/issues/components/board-view.tsx
index 4f8eb6a936..f25334fcda 100644
--- a/packages/views/issues/components/board-view.tsx
+++ b/packages/views/issues/components/board-view.tsx
@@ -18,7 +18,6 @@ import type { QueryKey } from "@tanstack/react-query";
import { arrayMove } from "@dnd-kit/sortable";
import { Eye, MoreHorizontal } from "lucide-react";
import type { Issue, IssueAssigneeGroup, IssueAssigneeType, IssueStatus, UpdateIssueRequest } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
import { Button } from "@multica/ui/components/ui/button";
import { useLoadMoreByAssigneeGroup, useLoadMoreByStatus } from "@multica/core/issues/mutations";
import type { AssigneeGroupedIssuesFilter, MyIssuesFilter } from "@multica/core/issues/queries";
@@ -211,7 +210,6 @@ function getMoveUpdates(
}
const EMPTY_PROGRESS_MAP = new Map<string, ChildProgress>();
-const EMPTY_ACTIVE_TASKS_MAP = new Map<string, AgentTask[]>();
export function BoardView({
issues,
@@ -222,7 +220,6 @@ export function BoardView({
hiddenStatuses,
onMoveIssue,
childProgressMap = EMPTY_PROGRESS_MAP,
- activeTasksMap = EMPTY_ACTIVE_TASKS_MAP,
myIssuesScope,
myIssuesFilter,
projectId,
@@ -235,8 +232,6 @@ export function BoardView({
hiddenStatuses: IssueStatus[];
onMoveIssue: (issueId: string, updates: BoardMoveUpdates) => void;
childProgressMap?: Map<string, ChildProgress>;
- /** Active agent tasks indexed by issue id; drives the "agent working" badge. */
- activeTasksMap?: Map<string, AgentTask[]>;
/** When set, per-status load-more targets the scoped cache instead of the workspace one. */
myIssuesScope?: string;
myIssuesFilter?: MyIssuesFilter;
@@ -247,7 +242,6 @@ export function BoardView({
const sortBy = useViewStore((s) => s.sortBy);
const sortDirection = useViewStore((s) => s.sortDirection);
const grouping = useViewStore((s) => s.grouping);
- const workingOnly = useViewStore((s) => s.workingOnly);
const { getActorName } = useActorName();
const myIssuesOpts = myIssuesScope
? { scope: myIssuesScope, filter: myIssuesFilter ?? {} }
@@ -487,10 +481,8 @@ export function BoardView({
issueIds={columns[group.id] ?? []}
issueMap={issueMapRef.current}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
myIssuesOpts={myIssuesOpts}
projectId={projectId}
- workingOnly={workingOnly}
/>
) : (
assigneeGroupQueryKey && assigneeGroupFilter ? (
@@ -500,11 +492,9 @@ export function BoardView({
issueIds={columns[group.id] ?? []}
issueMap={issueMapRef.current}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
queryKey={assigneeGroupQueryKey}
filter={assigneeGroupFilter}
projectId={projectId}
- workingOnly={workingOnly}
/>
) : (
<BoardColumn
@@ -513,7 +503,6 @@ export function BoardView({
issueIds={columns[group.id] ?? []}
issueMap={issueMapRef.current}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
projectId={projectId}
totalCount={group.totalCount}
/>
@@ -533,11 +522,7 @@ export function BoardView({
<DragOverlay dropAnimation={null}>
{activeIssue ? (
<div className="w-[280px] rotate-2 scale-105 cursor-grabbing opacity-90 shadow-lg shadow-black/10">
- <BoardCardContent
- issue={activeIssue}
- childProgress={childProgressMap.get(activeIssue.id)}
- activeTasks={activeTasksMap.get(activeIssue.id)}
- />
+ <BoardCardContent issue={activeIssue} childProgress={childProgressMap.get(activeIssue.id)} />
</div>
) : null}
</DragOverlay>
@@ -550,21 +535,17 @@ function PaginatedAssigneeBoardColumn({
issueIds,
issueMap,
childProgressMap,
- activeTasksMap,
queryKey,
filter,
projectId,
- workingOnly,
}: {
group: BoardColumnGroup;
issueIds: string[];
issueMap: Map<string, Issue>;
childProgressMap?: Map<string, ChildProgress>;
- activeTasksMap?: Map<string, AgentTask[]>;
queryKey: QueryKey;
filter: AssigneeGroupedIssuesFilter;
projectId?: string;
- workingOnly: boolean;
}) {
const { loadMore, hasMore, isLoading, total } = useLoadMoreByAssigneeGroup(
{
@@ -575,21 +556,13 @@ function PaginatedAssigneeBoardColumn({
queryKey,
filter,
);
- // The hook's `total` is read from the raw query cache so load-more knows
- // when the server has more rows. The displayed column count must follow
- // the visible-after-filter set instead — when the Working filter is on,
- // `group.totalCount` (set by `applyWorkingFilterToGroups`) is the filtered
- // count, otherwise it equals the cache total so the user sees the usual
- // "N total" affordance during paginated loads.
- const displayCount = workingOnly ? group.totalCount ?? issueIds.length : total;
return (
<BoardColumn
group={group}
issueIds={issueIds}
issueMap={issueMap}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
- totalCount={displayCount}
+ totalCount={total}
projectId={projectId}
footer={
hasMore ? (
@@ -605,36 +578,27 @@ function PaginatedBoardColumn({
issueIds,
issueMap,
childProgressMap,
- activeTasksMap,
myIssuesOpts,
projectId,
- workingOnly,
}: {
group: BoardColumnGroup & { status: IssueStatus };
issueIds: string[];
issueMap: Map<string, Issue>;
childProgressMap?: Map<string, ChildProgress>;
- activeTasksMap?: Map<string, AgentTask[]>;
myIssuesOpts?: { scope: string; filter: MyIssuesFilter };
projectId?: string;
- workingOnly: boolean;
}) {
const { loadMore, hasMore, isLoading, total } = useLoadMoreByStatus(
group.status,
myIssuesOpts,
);
- // Same split as the assignee-grouped path: the hook keeps using the raw
- // cache total for pagination, but the column header reflects what the
- // user actually sees once the Working filter has trimmed the column.
- const displayCount = workingOnly ? issueIds.length : total;
return (
<BoardColumn
group={group}
issueIds={issueIds}
issueMap={issueMap}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
- totalCount={displayCount}
+ totalCount={total}
projectId={projectId}
footer={
hasMore ? (
diff --git a/packages/views/issues/components/issues-header.tsx b/packages/views/issues/components/issues-header.tsx
index 1916eb8c59..6882a2e493 100644
--- a/packages/views/issues/components/issues-header.tsx
+++ b/packages/views/issues/components/issues-header.tsx
@@ -66,10 +66,6 @@ import {
} from "@multica/core/issues/stores/issues-scope-store";
import { Tooltip, TooltipTrigger, TooltipContent } from "@multica/ui/components/ui/tooltip";
import type { Issue } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
-import { ActorAvatar as ActorAvatarBase } from "@multica/ui/components/common/actor-avatar";
-import { useActorName } from "@multica/core/workspace/hooks";
-import { cn } from "@multica/ui/lib/utils";
import { useT } from "../../i18n";
import { matchesPinyin } from "../../editor/extensions/pinyin-match";
@@ -498,18 +494,9 @@ function LabelSubContent({
export function IssuesHeader({
scopedIssues,
allowGantt = false,
- showWorkingToggle = true,
- activeTasksMap,
}: {
scopedIssues: Issue[];
allowGantt?: boolean;
- /** When false, suppresses the Working toggle (used on /project/<id> to keep
- * the project surface's filter dimensions unchanged). */
- showWorkingToggle?: boolean;
- /** Map of issue id → active agent tasks, used to derive the agent avatar
- * stack shown next to the Working label. Optional; missing data renders
- * the toggle without a stack. */
- activeTasksMap?: Map<string, AgentTask[]>;
}) {
const { t } = useT("issues");
const scope = useIssuesScopeStore((s) => s.scope);
@@ -527,7 +514,7 @@ export function IssuesHeader({
return (
<div className="flex h-12 shrink-0 items-center justify-between px-4">
- {/* Left: scope buttons + optional working toggle */}
+ {/* Left: scope buttons */}
<div className="flex items-center gap-1">
{SCOPE_VALUES.map((s) => (
<Tooltip key={s}>
@@ -550,12 +537,6 @@ export function IssuesHeader({
<TooltipContent side="bottom">{t(($) => $.scope[SCOPE_DESC_KEY[s]])}</TooltipContent>
</Tooltip>
))}
- {showWorkingToggle && (
- <>
- <span aria-hidden className="mx-1.5 h-4 w-px bg-border" />
- <WorkingToggleButton scopedIssues={scopedIssues} activeTasksMap={activeTasksMap} />
- </>
- )}
</div>
<IssueDisplayControls scopedIssues={scopedIssues} allowGantt={allowGantt} />
@@ -563,135 +544,6 @@ export function IssuesHeader({
);
}
-const MAX_VISIBLE_AGENTS = 3;
-const WORKING_AVATAR_SIZE = 18;
-
-/**
- * "● Working" toggle sitting next to the scope segmented control. The
- * label/text comes from the issues namespace, the count of agents currently
- * active in the surface drives the agent avatar stack on the right.
- *
- * `workingAgentIds` is derived from `scopedIssues` ∩ `activeTasksMap` so the
- * stack matches what filtering would actually return on the current page +
- * scope (Reviewer Blocker 3): a workspace-wide count would show numbers the
- * user can't reach when the page-level scope is narrower.
- */
-function WorkingToggleButton({
- scopedIssues,
- activeTasksMap,
-}: {
- scopedIssues: Issue[];
- activeTasksMap?: Map<string, AgentTask[]>;
-}) {
- const { t } = useT("issues");
- const workingOnly = useViewStore((s) => s.workingOnly);
- const toggleWorkingOnly = useViewStore((s) => s.toggleWorkingOnly);
- const { getActorName, getActorInitials, getActorAvatarUrl } = useActorName();
-
- const workingAgentIds = useMemo<string[]>(() => {
- if (!activeTasksMap) return [];
- const firstSeenAt = new Map<string, string>();
- for (const issue of scopedIssues) {
- const tasks = activeTasksMap.get(issue.id);
- if (!tasks) continue;
- for (const tk of tasks) {
- if (!tk.agent_id) continue;
- const ts = tk.started_at ?? tk.dispatched_at ?? tk.created_at;
- const prev = firstSeenAt.get(tk.agent_id);
- if (!prev || ts < prev) firstSeenAt.set(tk.agent_id, ts);
- }
- }
- return [...firstSeenAt.entries()]
- .sort((a, b) => (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0))
- .map(([id]) => id);
- }, [scopedIssues, activeTasksMap]);
-
- const hasWorking = workingAgentIds.length > 0;
- const visibleAgents = workingAgentIds.slice(0, MAX_VISIBLE_AGENTS);
- const overflow = workingAgentIds.length - visibleAgents.length;
- const tooltipDescription = t(($) => $.scope.working_description);
- const tooltipNames =
- workingAgentIds.length > 0
- ? workingAgentIds.map((id) => getActorName("agent", id)).join(", ")
- : "";
-
- return (
- <Tooltip>
- <TooltipTrigger
- render={
- <Button
- variant="outline"
- size="sm"
- aria-pressed={workingOnly}
- className={cn(
- "gap-1.5",
- workingOnly
- ? "bg-accent text-accent-foreground hover:bg-accent/80"
- : "text-muted-foreground",
- )}
- onClick={() => toggleWorkingOnly()}
- >
- <span
- aria-hidden
- className={cn(
- "relative inline-flex size-2",
- )}
- >
- {hasWorking && (
- <span className="absolute inset-0 animate-ping rounded-full bg-brand opacity-60" />
- )}
- <span
- className={cn(
- "relative inline-flex size-2 rounded-full",
- hasWorking ? "bg-brand" : "bg-muted-foreground/40",
- )}
- />
- </span>
- <span>{t(($) => $.scope.working_label)}</span>
- {hasWorking && (
- <span className="ml-0.5 inline-flex items-center -space-x-1.5">
- {visibleAgents.map((id) => (
- <span
- key={id}
- className="inline-flex rounded-full ring-2 ring-background"
- >
- <ActorAvatarBase
- name={getActorName("agent", id)}
- initials={getActorInitials("agent", id)}
- avatarUrl={getActorAvatarUrl("agent", id)}
- isAgent
- size={WORKING_AVATAR_SIZE}
- />
- </span>
- ))}
- {overflow > 0 && (
- <span
- aria-hidden
- className="inline-flex items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground ring-2 ring-background"
- style={{ width: WORKING_AVATAR_SIZE, height: WORKING_AVATAR_SIZE }}
- >
- +{overflow}
- </span>
- )}
- </span>
- )}
- </Button>
- }
- />
- <TooltipContent side="bottom">
- {tooltipNames ? (
- <div className="space-y-1">
- <div>{tooltipDescription}</div>
- <div className="text-xs text-muted-foreground">{tooltipNames}</div>
- </div>
- ) : (
- tooltipDescription
- )}
- </TooltipContent>
- </Tooltip>
- );
-}
-
export function IssueDisplayControls({
scopedIssues,
hideViewToggle = false,
diff --git a/packages/views/issues/components/issues-page.test.tsx b/packages/views/issues/components/issues-page.test.tsx
index 829535bd08..17f92db580 100644
--- a/packages/views/issues/components/issues-page.test.tsx
+++ b/packages/views/issues/components/issues-page.test.tsx
@@ -113,7 +113,6 @@ const mockListSquads = vi.hoisted(() =>
},
]),
);
-const mockGetAgentTaskSnapshot = vi.hoisted(() => vi.fn().mockResolvedValue([]));
vi.mock("@multica/core/api", () => ({
api: {
listIssues: (...args: any[]) => mockListIssues(...args),
@@ -122,7 +121,6 @@ vi.mock("@multica/core/api", () => ({
listMembers: (...args: any[]) => mockListMembers(...args),
listAgents: (...args: any[]) => mockListAgents(...args),
listSquads: (...args: any[]) => mockListSquads(...args),
- getAgentTaskSnapshot: (...args: any[]) => mockGetAgentTaskSnapshot(...args),
},
getApi: () => ({
listIssues: (...args: any[]) => mockListIssues(...args),
@@ -131,7 +129,6 @@ vi.mock("@multica/core/api", () => ({
listMembers: (...args: any[]) => mockListMembers(...args),
listAgents: (...args: any[]) => mockListAgents(...args),
listSquads: (...args: any[]) => mockListSquads(...args),
- getAgentTaskSnapshot: (...args: any[]) => mockGetAgentTaskSnapshot(...args),
}),
setApiInstance: vi.fn(),
}));
@@ -172,7 +169,6 @@ const mockViewState = {
projectFilters: [] as string[],
includeNoProject: false,
labelFilters: [] as string[],
- workingOnly: false,
sortBy: "position" as const,
sortDirection: "asc" as const,
cardProperties: { priority: true, description: true, assignee: true, dueDate: true, project: true, childProgress: true, labels: true },
@@ -187,7 +183,6 @@ const mockViewState = {
toggleProjectFilter: vi.fn(),
toggleNoProject: vi.fn(),
toggleLabelFilter: vi.fn(),
- toggleWorkingOnly: vi.fn(),
hideStatus: vi.fn(),
showStatus: vi.fn(),
clearFilters: vi.fn(),
@@ -485,12 +480,10 @@ describe("IssuesPage (shared)", () => {
vi.clearAllMocks();
mockListIssues.mockResolvedValue({ issues: [], total: 0 });
mockListGroupedIssues.mockResolvedValue({ groups: [] });
- mockGetAgentTaskSnapshot.mockResolvedValue([]);
mockViewState.viewMode = "board";
mockViewState.grouping = "status";
mockViewState.statusFilters = [];
mockViewState.priorityFilters = [];
- mockViewState.workingOnly = false;
mockScope = "all";
});
@@ -625,61 +618,4 @@ describe("IssuesPage (shared)", () => {
expect(screen.queryByText("Squad task")).not.toBeInTheDocument();
expect(screen.queryByText("Design landing page")).not.toBeInTheDocument();
});
-
- // Regression: with Working on + assignee grouping, the column header used
- // to show the cache's unfiltered group total because
- // `useLoadMoreByAssigneeGroup` reads from the raw cache. The displayed
- // count must follow the visible-after-filter set.
- it("assignee-grouped column header reflects filtered count when Working is on", async () => {
- mockViewState.viewMode = "board";
- mockViewState.grouping = "assignee";
- mockViewState.workingOnly = true;
-
- // user-1's column has three issues in the workspace cache; only
- // issue-1 is currently being worked on.
- const userOneIssues = mockIssues.filter(
- (i) => i.assignee_type === "member" && i.assignee_id === "user-1",
- );
- const padded = [
- ...userOneIssues,
- { ...userOneIssues[0]!, id: "extra-1", identifier: "TES-100", title: "Extra one" },
- { ...userOneIssues[0]!, id: "extra-2", identifier: "TES-101", title: "Extra two" },
- ];
- mockListGroupedIssues.mockResolvedValue({
- groups: [
- {
- id: "assignee:member:user-1",
- assignee_type: "member",
- assignee_id: "user-1",
- issues: padded,
- total: padded.length,
- },
- ],
- });
- mockGetAgentTaskSnapshot.mockResolvedValue([
- {
- id: "task-1",
- workspace_id: "ws-1",
- agent_id: "agent-1",
- issue_id: "issue-1",
- status: "running",
- created_at: "2026-01-01T00:00:00Z",
- updated_at: "2026-01-01T00:00:00Z",
- started_at: "2026-01-01T00:00:00Z",
- },
- ]);
-
- const { container } = renderWithQuery(<IssuesPage />);
-
- // Only the working issue stays visible.
- await screen.findByText("Implement auth");
- expect(screen.queryByText("Extra one")).not.toBeInTheDocument();
-
- // Column header count must equal 1, not the cached 4. The badge lives in
- // `span.tabular-nums` (see `board-column.tsx::BoardGroupHeading`).
- const countBadges = container.querySelectorAll("span.tabular-nums");
- const counts = [...countBadges].map((el) => el.textContent);
- expect(counts).toContain("1");
- expect(counts).not.toContain("4");
- });
});
diff --git a/packages/views/issues/components/issues-page.tsx b/packages/views/issues/components/issues-page.tsx
index a6062eb309..f93e06792b 100644
--- a/packages/views/issues/components/issues-page.tsx
+++ b/packages/views/issues/components/issues-page.tsx
@@ -9,9 +9,7 @@ import { useQuery } from "@tanstack/react-query";
import { useIssueViewStore, useClearFiltersOnWorkspaceChange } from "@multica/core/issues/stores/view-store";
import { useIssuesScopeStore } from "@multica/core/issues/stores/issues-scope-store";
import { ViewStoreProvider } from "@multica/core/issues/stores/view-store-context";
-import { activeTasksByIssueOptions, workingIssueIdsOptions } from "@multica/core/issues/active-tasks-by-issue";
import { filterIssues } from "../utils/filter";
-import { applyWorkingFilterToGroups } from "../utils/grouped-issues";
import { BOARD_STATUSES } from "@multica/core/issues/config";
import { useCurrentWorkspace } from "@multica/core/paths";
import { WorkspaceAvatar } from "../../workspace/workspace-avatar";
@@ -42,7 +40,6 @@ export function IssuesPage() {
const projectFilters = useIssueViewStore((s) => s.projectFilters);
const includeNoProject = useIssueViewStore((s) => s.includeNoProject);
const labelFilters = useIssueViewStore((s) => s.labelFilters);
- const workingOnly = useIssueViewStore((s) => s.workingOnly);
const usesAssigneeBoard = viewMode === "board" && grouping === "assignee";
const assigneeGroupFilter = useMemo<AssigneeGroupedIssuesFilter>(() => {
@@ -100,38 +97,9 @@ export function IssuesPage() {
const headerIssues = usesAssigneeBoard ? assigneeIssues : scopedIssues;
- // Shared workspace-wide agent task snapshot derivations (one fetch backs
- // both the per-issue badge and the Working filter membership set).
- const { data: activeTasksMap } = useQuery(activeTasksByIssueOptions(wsId));
- const { data: workingIssueIds } = useQuery(workingIssueIdsOptions(wsId));
-
const issues = useMemo(
- () =>
- filterIssues(scopedIssues, {
- statusFilters,
- priorityFilters,
- assigneeFilters,
- includeNoAssignee,
- creatorFilters,
- projectFilters,
- includeNoProject,
- labelFilters,
- workingOnly,
- workingIssueIds,
- }),
- [scopedIssues, statusFilters, priorityFilters, assigneeFilters, includeNoAssignee, creatorFilters, projectFilters, includeNoProject, labelFilters, workingOnly, workingIssueIds],
- );
-
- // Assignee-grouped board bypasses `filterIssues`. Rebuild the groups here
- // so the Working filter shows up there too AND so the column-header total
- // numbers stay in sync with the visible card count.
- const filteredAssigneeGroups = useMemo(
- () => applyWorkingFilterToGroups(assigneeGroupsQuery.data?.groups, workingOnly, workingIssueIds),
- [assigneeGroupsQuery.data, workingOnly, workingIssueIds],
- );
- const filteredAssigneeIssues = useMemo(
- () => filteredAssigneeGroups?.flatMap((g) => g.issues) ?? [],
- [filteredAssigneeGroups],
+ () => filterIssues(scopedIssues, { statusFilters, priorityFilters, assigneeFilters, includeNoAssignee, creatorFilters, projectFilters, includeNoProject, labelFilters }),
+ [scopedIssues, statusFilters, priorityFilters, assigneeFilters, includeNoAssignee, creatorFilters, projectFilters, includeNoProject, labelFilters],
);
// Fetch sub-issue progress from the backend so counts are accurate
@@ -220,7 +188,7 @@ export function IssuesPage() {
<ViewStoreProvider store={useIssueViewStore}>
{/* Header 2: Scope tabs + filters */}
- <IssuesHeader scopedIssues={headerIssues} activeTasksMap={activeTasksMap} />
+ <IssuesHeader scopedIssues={headerIssues} />
{/* Content: scrollable */}
{headerIssues.length === 0 ? (
@@ -233,23 +201,17 @@ export function IssuesPage() {
<div className="flex flex-col flex-1 min-h-0">
{viewMode === "board" ? (
<BoardView
- issues={usesAssigneeBoard ? filteredAssigneeIssues : issues}
- assigneeGroups={usesAssigneeBoard ? filteredAssigneeGroups : undefined}
+ issues={usesAssigneeBoard ? assigneeIssues : issues}
+ assigneeGroups={usesAssigneeBoard ? assigneeGroupsQuery.data?.groups : undefined}
assigneeGroupQueryKey={usesAssigneeBoard ? assigneeGroupsOptions.queryKey : undefined}
assigneeGroupFilter={usesAssigneeBoard ? assigneeGroupFilter : undefined}
visibleStatuses={visibleStatuses}
hiddenStatuses={hiddenStatuses}
onMoveIssue={handleMoveIssue}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
/>
) : (
- <ListView
- issues={issues}
- visibleStatuses={visibleStatuses}
- childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
- />
+ <ListView issues={issues} visibleStatuses={visibleStatuses} childProgressMap={childProgressMap} />
)}
</div>
)}
diff --git a/packages/views/issues/components/list-row.tsx b/packages/views/issues/components/list-row.tsx
index 2d64ab6605..8f1bd1966c 100644
--- a/packages/views/issues/components/list-row.tsx
+++ b/packages/views/issues/components/list-row.tsx
@@ -4,9 +4,7 @@ import { memo } from "react";
import { useQuery } from "@tanstack/react-query";
import { AppLink } from "../../navigation";
import type { Issue } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
import { ActorAvatar } from "../../common/actor-avatar";
-import { WorkingBadge } from "./working-badge";
import { useIssueSelectionStore } from "@multica/core/issues/stores/selection-store";
import { useWorkspacePaths } from "@multica/core/paths";
import { useWorkspaceId } from "@multica/core/hooks";
@@ -33,11 +31,9 @@ function formatDate(date: string): string {
export const ListRow = memo(function ListRow({
issue,
childProgress,
- activeTasks,
}: {
issue: Issue;
childProgress?: ChildProgress;
- activeTasks?: AgentTask[];
}) {
const selected = useIssueSelectionStore((s) => s.selectedIds.has(issue.id));
const toggle = useIssueSelectionStore((s) => s.toggle);
@@ -108,11 +104,6 @@ export const ListRow = memo(function ListRow({
)}
</span>
)}
- {activeTasks && activeTasks.length > 0 && (
- <span className="ml-1.5 shrink-0">
- <WorkingBadge tasks={activeTasks} />
- </span>
- )}
</span>
{showProject && (
<span className="inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground max-w-[140px]">
diff --git a/packages/views/issues/components/list-view.tsx b/packages/views/issues/components/list-view.tsx
index 93386a31eb..520fb8905e 100644
--- a/packages/views/issues/components/list-view.tsx
+++ b/packages/views/issues/components/list-view.tsx
@@ -6,7 +6,6 @@ import { Accordion } from "@base-ui/react/accordion";
import { Tooltip, TooltipTrigger, TooltipContent } from "@multica/ui/components/ui/tooltip";
import { Button } from "@multica/ui/components/ui/button";
import type { Issue, IssueStatus } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
import { useLoadMoreByStatus } from "@multica/core/issues/mutations";
import type { MyIssuesFilter } from "@multica/core/issues/queries";
import { useModalStore } from "@multica/core/modals";
@@ -19,13 +18,11 @@ import { InfiniteScrollSentinel } from "./infinite-scroll-sentinel";
import { useT } from "../../i18n";
const EMPTY_PROGRESS_MAP = new Map<string, ChildProgress>();
-const EMPTY_ACTIVE_TASKS_MAP = new Map<string, AgentTask[]>();
export function ListView({
issues,
visibleStatuses,
childProgressMap = EMPTY_PROGRESS_MAP,
- activeTasksMap = EMPTY_ACTIVE_TASKS_MAP,
myIssuesScope,
myIssuesFilter,
projectId,
@@ -33,8 +30,6 @@ export function ListView({
issues: Issue[];
visibleStatuses: IssueStatus[];
childProgressMap?: Map<string, ChildProgress>;
- /** Active agent tasks indexed by issue id; drives the "agent working" badge. */
- activeTasksMap?: Map<string, AgentTask[]>;
/** When set, per-status load-more targets the scoped cache instead of the workspace one. */
myIssuesScope?: string;
myIssuesFilter?: MyIssuesFilter;
@@ -93,7 +88,6 @@ export function ListView({
status={status}
issues={issuesByStatus.get(status) ?? []}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
myIssuesOpts={myIssuesOpts}
projectId={projectId}
/>
@@ -107,14 +101,12 @@ function StatusAccordionItem({
status,
issues,
childProgressMap,
- activeTasksMap,
myIssuesOpts,
projectId,
}: {
status: IssueStatus;
issues: Issue[];
childProgressMap: Map<string, ChildProgress>;
- activeTasksMap: Map<string, AgentTask[]>;
myIssuesOpts?: { scope: string; filter: MyIssuesFilter };
projectId?: string;
}) {
@@ -182,12 +174,7 @@ function StatusAccordionItem({
{issues.length > 0 ? (
<>
{issues.map((issue) => (
- <ListRow
- key={issue.id}
- issue={issue}
- childProgress={childProgressMap.get(issue.id)}
- activeTasks={activeTasksMap.get(issue.id)}
- />
+ <ListRow key={issue.id} issue={issue} childProgress={childProgressMap.get(issue.id)} />
))}
{hasMore && (
<InfiniteScrollSentinel onVisible={loadMore} loading={isLoading} />
diff --git a/packages/views/issues/components/working-badge.tsx b/packages/views/issues/components/working-badge.tsx
deleted file mode 100644
index a88e530c9e..0000000000
--- a/packages/views/issues/components/working-badge.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-"use client";
-
-import { Tooltip, TooltipTrigger, TooltipContent } from "@multica/ui/components/ui/tooltip";
-import { useActorName } from "@multica/core/workspace/hooks";
-import type { AgentTask } from "@multica/core/types/agent";
-import { useT } from "../../i18n";
-
-/**
- * Compact "an agent is working on this issue" badge for board cards and
- * list rows. Brand-color pulse dot + optional count of distinct agents.
- * The hover tooltip lists the agent names.
- *
- * The badge is intentionally non-interactive — it sits inside the issue
- * link target, so clicking it should follow the same destination as the
- * rest of the card.
- */
-export function WorkingBadge({ tasks }: { tasks: AgentTask[] }) {
- const { t } = useT("issues");
- const { getActorName } = useActorName();
- if (tasks.length === 0) return null;
-
- const uniqueAgentIds = Array.from(
- new Set(tasks.map((t) => t.agent_id).filter(Boolean)),
- );
- const tooltipLabel =
- uniqueAgentIds.length === 0
- ? t(($) => $.scope.working_label)
- : uniqueAgentIds.map((id) => getActorName("agent", id)).join(", ");
-
- return (
- <Tooltip>
- <TooltipTrigger
- render={
- <span
- aria-label={t(($) => $.scope.working_label)}
- className="inline-flex items-center gap-1 rounded-full bg-brand/10 px-1.5 py-0.5 text-[10px] font-medium text-brand"
- >
- <span className="relative inline-flex size-1.5">
- <span className="absolute inset-0 animate-ping rounded-full bg-brand opacity-60" />
- <span className="relative inline-flex size-1.5 rounded-full bg-brand" />
- </span>
- {uniqueAgentIds.length > 1 && (
- <span className="tabular-nums">{uniqueAgentIds.length}</span>
- )}
- </span>
- }
- />
- <TooltipContent side="top">{tooltipLabel}</TooltipContent>
- </Tooltip>
- );
-}
diff --git a/packages/views/issues/utils/filter.test.ts b/packages/views/issues/utils/filter.test.ts
index ac27c5d34e..5a2ef0c8ce 100644
--- a/packages/views/issues/utils/filter.test.ts
+++ b/packages/views/issues/utils/filter.test.ts
@@ -205,44 +205,4 @@ describe("filterIssues", () => {
expect(result.map((i) => i.id)).not.toContain("L4");
expect(result.map((i) => i.id)).not.toContain("L5");
});
-
- // --- Working filter ---
- it("returns all issues when workingOnly is false even if workingIssueIds is set", () => {
- const result = filterIssues(issues, {
- ...NO_FILTER,
- workingOnly: false,
- workingIssueIds: new Set(["1"]),
- });
- expect(result.map((i) => i.id)).toEqual(["1", "2", "3", "4"]);
- });
-
- it("keeps only issues whose id is in workingIssueIds when workingOnly is true", () => {
- const result = filterIssues(issues, {
- ...NO_FILTER,
- workingOnly: true,
- workingIssueIds: new Set(["2", "4"]),
- });
- expect(result.map((i) => i.id)).toEqual(["2", "4"]);
- });
-
- it("collapses to empty when workingOnly is true but workingIssueIds is undefined", () => {
- // Snapshot still loading — fail closed instead of leaking stale rows.
- const result = filterIssues(issues, {
- ...NO_FILTER,
- workingOnly: true,
- workingIssueIds: undefined,
- });
- expect(result).toEqual([]);
- });
-
- it("combines workingOnly with other filters using AND semantics", () => {
- const result = filterIssues(issues, {
- ...NO_FILTER,
- statusFilters: ["todo"],
- workingOnly: true,
- workingIssueIds: new Set(["1", "2"]),
- });
- // Only issue 1 is both status=todo and in the working set.
- expect(result.map((i) => i.id)).toEqual(["1"]);
- });
});
diff --git a/packages/views/issues/utils/filter.ts b/packages/views/issues/utils/filter.ts
index bcf5bafe59..5d03081223 100644
--- a/packages/views/issues/utils/filter.ts
+++ b/packages/views/issues/utils/filter.ts
@@ -10,12 +10,6 @@ export interface IssueFilters {
projectFilters: string[];
includeNoProject: boolean;
labelFilters: string[];
- /** When true, drop issues that have no active agent task. */
- workingOnly?: boolean;
- /** Membership set used by the `workingOnly` filter. Undefined while the
- * workspace agent-task snapshot is still loading; in that case no issue
- * is treated as working so the list collapses rather than flickering. */
- workingIssueIds?: Set<string>;
}
/**
@@ -28,13 +22,11 @@ export interface IssueFilters {
* - When both → show matching assignees + unassigned
*/
export function filterIssues(issues: Issue[], filters: IssueFilters): Issue[] {
- const { statusFilters, priorityFilters, assigneeFilters, includeNoAssignee, creatorFilters, projectFilters, includeNoProject, labelFilters, workingOnly, workingIssueIds } = filters;
+ const { statusFilters, priorityFilters, assigneeFilters, includeNoAssignee, creatorFilters, projectFilters, includeNoProject, labelFilters } = filters;
const hasAssigneeFilter = assigneeFilters.length > 0 || includeNoAssignee;
const hasProjectFilter = projectFilters.length > 0 || includeNoProject;
return issues.filter((issue) => {
- if (workingOnly && !workingIssueIds?.has(issue.id)) return false;
-
if (statusFilters.length > 0 && !statusFilters.includes(issue.status))
return false;
diff --git a/packages/views/issues/utils/grouped-issues.test.ts b/packages/views/issues/utils/grouped-issues.test.ts
deleted file mode 100644
index 0371a84bab..0000000000
--- a/packages/views/issues/utils/grouped-issues.test.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import { describe, it, expect } from "vitest";
-import type { Issue, IssueAssigneeGroup } from "@multica/core/types";
-import { applyWorkingFilterToGroups } from "./grouped-issues";
-
-function makeIssue(id: string): Issue {
- return {
- id,
- workspace_id: "ws-1",
- number: Number(id) || 0,
- identifier: `MUL-${id}`,
- title: id,
- description: null,
- status: "todo",
- priority: "medium",
- assignee_type: null,
- assignee_id: null,
- creator_type: "member",
- creator_id: "u-1",
- parent_issue_id: null,
- project_id: null,
- position: 0,
- start_date: null,
- due_date: null,
- created_at: "2026-01-01T00:00:00Z",
- updated_at: "2026-01-01T00:00:00Z",
- };
-}
-
-function makeGroup(id: string, issues: Issue[], total = issues.length): IssueAssigneeGroup {
- return {
- id,
- assignee_type: "member",
- assignee_id: id,
- issues,
- total,
- };
-}
-
-describe("applyWorkingFilterToGroups", () => {
- it("returns the same reference when workingOnly is off", () => {
- const groups = [makeGroup("g1", [makeIssue("1"), makeIssue("2")])];
- const result = applyWorkingFilterToGroups(groups, false, new Set(["1"]));
- expect(result).toBe(groups);
- });
-
- it("returns undefined passthrough when groups is undefined", () => {
- expect(applyWorkingFilterToGroups(undefined, true, new Set(["1"]))).toBeUndefined();
- });
-
- it("collapses every group to empty when workingIssueIds is undefined", () => {
- // While the snapshot query is still loading we should not pretend any
- // issue is working — otherwise stale cards would leak through the filter.
- const groups = [makeGroup("g1", [makeIssue("1"), makeIssue("2")], 5)];
- const result = applyWorkingFilterToGroups(groups, true, undefined);
- expect(result).toEqual([{ ...groups[0]!, issues: [], total: 0 }]);
- });
-
- it("filters issues and rewrites total to the filtered count", () => {
- const groups = [
- makeGroup("g1", [makeIssue("1"), makeIssue("2"), makeIssue("3")], 10),
- ];
- const result = applyWorkingFilterToGroups(
- groups,
- true,
- new Set(["1", "3"]),
- );
- expect(result).toBeDefined();
- expect(result![0]!.issues.map((i) => i.id)).toEqual(["1", "3"]);
- // total must follow the visible count so the column header doesn't keep
- // showing the unfiltered cache total when the user toggles Working.
- expect(result![0]!.total).toBe(2);
- });
-
- it("keeps a group with zero matches instead of dropping it", () => {
- // Removing the column on every toggle would shift the board layout.
- const groups = [
- makeGroup("g1", [makeIssue("1"), makeIssue("2")], 7),
- makeGroup("g2", [makeIssue("3")], 1),
- ];
- const result = applyWorkingFilterToGroups(groups, true, new Set(["3"]));
- expect(result).toBeDefined();
- expect(result![0]!.id).toBe("g1");
- expect(result![0]!.issues).toEqual([]);
- expect(result![0]!.total).toBe(0);
- expect(result![1]!.issues.map((i) => i.id)).toEqual(["3"]);
- expect(result![1]!.total).toBe(1);
- });
-});
diff --git a/packages/views/issues/utils/grouped-issues.ts b/packages/views/issues/utils/grouped-issues.ts
deleted file mode 100644
index 38ab606409..0000000000
--- a/packages/views/issues/utils/grouped-issues.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type { IssueAssigneeGroup } from "@multica/core/types";
-
-/**
- * Apply the Working filter to an assignee-grouped query result so the
- * board's grouped path matches what `filterIssues` does for the flat path.
- *
- * Rewrites `group.total` to the filtered count — that field drives the
- * column-header number (`board-view.tsx` → `board-column.tsx`), so leaving
- * the original total intact would render "cards shrank but header didn't".
- *
- * Empty groups are preserved on purpose: collapsing the columns would shift
- * the layout every time the user toggles Working, and the existing
- * "no issues in this column" empty state covers the empty case cleanly.
- */
-export function applyWorkingFilterToGroups(
- groups: IssueAssigneeGroup[] | undefined,
- workingOnly: boolean,
- workingIssueIds: Set<string> | undefined,
-): IssueAssigneeGroup[] | undefined {
- if (!groups) return groups;
- if (!workingOnly) return groups;
- if (!workingIssueIds) {
- return groups.map((g) => ({ ...g, issues: [], total: 0 }));
- }
- return groups.map((g) => {
- const filtered = g.issues.filter((i) => workingIssueIds.has(i.id));
- return { ...g, issues: filtered, total: filtered.length };
- });
-}
diff --git a/packages/views/locales/en/issues.json b/packages/views/locales/en/issues.json
index dde3a694fc..188b25407c 100644
--- a/packages/views/locales/en/issues.json
+++ b/packages/views/locales/en/issues.json
@@ -28,9 +28,7 @@
"members_label": "Members",
"members_description": "Issues assigned to team members",
"agents_label": "Agents",
- "agents_description": "Issues assigned to AI agents",
- "working_label": "Working",
- "working_description": "Show only issues with an active agent task"
+ "agents_description": "Issues assigned to AI agents"
},
"filters": {
"tooltip": "Filter",
diff --git a/packages/views/locales/en/my-issues.json b/packages/views/locales/en/my-issues.json
index ef19fa6015..ae162bc301 100644
--- a/packages/views/locales/en/my-issues.json
+++ b/packages/views/locales/en/my-issues.json
@@ -14,8 +14,6 @@
"agents_label": "My Agents and Squads",
"agents_description": "Issues assigned to my agents"
},
- "working_label": "Working",
- "working_description": "Show only issues with an active agent task",
"filter_button": "Filter",
"filter_status": "Status",
"filter_priority": "Priority",
diff --git a/packages/views/locales/zh-Hans/issues.json b/packages/views/locales/zh-Hans/issues.json
index 23bd5b03db..b409a78240 100644
--- a/packages/views/locales/zh-Hans/issues.json
+++ b/packages/views/locales/zh-Hans/issues.json
@@ -28,9 +28,7 @@
"members_label": "成员",
"members_description": "分配给成员的 issue",
"agents_label": "智能体",
- "agents_description": "分配给智能体的 issue",
- "working_label": "处理中",
- "working_description": "只看有智能体正在处理的 issue"
+ "agents_description": "分配给智能体的 issue"
},
"filters": {
"tooltip": "筛选",
diff --git a/packages/views/locales/zh-Hans/my-issues.json b/packages/views/locales/zh-Hans/my-issues.json
index d10c3732c9..6a7557dd25 100644
--- a/packages/views/locales/zh-Hans/my-issues.json
+++ b/packages/views/locales/zh-Hans/my-issues.json
@@ -14,8 +14,6 @@
"agents_label": "我的智能体和小队",
"agents_description": "分配给我的智能体的 issue"
},
- "working_label": "处理中",
- "working_description": "只看有智能体正在处理的 issue",
"filter_button": "筛选",
"filter_status": "状态",
"filter_priority": "优先级",
diff --git a/packages/views/my-issues/components/my-issues-header.tsx b/packages/views/my-issues/components/my-issues-header.tsx
index 8398ffa1c8..ce03c2bb36 100644
--- a/packages/views/my-issues/components/my-issues-header.tsx
+++ b/packages/views/my-issues/components/my-issues-header.tsx
@@ -48,10 +48,6 @@ import {
} from "@multica/core/issues/stores/view-store";
import { Tooltip, TooltipTrigger, TooltipContent } from "@multica/ui/components/ui/tooltip";
import type { Issue } from "@multica/core/types";
-import type { AgentTask } from "@multica/core/types/agent";
-import { ActorAvatar as ActorAvatarBase } from "@multica/ui/components/common/actor-avatar";
-import { useActorName } from "@multica/core/workspace/hooks";
-import { cn } from "@multica/ui/lib/utils";
import { myIssuesViewStore, type MyIssuesScope } from "@multica/core/issues/stores/my-issues-view-store";
import { useT } from "../../i18n";
@@ -109,16 +105,7 @@ function useIssueCounts(allIssues: Issue[]) {
// MyIssuesHeader
// ---------------------------------------------------------------------------
-export function MyIssuesHeader({
- allIssues,
- activeTasksMap,
-}: {
- allIssues: Issue[];
- /** Map of issue id → active agent tasks, used to derive the agent avatar
- * stack shown next to the Working label. Optional; missing data renders
- * the toggle without a stack. */
- activeTasksMap?: Map<string, AgentTask[]>;
-}) {
+export function MyIssuesHeader({ allIssues }: { allIssues: Issue[] }) {
const { t } = useT("my-issues");
const SCOPES: { value: MyIssuesScope; label: string; description: string }[] = [
{ value: "assigned", label: t(($) => $.header.scope.assigned_label), description: t(($) => $.header.scope.assigned_description) },
@@ -150,7 +137,7 @@ export function MyIssuesHeader({
return (
<div className="flex h-12 shrink-0 items-center justify-between px-4">
- {/* Left: scope buttons + Working toggle */}
+ {/* Left: scope buttons */}
<div className="flex items-center gap-1">
{SCOPES.map((s) => (
<Tooltip key={s.value}>
@@ -173,8 +160,6 @@ export function MyIssuesHeader({
<TooltipContent side="bottom">{s.description}</TooltipContent>
</Tooltip>
))}
- <span aria-hidden className="mx-1.5 h-4 w-px bg-border" />
- <WorkingToggleButton allIssues={allIssues} activeTasksMap={activeTasksMap} />
</div>
{/* Right: filter + display + view toggle */}
@@ -445,120 +430,3 @@ export function MyIssuesHeader({
</div>
);
}
-
-const MAX_VISIBLE_AGENTS = 3;
-const WORKING_AVATAR_SIZE = 18;
-
-function WorkingToggleButton({
- allIssues,
- activeTasksMap,
-}: {
- allIssues: Issue[];
- activeTasksMap?: Map<string, AgentTask[]>;
-}) {
- const { t } = useT("my-issues");
- const workingOnly = useStore(myIssuesViewStore, (s) => s.workingOnly);
- const toggleWorkingOnly = useStore(
- myIssuesViewStore,
- (s) => s.toggleWorkingOnly,
- );
- const { getActorName, getActorInitials, getActorAvatarUrl } = useActorName();
-
- const workingAgentIds = useMemo<string[]>(() => {
- if (!activeTasksMap) return [];
- const firstSeenAt = new Map<string, string>();
- for (const issue of allIssues) {
- const tasks = activeTasksMap.get(issue.id);
- if (!tasks) continue;
- for (const tk of tasks) {
- if (!tk.agent_id) continue;
- const ts = tk.started_at ?? tk.dispatched_at ?? tk.created_at;
- const prev = firstSeenAt.get(tk.agent_id);
- if (!prev || ts < prev) firstSeenAt.set(tk.agent_id, ts);
- }
- }
- return [...firstSeenAt.entries()]
- .sort((a, b) => (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0))
- .map(([id]) => id);
- }, [allIssues, activeTasksMap]);
-
- const hasWorking = workingAgentIds.length > 0;
- const visibleAgents = workingAgentIds.slice(0, MAX_VISIBLE_AGENTS);
- const overflow = workingAgentIds.length - visibleAgents.length;
- const tooltipDescription = t(($) => $.header.working_description);
- const tooltipNames =
- workingAgentIds.length > 0
- ? workingAgentIds.map((id) => getActorName("agent", id)).join(", ")
- : "";
-
- return (
- <Tooltip>
- <TooltipTrigger
- render={
- <Button
- variant="outline"
- size="sm"
- aria-pressed={workingOnly}
- className={cn(
- "gap-1.5",
- workingOnly
- ? "bg-accent text-accent-foreground hover:bg-accent/80"
- : "text-muted-foreground",
- )}
- onClick={() => toggleWorkingOnly()}
- >
- <span aria-hidden className="relative inline-flex size-2">
- {hasWorking && (
- <span className="absolute inset-0 animate-ping rounded-full bg-brand opacity-60" />
- )}
- <span
- className={cn(
- "relative inline-flex size-2 rounded-full",
- hasWorking ? "bg-brand" : "bg-muted-foreground/40",
- )}
- />
- </span>
- <span>{t(($) => $.header.working_label)}</span>
- {hasWorking && (
- <span className="ml-0.5 inline-flex items-center -space-x-1.5">
- {visibleAgents.map((id) => (
- <span
- key={id}
- className="inline-flex rounded-full ring-2 ring-background"
- >
- <ActorAvatarBase
- name={getActorName("agent", id)}
- initials={getActorInitials("agent", id)}
- avatarUrl={getActorAvatarUrl("agent", id)}
- isAgent
- size={WORKING_AVATAR_SIZE}
- />
- </span>
- ))}
- {overflow > 0 && (
- <span
- aria-hidden
- className="inline-flex items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground ring-2 ring-background"
- style={{ width: WORKING_AVATAR_SIZE, height: WORKING_AVATAR_SIZE }}
- >
- +{overflow}
- </span>
- )}
- </span>
- )}
- </Button>
- }
- />
- <TooltipContent side="bottom">
- {tooltipNames ? (
- <div className="space-y-1">
- <div>{tooltipDescription}</div>
- <div className="text-xs text-muted-foreground">{tooltipNames}</div>
- </div>
- ) : (
- tooltipDescription
- )}
- </TooltipContent>
- </Tooltip>
- );
-}
diff --git a/packages/views/my-issues/components/my-issues-page.tsx b/packages/views/my-issues/components/my-issues-page.tsx
index 206e7eb99f..8bc0535ada 100644
--- a/packages/views/my-issues/components/my-issues-page.tsx
+++ b/packages/views/my-issues/components/my-issues-page.tsx
@@ -11,7 +11,6 @@ import { useCurrentWorkspace } from "@multica/core/paths";
import { WorkspaceAvatar } from "../../workspace/workspace-avatar";
import { useQuery } from "@tanstack/react-query";
import { filterIssues } from "../../issues/utils/filter";
-import { applyWorkingFilterToGroups } from "../../issues/utils/grouped-issues";
import { BOARD_STATUSES } from "@multica/core/issues/config";
import { ViewStoreProvider } from "@multica/core/issues/stores/view-store-context";
import { useIssueSelectionStore } from "@multica/core/issues/stores/selection-store";
@@ -20,7 +19,6 @@ import { ListView } from "../../issues/components/list-view";
import { BatchActionToolbar } from "../../issues/components/batch-action-toolbar";
import { useClearFiltersOnWorkspaceChange } from "@multica/core/issues/stores/view-store";
import { useWorkspaceId } from "@multica/core/hooks";
-import { activeTasksByIssueOptions, workingIssueIdsOptions } from "@multica/core/issues/active-tasks-by-issue";
import { myIssueAssigneeGroupsOptions, myIssueListOptions, childIssueProgressOptions, type AssigneeGroupedIssuesFilter, type MyIssuesFilter } from "@multica/core/issues/queries";
import { useUpdateIssue } from "@multica/core/issues/mutations";
import { myIssuesViewStore } from "@multica/core/issues/stores/my-issues-view-store";
@@ -38,7 +36,6 @@ export function MyIssuesPage() {
const priorityFilters = useStore(myIssuesViewStore, (s) => s.priorityFilters);
const scope = useStore(myIssuesViewStore, (s) => s.scope);
const grouping = useStore(myIssuesViewStore, (s) => s.grouping);
- const workingOnly = useStore(myIssuesViewStore, (s) => s.workingOnly);
const usesAssigneeBoard = viewMode === "board" && grouping === "assignee";
// Clear filter state when switching between workspaces (URL-driven).
@@ -99,12 +96,7 @@ export function MyIssuesPage() {
? assigneeGroupsQuery.isLoading
: statusIssuesQuery.isLoading;
- // Shared workspace-wide agent task snapshot derivations (one fetch backs
- // both the per-issue badge and the Working filter membership set).
- const { data: activeTasksMap } = useQuery(activeTasksByIssueOptions(wsId));
- const { data: workingIssueIds } = useQuery(workingIssueIdsOptions(wsId));
-
- // Apply status/priority + Working filters from view store
+ // Apply status/priority filters from view store
const issues = useMemo(
() =>
filterIssues(myIssues, {
@@ -116,22 +108,8 @@ export function MyIssuesPage() {
projectFilters: [],
includeNoProject: false,
labelFilters: [],
- workingOnly,
- workingIssueIds,
}),
- [myIssues, statusFilters, priorityFilters, workingOnly, workingIssueIds],
- );
-
- // Assignee-grouped board bypasses `filterIssues`. Rebuild the groups here
- // so the Working filter shows up there too AND so the column-header total
- // numbers stay in sync with the visible card count.
- const filteredAssigneeGroups = useMemo(
- () => applyWorkingFilterToGroups(assigneeGroupsQuery.data?.groups, workingOnly, workingIssueIds),
- [assigneeGroupsQuery.data, workingOnly, workingIssueIds],
- );
- const filteredAssigneeIssues = useMemo(
- () => filteredAssigneeGroups?.flatMap((g) => g.issues) ?? [],
- [filteredAssigneeGroups],
+ [myIssues, statusFilters, priorityFilters],
);
const { data: childProgressMap = new Map() } = useQuery(childIssueProgressOptions(wsId));
@@ -217,7 +195,7 @@ export function MyIssuesPage() {
</PageHeader>
{/* Header: scope tabs (left) + controls (right) */}
- <MyIssuesHeader allIssues={myIssues} activeTasksMap={activeTasksMap} />
+ <MyIssuesHeader allIssues={myIssues} />
{/* Content: scrollable */}
<ViewStoreProvider store={myIssuesViewStore}>
@@ -231,15 +209,14 @@ export function MyIssuesPage() {
<div className="flex flex-col flex-1 min-h-0">
{viewMode === "board" ? (
<BoardView
- issues={usesAssigneeBoard ? filteredAssigneeIssues : issues}
- assigneeGroups={usesAssigneeBoard ? filteredAssigneeGroups : undefined}
+ issues={usesAssigneeBoard ? myIssues : issues}
+ assigneeGroups={usesAssigneeBoard ? assigneeGroupsQuery.data?.groups : undefined}
assigneeGroupQueryKey={usesAssigneeBoard ? assigneeGroupsOptions.queryKey : undefined}
assigneeGroupFilter={usesAssigneeBoard ? assigneeGroupFilter : undefined}
visibleStatuses={visibleStatuses}
hiddenStatuses={hiddenStatuses}
onMoveIssue={handleMoveIssue}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
myIssuesScope={scope}
myIssuesFilter={filter}
/>
@@ -248,7 +225,6 @@ export function MyIssuesPage() {
issues={issues}
visibleStatuses={visibleStatuses}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
myIssuesScope={scope}
myIssuesFilter={filter}
/>
diff --git a/packages/views/projects/components/project-detail.tsx b/packages/views/projects/components/project-detail.tsx
index d902d9904d..3ab624467a 100644
--- a/packages/views/projects/components/project-detail.tsx
+++ b/packages/views/projects/components/project-detail.tsx
@@ -30,7 +30,6 @@ import { PROJECT_STATUS_ORDER, PROJECT_STATUS_CONFIG, PROJECT_PRIORITY_ORDER } f
import { BOARD_STATUSES } from "@multica/core/issues/config";
import { createIssueViewStore } from "@multica/core/issues/stores/view-store";
import { ViewStoreProvider, useViewStore } from "@multica/core/issues/stores/view-store-context";
-import { activeTasksByIssueOptions } from "@multica/core/issues/active-tasks-by-issue";
import { filterIssues } from "../../issues/utils/filter";
import { getProjectIssueMetrics } from "./project-issue-metrics";
import { ActorAvatar } from "../../common/actor-avatar";
@@ -151,11 +150,6 @@ function ProjectIssuesContent({
);
const { data: childProgressMap = new Map() } = useQuery(childIssueProgressOptions(wsId));
- // Project detail intentionally does NOT offer the Working toggle (kept out
- // by `showWorkingToggle={false}` below) and does NOT pipe `workingOnly`
- // through `filterIssues` — but the per-card badge still renders so users
- // see which issues have an agent running.
- const { data: activeTasksMap } = useQuery(activeTasksByIssueOptions(wsId));
const visibleStatuses = useMemo(() => {
if (statusFilters.length > 0)
@@ -224,7 +218,6 @@ function ProjectIssuesContent({
hiddenStatuses={hiddenStatuses}
onMoveIssue={handleMoveIssue}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
myIssuesScope={scope}
myIssuesFilter={filter}
projectId={projectId}
@@ -235,7 +228,6 @@ function ProjectIssuesContent({
issues={issues}
visibleStatuses={visibleStatuses}
childProgressMap={childProgressMap}
- activeTasksMap={activeTasksMap}
myIssuesScope={scope}
myIssuesFilter={filter}
projectId={projectId}
@@ -316,7 +308,7 @@ function ProjectIssuesSurface({
return (
<>
- <IssuesHeader scopedIssues={projectIssues} allowGantt showWorkingToggle={false} />
+ <IssuesHeader scopedIssues={projectIssues} allowGantt />
<ProjectIssuesContent
projectId={projectId}
projectIssues={projectIssues}