fix: resolve remaining lint errors breaking CI

- Remove commented-out code in TeamProvisioningService and MemberCard
  (sonarjs/no-commented-code)
- Revert useAttachments keyRef sync from useEffect back to direct
  render assignment to avoid stale closure race, suppress react-hooks/refs
This commit is contained in:
iliya 2026-03-05 21:24:23 +02:00
parent 2ceed41e00
commit 64f2d3f413
3 changed files with 2 additions and 5 deletions

View file

@ -60,7 +60,6 @@ const STDOUT_RING_LIMIT = 64 * 1024;
const LOG_PROGRESS_THROTTLE_MS = 300;
const UI_LOGS_TAIL_LIMIT = 128 * 1024;
const SHELL_ENV_TIMEOUT_MS = 12000;
// const CLI_PREPARE_TIMEOUT_MS = 10000;
const PROBE_CACHE_TTL_MS = 10 * 60_000;
const PREFLIGHT_TIMEOUT_MS = 30000;
const PREFLIGHT_AUTH_RETRY_DELAY_MS = 2000;

View file

@ -1,7 +1,6 @@
import { Badge } from '@renderer/components/ui/badge';
import { Tooltip, TooltipContent, TooltipTrigger } from '@renderer/components/ui/tooltip';
import { getTeamColorSet } from '@renderer/constants/teamColors';
// import { useStore } from '@renderer/store'; // NOTE: disabled — lead context display
import { formatAgentRole } from '@renderer/utils/formatAgentRole';
import { agentAvatarUrl, getMemberDotClass, getPresenceLabel } from '@renderer/utils/memberHelpers';
import { GitBranch, Loader2, MessageSquare, Plus } from 'lucide-react';

View file

@ -54,9 +54,8 @@ export function useAttachments(options?: UseAttachmentsOptions): UseAttachmentsR
const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
const pendingRef = useRef<{ key: string; value: AttachmentPayload[] } | null>(null);
const keyRef = useRef(persistenceKey);
useEffect(() => {
keyRef.current = persistenceKey;
}, [persistenceKey]);
// eslint-disable-next-line react-hooks/refs -- synchronous ref sync during render is intentional to avoid stale key in callbacks
keyRef.current = persistenceKey;
// Sync ref with state
const updateAttachments = useCallback((next: AttachmentPayload[]) => {