ALL-544: Address Bugbot review + DeepSource on PR #11464
completedPR #11464 (ALL-544 Monitor Detail View) needs follow-up after fleet-task ab521d50 closed prematurely. State on commit 10182cc86d (pushed ~16:13Z 2026-06-01):
1) Bugbot review found 4 UNRESOLVED issues — all in apps/dashboard/components/pages/MonitorDetailPage/MonitorDetailPage.tsx:
- HIGH (16:14Z, line 552): 'Wrong monitor after route change' — rendering only waits on loading, never checks monitor.id matches routeMonitorId. Apollo can keep stale prior data while loading=false. Affects enable/disable + archive targeting. Bug refs useMonitorDetail.ts#L29-L38.
- MEDIUM (15:34Z, line 494): 'Stale mutation updates wrong monitor' — in-flight toggle/archive completion handler can target previous monitor after navigation.
- MEDIUM (15:37Z, line 534): 'Error hides loaded monitor' — load-failure branch runs whenever useQuery reports error even if monitor is already populated.
- MEDIUM (15:43Z, line 471): 'Mutation errors persist after navigation' — toggleError/archiveError state not reset when route monitorId changes.
(These are 4 distinct symptoms of one underlying issue: route-change race condition + Apollo cache reuse + lack of identity validation on monitor.id vs routeMonitorId.)
2) DeepSource JS + Test coverage gates FAIL on every commit since PR open, despite summary card Grade A everywhere except Complexity=B (which seems to be the blocking metric). No inline DeepSource review comments — only summary. Investigate whether complexity threshold is the blocker; if so, decompose MonitorDetailPage into smaller pieces or refactor the largest function/component to lower complexity.
3) PR thread: Slack #wintermute-seph thread root 1780329633.895659 (logged in memory/pr-threads.md). Existing thread already has a 'still red on Unit Tests / pre-existing main breakage' update from previous session; Unit Tests have since gone green via commit 10182cc fixing the edges-visuals/patterns resolver in vitest.
WORK:
- Checkout branch wintermute/all-544-monitor-detail-view (might need a fresh worktree or to switch /home/agent/agents/wintermute off the stale all-543 branch — coordinate carefully and DO NOT lose any uncommitted work).
- Fix all 4 Bugbot findings with a coordinated patch: introduce a routeMonitorId guard so we never render or mutate a monitor whose .id doesn't match the URL; reset local mutation state + error state on monitorId change; show partial monitor with non-blocking error banner instead of full error replacing loaded data when applicable.
- Investigate DeepSource Complexity B → either decompose the page or lower the score. If decomposition is non-trivial, document the finding in the PR thread and let Seph call it.
- Run local checks before pushing: turbo run lint check-types test for the affected packages.
- Push, wait for ALL gates to settle (GitHub Actions + DeepSource JS + DeepSource coverage + Bugbot), then reply to each unresolved Bugbot thread with what was fixed (use gh api review-thread reply, not new top-level comments).
- Post ONE state update in Slack thread 1780329633.895659 ONLY IF terminal state is genuinely new (green on <sha> OR remaining-red explanation worth Seph's eyes). Otherwise stay silent. Do NOT post merge-pressure language.
- Log progress events on the fleet-task at terminal gate states (no silent watching after push).
MERGE BUTTON: DO NOT MERGE. The button is Seph's.
Event Timeline
created
status_change
queued → in_progress
failed
lease expired — re-queued for retry
in_progress → queued
progress
Pushed 8b7654ea57: all 4 Bugbot findings fixed. Local lint+typecheck+3151 tests green. Replied to all 4 Bugbot threads. Waiting for CI.
status_change
queued → completed
progress
PR #11464 review triage: fixed latest Cursor Bugbot low-severity duplicate vitest alias comment in d54bae65, replied to and resolved thread. Local signin page vitest passes; CI running.
progress
PR #11464 follow-up: pushed d85e048982 to address DeepSource JS-0415 nesting issues after d54bae65. Local typecheck + targeted MonitorDetail/signin tests passed. CI/DeepSource running.
progress
PR #11464 CI investigation: dashboard Build OOMs deterministically after main merge. Root: Next/Sentry sourcemap generation/upload across 442+448+146 files on 4vcpu runner, OOM after third Sentry upload before route optimization. Pushed 544674494b: run dashboard Build on blacksmith-8vcpu and disable Sentry sourcemaps for PR build validation only; deploy/main still upload artifacts.