Skip to content

feat: forge dashboard with project dir resolution#38

Merged
chriswritescode-dev merged 6 commits into
mainfrom
feat/forge-dashboard
Jun 3, 2026
Merged

feat: forge dashboard with project dir resolution#38
chriswritescode-dev merged 6 commits into
mainfrom
feat/forge-dashboard

Conversation

@chriswritescode-dev
Copy link
Copy Markdown
Owner

Summary

Adds a web-based Forge Dashboard (Bun server) for monitoring loop state across projects, plus a resolveHostSessionDirectory utility that fixes projectDir resolution so the dashboard correctly groups loops by originating project.

Changes

Added

  • src/dashboard/data.ts — collectDashboardData aggregates loops, sections, findings, and usage from the forge DB into a structured payload
  • src/dashboard/render.ts — renderDashboardHtml generates a self-contained HTML page with live-updating UI (polling /api/data every 5s)
  • src/dashboard/server.ts — createRequestHandler serves HTML (/) and JSON (/api/data) endpoints
  • scripts/dashboard.ts — CLI entry point: bun run dashboard
  • src/utils/resolve-project-root.ts — resolves the real project directory from a loop's host session, falling back to the worktree dir
  • test/dashboard/data.test.ts — 9 tests for data collection
  • test/dashboard/render.test.ts — 4 tests for HTML rendering
  • test/dashboard/server.test.ts — 5 tests for request handling
  • test/resolve-project-root.test.ts — 4 tests for directory resolution

Updated

  • src/services/execution.ts — uses resolveHostSessionDirectory to set projectDir on loop creation, ensuring accurate project grouping
  • src/storage/index.ts — re-exports additional type aliases
  • vitest.config.ts — includes new dashboard test files
  • package.json — adds dashboard script

Tests

  • 22 new tests across 4 test files covering data collection, HTML rendering, server endpoints, and directory resolution

Breaking changes

None.

- Extract shared startDashboardServer and browser-open utilities into
  src/dashboard/launch.ts
- Simplify scripts/dashboard.ts CLI entry point to delegate to launcher
- Register forge.dashboard palette command with in-process server
  lifecycle in TUI plugin
- Add tui.keybinds configuration section for executePlan and dashboard
- Add tests for DB path resolution and server startup
@chriswritescode-dev chriswritescode-dev merged commit ce68538 into main Jun 3, 2026
1 check passed
@chriswritescode-dev chriswritescode-dev deleted the feat/forge-dashboard branch June 3, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant