The workspace embed branch had several duplicated conversion and routing paths that made the new surfaces harder to audit. This keeps the behavior and API contracts intact while giving the project scanners, response mappers, route page classification, and tooling-status rendering a single expression of the same logic.
The commit hook also exposed that project identity resolution could inherit Git hook environment and read the parent worktree remote instead of the target checkout. Sanitize child git processes with the existing gitenv helper so project registration stays scoped to the requested path under hook-driven tests too.
Validation:
- go test ./internal/db -shuffle=on
- go test ./internal/projects -shuffle=on
- GIT_DIR=/tmp/poison.git GIT_WORK_TREE=/tmp/poison go test ./internal/projects -shuffle=on
- go test ./internal/server -run '^(TestW1SliceAGate|TestRegisterProject_|TestGetProject_|TestRegisterWorktree_|TestListProjects_|TestListLaunchTargets_)' -shuffle=on\n- bun run --cwd frontend typecheck\n- bun run --cwd frontend lint\n- bun run --cwd frontend test src/lib/stores/router.test.ts src/lib/components/terminal/ToolingStatusBlock.test.ts src/lib/components/terminal/WorkspaceProjectCard.test.ts\n- bunx @sveltejs/mcp@0.1.22 svelte-autofixer frontend/src/App.svelte --svelte-version 5 (no issues; broad pre-existing effect suggestions only)\n- bunx @sveltejs/mcp@0.1.22 svelte-autofixer frontend/src/lib/components/terminal/ToolingStatusBlock.svelte --svelte-version 5\n- bunx @sveltejs/mcp@0.1.22 svelte-autofixer frontend/src/lib/components/terminal/WorkspaceProjectCard.svelte --svelte-version 5\n- pre-commit hook path including go test (short)\n\nGenerated with OpenAI Codex\nCo-authored-by: OpenAI Codex <noreply@openai.com>
Embed routes now render through a smaller shell that skips standalone settings startup, sync/event preload behavior, sidebar/container setup, and global shortcuts. The embed contract documents one isolated browsing context per Middleman embed instance.