fix(cli): reload dashboard config after adding project from already-running menu (#1706)
When `ao start` finds an existing daemon and the user picks "Add <dir>", the project is written to the global config but the dashboard's cached services (loaded once into globalThis) never see it, so visiting the new project page renders notFound(). Call notifyProjectChange() after the write — same pattern as attachAndSpawnOrchestrator — so the dashboard invalidates its cache before the browser opens.
This commit is contained in:
parent
5c1d56aea4
commit
0f539a3d4e
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@aoagents/ao-cli": patch
|
||||
---
|
||||
|
||||
Fix dashboard 404 after adding a project from the "AO is already running" menu. The CLI now notifies the running daemon to reload its cached config so the new project's page is reachable immediately.
|
||||
|
|
@ -1411,6 +1411,14 @@ export function registerStart(program: Command): void {
|
|||
`\n✓ Added "${addedId}" — open the dashboard to start an orchestrator.\n`,
|
||||
),
|
||||
);
|
||||
const notifyResult = await attachToDaemon(running).notifyProjectChange();
|
||||
if (!notifyResult.ok) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
` ⚠ ${notifyResult.reason}. Refresh the page if the project doesn't show up.`,
|
||||
),
|
||||
);
|
||||
}
|
||||
openUrl(`http://localhost:${running.port}`);
|
||||
unlockStartup();
|
||||
process.exit(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue