fix: prevent nested .fusion/.fusion dir from PluginStore path bug

PluginStore's constructor treats its rootDir arg as a project root and
internally appends `.fusion` before opening the SQLite DB. Several CLI
call sites were passing the already-resolved `.fusion` directory,
producing a doubled `.fusion/.fusion/fusion.db` that the dashboard
process kept recreating on every project load.

Pass the project root instead so the DB lands in the canonical
`.fusion/fusion.db` alongside the rest of the project's state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-23 15:55:04 -07:00
parent fbe5b82ce0
commit a1b2d48986
2 changed files with 2 additions and 2 deletions

View File

@@ -327,7 +327,7 @@ export async function runDaemon(opts: DaemonOptions = {}) {
}
// ── PluginStore: plugin installation management ─────────────────────
const pluginStore = new PluginStore(store.getFusionDir());
const pluginStore = new PluginStore(store.getRootDir());
await pluginStore.init();
// ── PluginLoader: plugin lifecycle management ───────────────────────

View File

@@ -38,7 +38,7 @@ async function getProjectPath(projectName?: string): Promise<string> {
*/
async function createPluginStore(projectName?: string): Promise<PluginStore> {
const projectPath = await getProjectPath(projectName);
const pluginStore = new PluginStore(projectPath + "/.fusion");
const pluginStore = new PluginStore(projectPath);
await pluginStore.init();
return pluginStore;
}