Skip to content

fix: display all project directories in sidebar and toolbar#96

Merged
wesbillman merged 1 commit intomainfrom
fix-multiple-dirs
Apr 4, 2026
Merged

fix: display all project directories in sidebar and toolbar#96
wesbillman merged 1 commit intomainfrom
fix-multiple-dirs

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Overview

Category: fix
User Impact: Projects with multiple directories now correctly display all folders in the sidebar context panel and toolbar, instead of only showing the first one.

Problem: When users added multiple directories to a project via the create/edit dialog, only the first directory appeared in the context panel sidebar and the project selector dropdown — making it look like the other directories were lost.

Solution: Changed the ProjectOption type from a singular workingDir to a workingDirs array and updated all consuming components to render the full list.

File changes

src/features/chat/ui/ChatInput.tsx
Changed ProjectOption.workingDir?: string | null to workingDirs: string[] so the type accurately represents multiple directories.

src/features/chat/ui/ChatView.tsx
Pass the full workingDirs array instead of only workingDirs[0] when building availableProjects, and pass the array to ContextPanel.

src/features/chat/ui/ChatInputToolbar.tsx
Updated the project selector tooltip and dropdown descriptions to join all directories with commas instead of showing only the first.

src/features/chat/ui/ContextPanel.tsx
Changed prop from projectWorkingDir: string | null to projectWorkingDirs: string[]. Renders a "Folder:" line for each directory. Git status still uses the first directory since it's per-repo.

src/features/home/ui/HomeScreen.tsx
Updated the project-to-ProjectOption mapping to pass workingDirs array instead of workingDir.

src/features/chat/ui/tests/ChatInput.test.tsx
Updated test fixtures to use the new workingDirs array shape.

src/features/chat/ui/tests/ContextPanel.test.tsx
Updated test fixtures to use the new projectWorkingDirs prop.

Reproduction Steps

  1. Create or edit a project and add 2+ directories via the "Add directories" button
  2. Open a chat assigned to that project
  3. In the right sidebar context panel under "Workspace", verify all directories appear as separate "Folder:" lines
  4. In the chat toolbar, hover over the project selector — the tooltip should list all directories comma-separated
  5. Click the project selector dropdown — each project's description should list all its directories

🤖 Generated with Claude Code

The ProjectOption type used a singular workingDir that only captured the
first directory. Switch to workingDirs array so every directory added in
the project dialog is shown in the context panel, toolbar tooltip, and
project selector dropdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit 9b57311 into main Apr 4, 2026
8 checks passed
@wesbillman wesbillman deleted the fix-multiple-dirs branch April 4, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant