refactor: remove dev-mode detection from CLI dashboard and start commands#903
refactor: remove dev-mode detection from CLI dashboard and start commands#903miniMaddy wants to merge 7 commits intoComposioHQ:mainfrom
Conversation
…ands ao start and ao dashboard now always use the production path (dist-server/start-all.js) regardless of whether they're run from a source checkout or an installed package. Contributors should use `pnpm dev` for development, which is unaffected by this change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Solves #876 |
start-all.js reads the port from process.env.PORT (set by buildDashboardEnv), not from process.argv. The -p flag was a leftover from the old npx next dev invocation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Fixed in cf89f51 — removed the unused |
Add the missing production build check to ao dashboard and replace the old dev-era cache cleanup behavior with a real rebuild path for source checkouts. This fixes ao dashboard --rebuild and keeps ao start --rebuild consistent with production startup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the preflight unit tests with the expanded checkBuilt validation for dashboard production artifacts and cover the missing-web-artifacts failure case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Check whether dashboard rebuild is supported before attempting to stop a running dashboard, so unsupported installs fail early without taking down the current server. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace raw node_modules substring checks with a shared helper so source checkout paths that merely contain that text are not misclassified as npm-installed layouts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop the unused findProcessWebDir helper and its orphaned tests now that dashboard rebuild no longer depends on the running process cwd. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 50bdb2e. Configure here.
| vi.mock("../../src/lib/dashboard-rebuild.js", () => ({ | ||
| cleanNextCache: vi.fn(), | ||
| findRunningDashboardPid: vi.fn().mockResolvedValue(null), | ||
| findProcessWebDir: vi.fn().mockResolvedValue(null), |
There was a problem hiding this comment.
Test mock missing newly imported function
Low Severity
The mock for dashboard-rebuild.js was partially updated — findProcessWebDir was removed — but rebuildDashboardProductionArtifacts (now imported by start.ts) wasn't added, and cleanNextCache (no longer imported by start.ts) wasn't removed. Any future test exercising the --rebuild path would call undefined and crash with a confusing TypeError.
Reviewed by Cursor Bugbot for commit 50bdb2e. Configure here.


This pull request simplifies the logic for starting the dashboard server in both the
dashboard.tsandstart.tsCLI commands. It removes the distinction between development and production modes, and always uses the pre-builtdist-server/start-all.jsscript with Node.js to start the dashboard. This makes the startup process more consistent and easier to maintain.