Conversation
`selftune dashboard` (bare) now starts the live server with the React SPA instead of building static HTML. --serve is still accepted for backwards compat. Legacy static export remains via --export/--out. Auto-builds SPA if dist not found but source exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe dashboard infrastructure migrates from a legacy Bun.serve setup to serve a React SPA backed by SQLite v2. Auto-build logic is introduced to construct the SPA dist when missing; fallback to legacy dashboard on build failure. Default CLI behavior shifts from file export to live server startup, with backwards-compatible port support. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cli/selftune/dashboard.ts`:
- Around line 176-179: The console.error call that logs the invalid port (using
args and portIdx) must be formatted as a single-line statement to satisfy Biome;
update the multi-line template string invocation of console.error to a
single-line call (keep the same message content referencing args[portIdx + 1])
and ensure the subsequent process.exit(1) remains unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2e564861-e56e-4f2e-a886-73cb726aa2c5
📒 Files selected for processing (3)
cli/selftune/dashboard-server.tscli/selftune/dashboard.tscli/selftune/index.ts
| console.error( | ||
| `Invalid port "${args[portIdx + 1]}": must be an integer between 1 and 65535.`, | ||
| ); | ||
| process.exit(1); |
There was a problem hiding this comment.
Fix formatting to pass CI.
Pipeline failure indicates Biome expects this console.error call on a single line.
🔧 Proposed fix
- console.error(
- `Invalid port "${args[portIdx + 1]}": must be an integer between 1 and 65535.`,
- );
+ console.error(`Invalid port "${args[portIdx + 1]}": must be an integer between 1 and 65535.`);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| console.error( | |
| `Invalid port "${args[portIdx + 1]}": must be an integer between 1 and 65535.`, | |
| ); | |
| process.exit(1); | |
| console.error(`Invalid port "${args[portIdx + 1]}": must be an integer between 1 and 65535.`); | |
| process.exit(1); |
🧰 Tools
🪛 GitHub Actions: CI
[error] 176-178: Biome formatter failed: expected formatting of console.error call. The formatter shows the preferred single-line template: console.error(Invalid port "${args[portIdx + 1]}": must be an integer between 1 and 65535.);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cli/selftune/dashboard.ts` around lines 176 - 179, The console.error call
that logs the invalid port (using args and portIdx) must be formatted as a
single-line statement to satisfy Biome; update the multi-line template string
invocation of console.error to a single-line call (keep the same message content
referencing args[portIdx + 1]) and ensure the subsequent process.exit(1) remains
unchanged.
|
stacked on PR#44 |
Summary
selftune dashboard(bare) now starts the live server with the React SPA instead of building static HTML. The SPA uses the SQLite v2 API endpoints and is the default experience when you run the command.selftune dashboard→ starts live server with SPA at/--exportor--outflags--serveflag still accepted (now a no-op)/with clear warningWhat still uses old dashboard code
/legacy/endpoint,/api/data,/api/events, badge/report endpoints, and static export remain for compatibilityWhat remains before full migration
🤖 Generated with Claude Code