|
| 1 | +# BUG-010: Run Page Regressions - Graph Events & Screenshots Not Visible |
| 2 | + |
| 3 | +> **Line Limit:** 150 lines max (enforced) |
| 4 | +> **Priority**: P1 |
| 5 | +> **Status**: 🔴 Open |
| 6 | +
|
| 7 | +--- |
| 8 | + |
| 9 | +## Summary |
| 10 | +The `/run` page has three critical regressions preventing proper visualization of agent activity: |
| 11 | +1. **Graph events not visible** - Timeline events are not rendering |
| 12 | +2. **Screenshots not visible** - Discovered screenshot gallery is empty |
| 13 | +3. **Stop node not called** - Run completion indicator never fires |
| 14 | + |
| 15 | +**Evidence**: `.playwright-mcp/drift-detection-with-screenshot.png` |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Severity / Impact |
| 20 | +- **Severity**: High |
| 21 | +- **Impact**: Complete loss of run visualization - users cannot verify agent behavior. Affects all users attempting drift detection. No workaround available. |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Environment |
| 26 | +- **Backend**: `encore run` (local) - Port 4000 |
| 27 | +- **Frontend**: `localhost:5173` |
| 28 | +- **Browser/OS**: All browsers, all OS |
| 29 | +- **Package**: `com.jetbrains.kotlinconf` (from `.env`) |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## Steps to Reproduce |
| 34 | +1. Start services: `bun run dev` |
| 35 | +2. Ensure Appium/device running |
| 36 | +3. Navigate to `http://localhost:5173` |
| 37 | +4. Click "Detect My First Drift" button |
| 38 | +5. Wait for navigation to `/run/{runId}` page |
| 39 | +6. **Observe**: Page loads but timeline empty, no screenshots, no stop node |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## Expected Result |
| 44 | +- Timeline events appear in real-time (SSE updates) |
| 45 | +- Screenshot gallery populates with captured screens |
| 46 | +- Stop node fires when agent completes exploration |
| 47 | +- Run state transitions visible in UI |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## Actual Result |
| 52 | +- Run Timeline heading visible ✅ |
| 53 | +- Cancel Run button present ✅ |
| 54 | +- **BUT**: No timeline events render |
| 55 | +- **BUT**: Screenshot gallery remains empty |
| 56 | +- **BUT**: Stop node never appears |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Root Cause |
| 61 | +**Investigation required**. Potential causes: |
| 62 | +1. SSE streams not connecting (check Network tab for `/run/stream`, `/graph/stream`) |
| 63 | +2. Backend not publishing events (check `run_event_outbox` table) |
| 64 | +3. Frontend not rendering events (Svelte reactivity issue) |
| 65 | +4. Agent not running (check backend logs for agent activity) |
| 66 | + |
| 67 | +**Diagnostic Commands** (see `.playwright-mcp/BUG-010-INVESTIGATION.md`): |
| 68 | +```bash |
| 69 | +# Check SSE streams |
| 70 | +curl -N http://localhost:4000/run/stream/{runId} |
| 71 | + |
| 72 | +# Check backend logs |
| 73 | +task backend:logs | grep -i "sse\|event" |
| 74 | + |
| 75 | +# Check browser DevTools → Network tab → filter "stream" |
| 76 | +``` |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Proposed Fix |
| 81 | +1. **Investigate**: Check browser DevTools Network/Console tabs |
| 82 | +2. **Verify**: Backend logs show event publications |
| 83 | +3. **Test**: SSE endpoints directly with curl |
| 84 | +4. **Fix**: Address root cause (SSE connection, event publishing, or rendering) |
| 85 | +5. **Test**: Add automated tests for event/screenshot rendering |
| 86 | + |
| 87 | +**Suggested Test Additions** (`frontend/tests/e2e/run-page.spec.ts`): |
| 88 | +- Wait for graph events: `waitForGraphEvent(page, "agent.event.screenshot_captured")` |
| 89 | +- Verify screenshot count: `expect(countDiscoveredScreenshots(page)).toBeGreaterThan(0)` |
| 90 | +- Check stop node: `waitForStopNode(page, { timeout: 120000 })` |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## Attachments / Logs |
| 95 | +- **Evidence**: `.playwright-mcp/drift-detection-with-screenshot.png` |
| 96 | +- **Investigation Guide**: `.playwright-mcp/BUG-010-INVESTIGATION.md` |
| 97 | +- **Test Helpers**: `frontend/tests/e2e/helpers.ts` |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## Owner / Priority |
| 102 | +- **Reported by**: Founder (via Playwright analysis) |
| 103 | +- **Assigned to**: Next available frontend/fullstack engineer |
| 104 | +- **Priority**: P1 (High impact, core feature broken) |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## Related Items |
| 109 | +- **Testing Infrastructure**: FR-020 (Run Page Regression Harness) |
| 110 | +- **Testing Guide**: `.claude-skills/webapp-testing_skill/SKILL.md` |
| 111 | +- **Original Report**: Request `f0164999-3a34-4705-bd7c-e426eff61c6f` |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## Notes |
| 116 | +- Current E2E tests only verify page load, not event rendering |
| 117 | +- Test package: `com.jetbrains.kotlinconf` (defined in `.env`) |
| 118 | +- Manual reproduction required with Appium/device services running |
| 119 | +- See investigation guide for detailed diagnostic steps |
0 commit comments