-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
When a new directory is created with files inside (unstaged), the directory appears in the Changes tab but the files inside it don't show up recursively. Once the directory is staged, all the files inside become visible.
Problem
Current behavior:
- Create a new directory with files:
mkdir new-dir && touch new-dir/file1.js new-dir/file2.js - View Changes tab → Unstaged Changes
- Only see
new-dir/(directory entry) without the files inside - Stage the directory:
git add new-dir - Now all files inside show up:
new-dir/file1.js,new-dir/file2.js
Expected behavior:
- Unstaged new directories should show all files inside recursively
- Same as
git statusbehavior
Suspected Cause
Possible issues:
- Git diff parsing - Not recursively expanding new directories in unstaged changes
- Stale closure - Component not re-rendering when new files detected
- Git command - May need different flags for untracked directories
Git Commands Used
Check what commands are being used in apps/server/src/tools/get-local-changes.ts or wherever local changes are fetched:
# This shows untracked files flat (might be what we're using)
git status --porcelain
# This shows untracked files recursively (what we might need)
git status --porcelain -uall
# Or use git ls-files for untracked
git ls-files --others --exclude-standardReproduction Steps
-
In a plan's linked repository:
mkdir new-feature echo "test" > new-feature/index.js echo "test" > new-feature/utils.js
-
Open Shipyard → Changes tab → Local Changes
-
Check "Unstaged Changes" section
-
Bug: Only see
new-feature/without files inside -
Stage the directory:
git add new-feature -
Works: Now see
new-feature/index.jsandnew-feature/utils.jsin "Staged Changes"
Related Issue
This is different from #184 (phantom staged files with +0 -0), though both are in the Changes tab.
#184: Staged files show with no diff content (+0 -0)
This issue: Unstaged directories don't show files inside
Expected Fix
When fetching unstaged changes, ensure:
- New directories are recursively expanded to show all files
- Each file has a diff preview (if applicable)
- Matches behavior of
git status -uallor equivalent
Files to Check
apps/server/src/tools/get-local-changes.ts- How local changes are fetchedapps/web/src/components/ChangesView.tsx- How changes are displayedapps/web/src/hooks/useLocalChanges.ts- Local changes hook (if exists)- Git command execution - Check flags/options used
Acceptance Criteria
- Unstaged new directories show all files inside recursively
- Behavior matches
git status -uall - No performance degradation with large directories
- Works for nested directories (dir/subdir/file.js)
- Doesn't break existing staged changes display
Priority
P2 - Confusing UX but has workaround (stage the directory first).
Created 2026-01-28