Skip to content

fix(server): surface workspaceFile in project snapshot queries - #213

Merged
LoganRupe merged 1 commit into
multi-repo-workspacesfrom
bug/workspace-file/project-snapshot-query-drops-workspace-file
Sep 3, 2026
Merged

fix(server): surface workspaceFile in project snapshot queries#213
LoganRupe merged 1 commit into
multi-repo-workspacesfrom
bug/workspace-file/project-snapshot-query-drops-workspace-file

Conversation

@LoganRupe

Copy link
Copy Markdown
Owner

What Changed

ProjectionSnapshotQuery.ts now selects workspace_file in the three project SELECTs (listProjectRows, getActiveProjectRowByWorkspaceRoot, getActiveProjectRowById) and maps it in mapProjectShellRow. The three inline OrchestrationProject literals built from the same rows (getSnapshot, getCommandReadModel, getActiveProjectByWorkspaceRoot) get the same one-line spread, so the hydrated command read model matches event-evolved state instead of quietly dropping the field.

Tests: the hydration test inserts a workspace_file and asserts it in the read model and shell snapshot; the targeted-lookup test asserts it through getActiveProjectByWorkspaceRoot and getProjectShellById. Both fail without the source change (2/21 red before, 21/21 green after).

Why

Fixes #185. workspaceFile was persisted correctly but never reached the client because the snapshot queries neither selected the column nor mapped it, and Schema.optional let both omissions typecheck. That made every consumer dead: "Open in" opened the containing folder instead of the .code-workspace, the sidebar never showed the workspace icon, and "Manage folders" never appeared.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Written by Claude Fable 5 in T3 Code.

The projection snapshot queries never selected the workspace_file
column and never mapped it, so workspaceFile silently dropped out of
every client-facing project shell. Open-in fell back to the folder,
the sidebar never showed the workspace icon, and Manage folders never
appeared (#185).

Select the column in the three project SELECTs and map it in
mapProjectShellRow plus the three inline OrchestrationProject
literals that build read models from the same rows.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Sep 3, 2026
@LoganRupe
LoganRupe merged commit 27bdbba into multi-repo-workspaces Sep 3, 2026
6 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants