fix(lint): drop unused imports/props left by the redesign

pnpm lint was never run before the first push (CI Lint + ci-windows Lint
both failed on it): the jobs drawer no longer polls (its output popover
does), and StateDot/css/TreeJob imports went unused when the cards and the
team chip were rewritten.
This commit is contained in:
Menghuan1918
2026-09-27 22:18:19 +08:00
parent 317299e161
commit 85a19cecc3
3 changed files with 6 additions and 7 deletions
+1 -3
View File
@@ -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<boolean | undefined>(undefined)
+4 -3
View File
@@ -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: {
<JobsDrawer
rows={jobRows}
agentCount={agentCount}
active={active}
onOpenOutput={(row, anchor) => {
setPopover(popover?.kind === 'job' && popover.jobId === row.job.id
? null
+1 -1
View File
@@ -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'