Files
vibe-kanban/frontend
Louis Knight-Webb e99f9807fb Collapse files in diff view (vibe-kanban) (#531)
* Perfect! The collapse functionality has been successfully implemented. Here's what was added:

## Summary of Changes

**DiffCard.tsx:**
- Added `isCollapsed` and `onToggle` props
- Made the header clickable with hover effects
- Added a rotating chevron icon to indicate collapse state
- Only renders `DiffView` when not collapsed (performance optimization)
- Added accessibility attributes and keyboard support
- Prevented event bubbling on the "Open in IDE" button

**DiffTab.tsx:**
- Added `Set<string>` state to track collapsed files using stable file path identifiers
- Added toggle logic with proper React state management
- Added a sticky "Collapse All" / "Expand All" button with tri-state logic
- Connected collapse state to each DiffCard

The implementation follows all the Oracle's recommendations:
- Uses `Set<string>` with stable identifiers (file paths)
- Keeps state centralized in DiffTab
- Only renders DiffView when expanded for better performance
- Provides accessible clickable headers with proper ARIA attributes
- Includes keyboard support for toggling

The type checking and build process completed successfully with no errors related to our changes.

* Cleanup script changes for task attempt 9592ba9e-ff81-483b-b0f4-14bdf6461e24

* Done! The Collapse All button is now using the "xs" size.

* Perfect! The high-level stats display has been successfully implemented. Here's what was added:

## Summary of Changes

**Enhanced the sticky header to show:**
- **Files changed**: Shows count with proper singular/plural handling ("1 file" vs "3 files")
- **Total additions**: Green `+45` style matching existing DiffCard styling  
- **Total deletions**: Red `-12` style matching existing DiffCard styling
- **Collapse All button**: Positioned on the right with proper spacing

**Key Features:**
- **Efficient calculation**: Extended existing `useMemo` to calculate both files and totals in a single pass
- **Proper edge case handling**: Handles undefined `additionLength`/`deletionLength` values
- **Consistent styling**: Uses same CSS variables as individual file stats (`--console-success`, `--console-error`)
- **Responsive layout**: Flexbox with proper gap and shrink controls
- **Accessibility**: Added `aria-live="polite"` for screen reader updates
- **Performance**: Only recalculates when diffs change, not on every render

The implementation follows all Oracle recommendations and maintains consistency with the existing codebase design patterns. The type checking passed successfully with no errors.

* Cleanup script changes for task attempt 9592ba9e-ff81-483b-b0f4-14bdf6461e24
2025-08-20 12:21:11 +01:00
..
2025-07-11 15:57:30 +01:00
2025-06-25 09:36:07 +01:00
2025-06-14 15:14:08 -04:00
2025-07-08 13:41:47 +02:00
2025-06-14 15:14:08 -04:00
2025-06-14 16:26:48 -04:00
2025-06-14 15:14:08 -04:00
2025-07-04 11:11:45 +02:00