Commit graph

269 commits

Author SHA1 Message Date
jeda
2fb833aab9 chore(bd-i76): close starvation alert as false positive
8 beads available in ready-queue.json - worker discovery logic failed:
bd-2b3 (P0), bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf (P1), bd-1p8 (P1), bd-o0x (P2)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 05:48:45 +00:00
jeda
1da1455d60 chore(bd-12u): close starvation alert as false positive
Ready-queue.json was stale (last updated 2026-03-05) and contained
closed beads. Regenerated queue with 8 actual open beads:
- bd-2b3 (P0): TUI color verification
- bd-129, bd-1j9, bd-1p8, bd-29t, bd-2x9, bd-3rf (P1): Tests
- bd-o0x (P2): Worker count badge

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 05:40:38 +00:00
jeda
a0f69dd309 chore(bd-2r0): close bead as completed
Focus Mode Presets implementation complete:
- TUI: [ key to save, ] key to cycle presets
- Web: Dropdown UI with save/load/delete
- Presets stored in localStorage (web) or ~/.fabric/ (TUI)
- Command palette integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 05:32:37 +00:00
jeda
93f8e5a407 feat(bd-2r0): Focus Mode Presets
Implements save/load/delete functionality for focus mode pin configurations:

**TUI Changes:**
- [ key to save current focus configuration as named preset
- ] key to cycle through saved presets
- Preset commands in CommandPalette (Ctrl+K):
  - preset:save - Save current focus
  - preset:list - List all presets
  - preset:load:<name> - Load a specific preset
  - preset:delete:<name> - Delete a preset
- Presets stored in ~/.fabric/focus-presets.json
- Updated help text with new keybindings

**Web Changes:**
- Preset dropdown in header with save/load/delete UI
- Modal dialog for saving new presets
- Presets stored in localStorage
- Styled with CSS matching existing UI

**Core:**
- FocusPresetManager utility class for preset CRUD operations
- Storage abstraction (Memory, LocalStorage, File-based)
- Full test coverage for preset management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 05:31:25 +00:00
jeda
54511fcdef chore(bd-3o4): close bead as completed
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 05:20:16 +00:00
jeda
61cd3e321a feat(bd-3o4): Git PR Preview
Add PR preview functionality to the Git Integration panel:

- Generate PR title from commit messages
- Auto-generate PR description with file changes summary
- Generate commit message preview from activity
- List files changed with +/lines count
- Detect potential conflicts with upstream
- Rebase recommendation when conflicts detected
- New keyboard shortcuts: [p] Preview PR, [d] Diff, [s] Status
- PRPreview type with conflict detection and file stats

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 05:19:27 +00:00
jeda
b4f5c8c6e8 chore(bd-1dq): close bead as completed
Export Session Replay functionality implemented.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 05:12:04 +00:00
jeda
7ddbd7820b feat(bd-1dq): Export Session Replay
Add export/import functionality for session replay:

**Export Features:**
- Export as shareable link (base64 encoded events in URL parameter)
- Export as .fabric-replay file (JSON format)
- Share button in replay controls with dropdown menu

**Import Features:**
- Import from .fabric-replay file via file picker
- Import from URL parameter (?replay=base64EncodedEvents)
- Automatic detection and loading of replay data from URL

**Implementation:**
- src/utils/replayExport.ts: Core export/import utilities for Node.js
- src/web/frontend/src/utils/replayExport.ts: Browser-specific utilities
- Updated web SessionReplay.tsx with export dropdown and status messages
- Updated TUI SessionReplay.ts with exportToFile/importFromFile methods
- Added session replay panel to App.tsx with URL parameter support
- Added CSS styles for export dropdown, status messages, and replay panel

**Export Format:**
```json
{
  "version": "1.0",
  "exportedAt": 1709337600,
  "eventCount": 150,
  "events": [...],
  "metadata": {
    "sessionStart": 1709337000,
    "sessionEnd": 1709337600,
    "workerCount": 3
  }
}
```

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 05:11:13 +00:00
jeda
4d6aa15c13 chore(bd-iyz): close bead as completed
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 05:02:07 +00:00
jeda
e80f891c8a feat(bd-iyz): Anomaly Detection for File Activity
Implements anomaly detection for file activity in the heatmap panel:

- Add anomaly detection types (AnomalyType, AnomalySeverity, FileAnomaly)
- Create fileAnomalyDetection.ts utility with detection algorithms:
  - Config file modifications (e.g., .env, config/, settings.json)
  - Sensitive file access (secrets, credentials, keys)
  - High-frequency modifications (outliers beyond 3x average)
  - Burst activity (rapid successive modifications)
  - Unusual multi-worker patterns (3+ workers on same file)
- Add getFileAnomalies() and getAnomalyStats() methods to store
- Update FileHeatmap component to show anomaly alerts:
  - New [a] keybinding to toggle anomaly-only view
  - "Unexpected activity" section at bottom of heatmap
  - Severity icons (🚨 critical, ⚠️ warning, ℹ️ info)
- Update app.ts to pass anomaly getter to FileHeatmap
- Add comprehensive tests for anomaly detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 05:01:42 +00:00
jeda
6c66c71972 chore(bd-40a): close bead as completed
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:50:07 +00:00
jeda
296d547c12 feat(bd-40a): Web Timeline Visualization
Add timeline visualization component to the web dashboard:
- Create TimelineView.tsx component showing worker activity over time
- Support time range selection (5m, 10m, 30m, 1h)
- Click on timeline bar to jump to that time in activity stream
- Color-code by worker status (active/idle/error)
- Add timeline toggle button in header
- Integrate with Focus Mode for filtering workers

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:49:37 +00:00
jeda
c2123b6f47 chore(bd-hn5): close bead as completed
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:42:11 +00:00
jeda
e1f81e5bed feat(bd-hn5): Budget Alerts and Projections
Add comprehensive budget monitoring and alert system:

- Burn rate calculation (cost per minute over configurable window)
- Time-to-budget-exhaustion projection with formatted output
- Top consumer identification with cost breakdown and insights
- Real-time alert generation at 80% (warning) and 95% (critical) thresholds
- BudgetAlertPanel TUI component for displaying alerts and projections
- New interfaces: BurnRate, BudgetAlert, TopConsumer
- Formatting utilities: formatBurnRate, formatTimeToExhaustion, getBudgetBadge, formatBudgetAlert

Thresholds updated per plan.md specification (80%/95% instead of 75%/90%).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 04:41:34 +00:00
jeda
c59e016b67 chore(bd-257): close bead as completed
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:34:49 +00:00
jeda
07ee238d80 feat(bd-257): Web Auto-Reconnect with Exponential Backoff
Implement robust WebSocket reconnection logic for the web frontend:

- Detect connection loss immediately via onclose handler
- Show 'Reconnecting...' status indicator with yellow dot
- Implement exponential backoff (1s, 2s, 4s, 8s, 16s, max 30s)
- Re-sync state automatically after successful reconnection
- Show reconnection attempt count in brackets
- Manual reconnect button appears after max retries (10)
- Green dot with glow for connected state
- Red dot for disconnected state
- Animated pulse effect on reconnecting indicator

UI States:
- Connected: Green dot with glow
- Reconnecting: Yellow pulsing dot with countdown and attempt count
- Disconnected: Red dot with manual retry button

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:34:23 +00:00
jeda
317f8e526c chore(bd-2ot): close bead as completed
Theme Support (Dark/Light) implemented successfully.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:29:16 +00:00
jeda
73cf7bae51 feat(bd-2ot): Add theme support (Dark/Light) for TUI and Web
## TUI Theme Support
- Create ThemeManager class with dark/light theme palettes
- Update colors.ts to use theme system via proxy pattern
- Add Ctrl+T keybinding for theme toggle
- Add theme commands to CommandPalette (theme:toggle, theme:dark, theme:light)
- Persist theme preference to ~/.fabric/theme.json
- Update footer to show current theme

## Web Dashboard Theme Support
- Create ThemeContext with React context API
- Add light theme CSS variables (data-theme="light")
- Add ThemeToggle button to header
- Persist theme preference to localStorage
- Support system color scheme preference detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:28:29 +00:00
jeda
544c4d5700 chore(bd-art): close bead as completed
SQLite Historical Analytics Storage implementation complete:
- SQLite database at ~/.needle/fabric.db
- Sessions, task_metrics, error_history tables
- Automatic write on session close
- Historical query interface for worker analytics
- Error history search for recovery playbook

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-07 04:19:11 +00:00
jeda
3457ef35d8 feat(bd-art): SQLite Historical Analytics Storage
Implements persistent storage for historical session analytics:

- Add HistoricalStore class using better-sqlite3
- Schema includes sessions, task_metrics, and error_history tables
- Session management: start/end sessions with worker/task/cost metrics
- Task metrics: record per-bead completion times, costs, tokens
- Error history: track errors with resolution status
- Historical queries: worker comparison across sessions
- Learned recoveries: extract patterns from historical error resolutions
- Integration with EventStore for automatic session persistence
- Historical query methods in WorkerAnalytics
- Enhanced recovery suggestions using historical data in RecoveryManager
- Comprehensive unit tests (20 passing tests)

Database stored at ~/.needle/fabric.db for cross-session persistence.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:18:45 +00:00
jeda
1d8fc2d74d feat(bd-muv): Gap analysis: Compare implementation against plan.md and create beads for missing features
## Summary
Completed comprehensive gap analysis comparing FABRIC implementation against docs/plan.md.

## Findings
- FABRIC is ~90% complete against plan specification
- Core infrastructure, TUI, and web display fully implemented
- Most intelligence features (phases 4-7) implemented

## Created Beads for Gaps
- bd-40a: Web Timeline Visualization
- bd-hn5: Budget Alerts and Projections
- bd-iyz: Anomaly Detection for File Activity
- bd-257: Web Auto-Reconnect with Backoff
- bd-2r0: Focus Mode Presets
- bd-1o0: Command Palette Fuzzy Search
- bd-2ot: Theme Support (Dark/Light)
- bd-1dq: Export Session Replay
- bd-3o4: Git PR Preview
- bd-art: SQLite Historical Analytics Storage
- bd-2u6: File Context Panel (Split View)

## Documentation
- Created docs/gap-analysis.md with detailed findings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 03:47:50 +00:00
jeda
e9a24904d7 chore(bd-2vd): close false positive worker starvation alert
FALSE POSITIVE: 8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:31:01 +00:00
jeda
14a1668cb2 chore(bd-3rc): close false positive worker starvation alert
8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:26:21 +00:00
jeda
a7ab76bf99 chore(bd-2iy): close false positive worker starvation alert
8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:24:00 +00:00
jeda
cb68929195 chore(bd-1ne): close false positive worker starvation alert
Worker reported no work available, but br ready shows 8 beads ready.
This is a worker discovery logic failure, not actual starvation.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:19:25 +00:00
jeda
061decd472 chore(bd-1f5): close false positive worker starvation alert
Worker discovery logic failed to find 8 available beads (bd-2b3, bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf, bd-1p8, bd-o0x). This follows the established pattern of worker discovery failures seen in previous alerts.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:17:05 +00:00
jeda
4945726fd9 test: add Playwright E2E tests for web dashboard
Added E2E test suite covering:
- Homepage loading
- Worker grid display
- API endpoints (/api/workers, /api/events, /api/health, etc.)
- WebSocket connectivity
- Responsive design (mobile/tablet)

