diff --git a/src/client/JobsDrawer.tsx b/src/client/JobsDrawer.tsx index 20f23ed..002a814 100644 --- a/src/client/JobsDrawer.tsx +++ b/src/client/JobsDrawer.tsx @@ -32,8 +32,6 @@ export interface JobsDrawerProps { rows: readonly TreeJob[] /** Agent count of the tree (root included) — the auto-collapse signal. */ agentCount: number - /** The page is visible (active tab + open panel): skip polling otherwise. */ - active: boolean /** Open the output popover of one row (anchor = the row's main button). */ onOpenOutput(row: TreeJob, anchor: HTMLElement): void } @@ -42,7 +40,7 @@ export interface JobsDrawerProps { export const JOBS_DRAWER_COLLAPSE_AT = 8 export function JobsDrawer(props: JobsDrawerProps): ReactNode { - const { rows, agentCount, active, onOpenOutput } = props + const { rows, agentCount, onOpenOutput } = props const autoOpen = agentCount < JOBS_DRAWER_COLLAPSE_AT /** Manual override; undefined = follow the auto rule. */ const [manualOpen, setManualOpen] = useState(undefined) diff --git a/src/client/SubagentView.tsx b/src/client/SubagentView.tsx index 611150f..c64d322 100644 --- a/src/client/SubagentView.tsx +++ b/src/client/SubagentView.tsx @@ -38,7 +38,7 @@ import { rootAncestor, } from './subagent-detect.ts' import { type LastActivity } from '../subagent-activity.ts' -import { collectTreeJobs, orderJobs, type TreeJob } from './subagent-jobs.ts' +import { collectTreeJobs, orderJobs } from './subagent-jobs.ts' import { api, type TeamsViewResult } from './api.ts' import { usePolling } from './use-polling.ts' import { t } from './locales.ts' @@ -52,7 +52,6 @@ import { TeamBoard } from './TeamBoard.tsx' import type { SidebarStore } from './state.ts' import type { WorkflowRunView } from '../workflow-runs.ts' import legacy from './SubagentView.module.css' -import css from './tasks-graph.module.css' /** Refresh cadence of the live "last text + tool call" lines while a child runs. */ const POLL_MS = 3000 @@ -116,6 +115,9 @@ function useTeamView( if (rootId === undefined) return const result = await api.teamsView(rootId, signal) if (!signal.aborted) setView(result) + // `epoch` is the manual-refresh trigger: bumping it changes the task + // identity, which restarts the poller with an immediate tick. + // eslint-disable-next-line react-hooks/exhaustive-deps }, [rootId, epoch]) usePolling(rootId !== undefined && active, poll, { intervalMs: TELEMETRY_POLL_MS, @@ -463,7 +465,6 @@ export function SubagentView(props: { { setPopover(popover?.kind === 'job' && popover.jobId === row.job.id ? null diff --git a/src/client/tasks-shared.tsx b/src/client/tasks-shared.tsx index f62b2bf..21eea12 100644 --- a/src/client/tasks-shared.tsx +++ b/src/client/tasks-shared.tsx @@ -13,7 +13,7 @@ * latest output text, jump action — lives in the anchored popover. */ import type { ReactNode } from 'react' -import { StateDot, type StateDotState } from '@deepseek-ai/dsh-client-ui-primitives' +import type { StateDotState } from '@deepseek-ai/dsh-client-ui-primitives' import type { LastActivity } from '../subagent-activity.ts' import type { TasksAgentNode, TasksNodeState, TasksWorkflowNode } from './tasks-model.ts' import { toolGlyph } from './tool-icons.tsx'