fix(projects): give every source root its own workspace row - #748
Merged
Conversation
Since #741 a project's source roots were flattened: every root's default folder rendered as bare sessions under the project header, and the roots themselves had no rows. That left a multi-root project with no place to act on a root — no way to start a session or a worktree in a source folder — and it made a single view mode look broken, since the sessions of two roots sat side by side while each root's workspace remembered its own panes/kanban/canvas choice. Rows are back, and now the primary root gets one too: a project that spans several roots draws a workspace row per root, so a session is always started from the repository it will live in, and each row keeps its own view mode instead of borrowing a sibling's. A single-root project is untouched — its sessions still render flat under the project header, with no extra level of nesting. Splitting a root back out into its own project stays limited to the extra source folders: the primary root is the project, and `split_project_source` already refuses it. A test pins that. Claude-Session: https://claude.ai/code/session_016KqTD6A7zkKAsoiXL1Qja2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #741 a project's source roots were flattened: every root's default folder rendered as bare sessions under the project header, and the roots themselves had no rows. That left a multi-root project with no place to act on a root — no way to start a session or a worktree in a source folder — and it made a single view mode look broken, since the sessions of two roots sat side by side while each root's workspace remembered its own panes/kanban/canvas choice.
Rows are back, and now the primary root gets one too: a project that spans several roots draws a workspace row per root, so a session is always started from the repository it will live in, and each row keeps its own view mode instead of borrowing a sibling's. A single-root project is untouched — its sessions still render flat under the project header, with no extra level of nesting.
Splitting a root back out into its own project stays limited to the extra source folders: the primary root is the project, and
split_project_sourcealready refuses it. A test pins that.Verification
bun run typecheck— cleanbun run test— 1287 passednpx playwright test tests/e2e/sidebar.spec.ts— 50 passed, including the rewritten multi-root row expectationsnpx playwright test tests/e2e/{canvas,kanban,panes,project-settings,right-panel}.spec.ts— 95 passedcargo test --lib splitting_refuses— 2 passed, covering the new primary-root guardhttps://claude.ai/code/session_016KqTD6A7zkKAsoiXL1Qja2