feat: forge dashboard with project dir resolution#38
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 payloadsrc/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) endpointsscripts/dashboard.ts— CLI entry point:bun run dashboardsrc/utils/resolve-project-root.ts— resolves the real project directory from a loop's host session, falling back to the worktree dirtest/dashboard/data.test.ts— 9 tests for data collectiontest/dashboard/render.test.ts— 4 tests for HTML renderingtest/dashboard/server.test.ts— 5 tests for request handlingtest/resolve-project-root.test.ts— 4 tests for directory resolutionUpdated
src/services/execution.ts— uses resolveHostSessionDirectory to set projectDir on loop creation, ensuring accurate project groupingsrc/storage/index.ts— re-exports additional type aliasesvitest.config.ts— includes new dashboard test filespackage.json— adds dashboard scriptTests
Breaking changes
None.