fix: use browser history in web mode for proper URL routing

The router was using memory history with initial entry "/" which caused
all routes to render the index component regardless of the browser URL.

Changes:
- Use browser history when not in Electron (for e2e tests and dev)
- Use memory history only in Electron environment
- Update test utilities to use persist version 2 to match app store

This fixes e2e tests that navigate directly to /board, /context, /spec

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-17 22:37:58 +01:00
parent 8f2e06bc32
commit bfc8f9bc26
4 changed files with 35 additions and 28 deletions

View File

@@ -94,7 +94,7 @@ export async function setupProjectWithFixture(
chatHistoryOpen: false,
maxConcurrency: 3,
},
version: 0,
version: 2, // Must match app-store.ts persist version
};
localStorage.setItem("automaker-storage", JSON.stringify(mockState));
@@ -107,7 +107,7 @@ export async function setupProjectWithFixture(
currentStep: "complete",
skipClaudeSetup: false,
},
version: 0,
version: 2, // Must match app-store.ts persist version
};
localStorage.setItem("automaker-setup", JSON.stringify(setupState));
}, projectPath);