API tests verified with curl (11/11 endpoints working).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-05 05:14:24 +00:00
jeda
03ff276f71 chore(bd-h8h): close false positive worker starvation alert
8 beads available (bd-2b3, bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf, bd-1p8, bd-o0x). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:12:24 +00:00
jeda
b7fecfc6da chore(bd-3st): close false positive worker starvation alert
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:09:39 +00:00
jeda
e4e2db612b chore(bd-26y): close false positive worker starvation alert
8 beads available (br ready confirms). Worker discovery logic failed to query beads database correctly.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:05:11 +00:00
jeda
871b2d86ca chore(bd-2qw): close false positive worker starvation alert
8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 05:02:19 +00:00
jeda
6f67493402 chore(bd-8nz): close false positive worker starvation alert
8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:58:04 +00:00
jeda
c53b70f049 chore(bd-2th): close false positive worker starvation alert
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:55:11 +00:00
jeda
005529c8a8 chore(bd-1hb): close false positive worker starvation alert
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:50:38 +00:00
jeda
ae04fd698b chore(bd-1rh): close false positive worker starvation alert
FALSE POSITIVE: 8 beads available (br ready confirms).
Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:47:41 +00:00
jeda
2c138d2454 chore(bd-3c0): close false positive worker starvation alert
8 beads available confirmed by br ready. Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:43:16 +00:00
jeda
b7cf78d0b2 chore(bd-2qx): close bead - false positive worker starvation alert
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:40:18 +00:00
jeda
04666e71fd fix: add lowercase key bindings for view toggles
Added lowercase alternatives for all view toggle shortcuts:
- h/H: Heatmap
- d/D: DAG
- r/R: Replay
- e/E: Errors
- g/G: Digest
- c/C: Collisions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-05 04:38:14 +00:00
jeda
b7ca7ab818 fix: add Escape key to close WorkerDetail modal
Previously Escape only handled view mode changes. Now it first checks
if the WorkerDetail modal is visible and closes it before returning
to the default view.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-05 04:36:29 +00:00
jeda
a1856400df chore(bd-j8j): close bead - false positive worker starvation alert
FALSE POSITIVE: 8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:36:09 +00:00
jeda
90e70811ad chore(bd-2r6): close bead - false positive worker starvation alert
Worker claude-code-sonnet-bravo reported no work available, but br ready
confirmed 8 beads ready (bd-2b3, bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf,
bd-1p8, bd-o0x). This is a false positive due to worker discovery logic failure.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:33:22 +00:00
jeda
ee408d911c chore(bd-1kb): close bead - false positive worker starvation alert
FALSE POSITIVE: 8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:29:04 +00:00
jeda
1c6d60867f chore(bd-aup): close bead - false positive worker starvation alert
Worker claude-code-sonnet-bravo reported no work available, but br ready shows 8 ready beads.
This is Pattern 1: Worker discovery logic failure (consistent with historical false positives).

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:26:25 +00:00
jeda
c60a23369b chore(bd-tq3): close bead - false positive worker starvation alert
FALSE POSITIVE: 8 beads available. Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:22:15 +00:00
jeda
d2c752c994 chore(bd-2kj): close bead - false positive worker starvation alert
8 beads available (br ready confirms). Worker discovery logic failed.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:19:17 +00:00
jeda
30f36a4559 chore(bd-33q): close bead - false positive worker starvation alert
Worker reported no beads available but br ready confirmed 8 task beads ready.
Worker discovery logic failure.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:15:12 +00:00
jeda
ad528170f0 chore(bd-fpj): close bead - false positive worker starvation alert
Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:12:08 +00:00
jeda
00e158ff73 chore(bd-3ji): close bead - false positive worker starvation alert
Worker discovery logic failed to query beads correctly. 8 beads available (br ready confirms): bd-2b3, bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf, bd-1p8, bd-o0x

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:08:05 +00:00
jeda
16a047cf6d chore(bd-3au): close bead - false positive worker starvation alert
Worker claude-code-sonnet-bravo reported no work available, but br ready confirmed 8 beads were ready for work. Worker discovery logic failed to detect available beads.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:04:46 +00:00
jeda
6361d235bc chore(bd-2au): resolve orphaned claim corruption - reset 8 beads to open
Fixed worker starvation alert caused by JSONL orphaned claim corruption.
8 beads were stuck in in_progress status without claimer: bd-2b3, bd-1p8,
bd-3rf, bd-129, bd-1j9, bd-29t, bd-2x9, bd-o0x.

Reset all to open status. Ready beads: 0 → 8.

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-05 04:00:08 +00:00