Files
headquarter/openspec/changes/repo-workspace/proposal.md
T
Fusion 6807f449b7 feat: add repository workspace as default project view
- Create git file utilities (list_tree, get_file_content, list_branches, commit_file)
- Add file browsing API endpoints (list, content, branches, update)
- Create RepoWorkspace page with sidebar + main content layout
- Add FileTree component with directory navigation
- Add FileViewer component for viewing file contents
- Update project list to link to workspace
- Add workspace CSS styles
- Update router with workspace route

Quality gates: ruff ✓, mypy ✓, typecheck ✓, build ✓
2026-05-19 13:43:49 +02:00

73 lines
2.2 KiB
Markdown

# Repository Workspace - Default Project View
## Problem
Currently, clicking on a project shows a generic placeholder. Users need to navigate to repositories separately. There's no easy way to browse repository files or see project content at a glance.
## Solution
Create a **Repository Workspace** as the default project view that provides:
1. **File browser** for repositories - browse files and directories
2. **Branch selector** - switch between branches
3. **Mini file viewer** - view file contents with syntax highlighting
4. **Quick edit capability** - small edits without leaving the browser
5. **Repository overview** - see all repos in the project
This becomes the default view when clicking on a project, making the project the central workspace.
## Key Features
### Default Project View
- Clicking any project opens the repository workspace
- Shows first repo by default (or repo selector if multiple)
- File browser on the left, content viewer on the right
### File Browser
- Tree view of repository files and directories
- Expandable/collapsible folders
- Click file to view contents
- Breadcrumb navigation
### Branch Management
- Branch selector dropdown
- Shows current branch
- Lists all branches (local + remote)
- Switch branches to view different states
### File Viewer
- Syntax highlighting for common file types
- Line numbers
- View mode (read-only by default)
- Edit mode toggle for small changes
### Repository Navigation
- List all repositories in the project
- Quick switch between repos
- Repository cards with metadata (last commit, branch count)
## Benefits
- **Central hub**: Project becomes the main workspace, not just a container
- **Quick access**: See code immediately without extra clicks
- **Contextual**: Browse files while viewing commit history
- **Familiar**: Similar to GitHub/GitLab file browser
## Scope
### What stays:
- Existing repository list page (moves to sub-page)
- Git history visualization
- Repository creation/deletion
### What's new:
- Repository workspace page (default project view)
- File browser component
- File viewer component
- Branch selector component
- API endpoints for file operations
### What's changed:
- Project list items become clickable links
- Default project route shows workspace instead of placeholder