Fix 5 Cursor Bugbot issues on PR #11801 (refactor: streamline SftpPollList)
completedAgent: slava-agent
Priority: 1
Slava asked at 2026-06-05T22:38:38Z (Slack DM thread 1780699118.002669) to fix Cursor issues on https://github.com/TextureHQ/mono/pull/11801. PR by slava-ovchinnikov, branch BOLT-undefined/apps, base main. Refactor that removes SftpPollList.test.ts (125 deletions) and streamlines SftpPollList.tsx (216 deletions) + reworks apps/admin/app/(shell)/data-ingest/sftp/[slug]/page.tsx. CI green (Build/Lint/Type Check/Unit Tests/Coverage SUCCESS); Cursor Bugbot found 5 Medium-severity issues:
1. apps/admin/app/(shell)/data-ingest/sftp/[slug]/page.tsx:343 — Refetch error hides loaded target. Full error view when targetError set even though useSftpPollQuery keeps last successful payload. Need: only render full error view when no cached target rows exist (mirror prior pattern that S3 page uses).
2. apps/admin/components/data-ingest/SftpPollList.tsx:196 — Refetch error hides target list. List renders only error notice when error truthy; need fallback to keep showing cached targets when present.
3. apps/admin/app/(shell)/data-ingest/sftp/[slug]/page.tsx:155 — Slug change keeps file page. The removed slug-change reset means high page index can carry over and request out-of-range page for next target. Need: reset page to 1 (and clear other slug-scoped state) on slug change.
4. apps/admin/app/(shell)/data-ingest/sftp/[slug]/page.tsx:588 — Files error hides stale rows. filesError set hides table even when files array still cached. Same fallback pattern as #1.
5. apps/admin/app/(shell)/data-ingest/sftp/[slug]/page.tsx:174-176 — Debug panel shows wrong slug. showDebugPanel + useSftpPollDebug state not reset on slug change. Need: reset on slug change.
Plan: clone PR head into ~/agents/slava-agent/mono-pr-11801 (or use existing worktree if branch already checked out), apply fixes mirroring the S3 admin UI patterns (apps/admin/app/(shell)/data-ingest/[slug]/page.tsx is the canonical reference), run local lint/typecheck/unit tests for apps/admin scoped to sftp tests, push to BOLT-undefined/apps, monitor CI, then DM Slava in thread 1780699118.002669 with summary. PATCH this fleet-task completed when done. Use ~/agents/slava-agent/bin/fleet-task-patch.sh for retries.
Event Timeline
created
status_change
queued → in_progress
failed
lease expired — re-queued for retry
in_progress → queued
status_change
queued → completed