This PR introduces a new Project Dashboard view that fundamentally changes how users interact with projects in Crystal. Instead of showing a dialog to create sessions without worktrees, clicking on a project now displays a comprehensive dashboard with git status information.
- Before: Clicking a project showed a dialog asking if you want to create a session without a worktree
- After: Clicking a project displays a full dashboard with project status and existing sessions
- Visual cascade showing the flow:
upstream → origin/fork → local main → session branches - Automatically detects and displays multiple remotes
- Color-coded status indicators:
- 🟢 Green = Synced
- 🟡 Yellow = Behind
- 🔵 Blue = Ahead
- 🔴 Red = Diverged
- Shows commit counts for ahead/behind status
- "Fork" badge when origin is a fork with an upstream
- Comprehensive table showing all session branches
- Quick filtering options:
- All Sessions
- Stale Only
- With Changes
- With PR
- Click any session row to navigate directly to that session
- Full viewport scrolling for projects with many sessions
- Up to date: Shows how many sessions are current (e.g., "8/12")
- Stale: Count of sessions behind their base branch
- Changes: Sessions with uncommitted changes
- Project name now displays correctly in dashboard header
- Sessions table properly scrolls when there are many sessions
- Sidebar session clicking now correctly navigates to sessions
- Proper skeleton loading states when switching between projects
- New IPC endpoint:
dashboard:get-project-status - Caching layer for dashboard data to improve performance
- Fetches from all git remotes to show complete status
- New navigation store to manage dashboard vs session views
- Responsive design with proper viewport utilization
The dashboard provides immediate visibility into:
- Is my fork behind the upstream?
- Is my local main behind my fork's origin?
- Which sessions are stale and need updating?
All this information is now available at a glance without needing to create a new session.
- Click on any project in the sidebar to see the new dashboard
- Test with projects that have:
- Single remote (origin only)
- Multiple remotes (upstream + origin)
- Many sessions to verify scrolling
- Use the filter dropdown to filter sessions
- Click on sessions to verify navigation works
This change significantly improves the UX by providing immediate project insights and making session management more intuitive.