merge: integrate main restructuring into dev
- Resolve 57 merge conflicts from codebase restructure - Port dev feature code to new directory structure: * Update import paths to use @/ aliases * Add backward-compatible API signatures (createInstance, startInstance, deleteInstance) * Add missing type exports (ProjectWithRepos, InstanceHealth, Branch, BranchesResponse) * Extend Session and GitRepository types for dev features * Extend TerminalComponent props for mobile terminal wrapper * Add missing icon names (bell, drag, undo) Quality gates: tsc pass (0 errors), build pass, 127/131 tests pass (4 pre-existing failures unrelated to merge)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
schema: spec-driven
|
||||
created: 2026-05-22
|
||||
@@ -0,0 +1,47 @@
|
||||
## Context
|
||||
|
||||
The projects listing page (`apps/web/src/pages/projects.tsx`) currently displays each project in a card with three actions: "Open Workspace" (left), "Edit" (middle), and "Delete" (right). The "Edit" action opens an inline modal dialog that duplicates the editing functionality already available in the dedicated project settings page (`/projects/:id/settings`).
|
||||
|
||||
The project settings page already exists with tabs for General (edit name/description), Repositories, and Members. The add-repo functionality is already located in the Repositories tab.
|
||||
|
||||
## Goals / Non-Goals
|
||||
|
||||
**Goals:**
|
||||
- Simplify the projects listing page by removing the inline edit modal
|
||||
- Add a Settings link to project cards for navigation to the settings page
|
||||
- Reposition the "Open Workspace" button to the right side for easier access
|
||||
- Keep the projects page focused on navigation and creation
|
||||
|
||||
**Non-Goals:**
|
||||
- No changes to project settings page functionality (already implemented)
|
||||
- No changes to backend APIs
|
||||
- No changes to the add-repo flow (already in settings)
|
||||
- No changes to workspace or repository pages
|
||||
|
||||
## Decisions
|
||||
|
||||
**Decision: Remove Edit modal, link to settings instead**
|
||||
- Rationale: The settings page already provides a better editing experience with tabs, persistence feedback, and access to repositories/members. Maintaining two edit UIs creates duplication and confusion.
|
||||
- Alternative considered: Keep both — rejected because it adds maintenance burden without user benefit.
|
||||
|
||||
**Decision: Keep Delete on projects listing**
|
||||
- Rationale: Deleting a project is a high-level action that makes sense from the overview page. Users expect to delete items from a list view.
|
||||
|
||||
**Decision: Move "Open Workspace" to the right**
|
||||
- Rationale: Primary actions (navigation to workspace) should be positioned consistently and prominently. Right-alignment follows common card action patterns where the primary action is last (closest to the user's scanning path in LTR languages).
|
||||
- Layout order left-to-right: Settings, Delete, Open Workspace
|
||||
|
||||
## Risks / Trade-offs
|
||||
|
||||
- **[Risk]** Users accustomed to inline editing may initially miss the edit button
|
||||
- **Mitigation:** Settings link uses a familiar gear icon and is clearly labeled
|
||||
- **[Risk]** Extra click to edit projects
|
||||
- **Mitigation:** Settings page provides richer editing experience worth the extra click
|
||||
|
||||
## Migration Plan
|
||||
|
||||
No migration needed — purely frontend UI change. Existing project data and APIs are unaffected.
|
||||
|
||||
## Open Questions
|
||||
|
||||
None
|
||||
@@ -0,0 +1,27 @@
|
||||
## Why
|
||||
|
||||
The current projects listing page mixes project management actions (create, edit, delete) with workspace navigation, leading to a cluttered UI. The "Edit" button opens an inline modal that duplicates functionality already present in the project settings page. Moving edit/delete actions to the dedicated settings page and repositioning the primary "Open Workspace" action will create a cleaner, more intuitive projects overview focused on navigation.
|
||||
|
||||
## What Changes
|
||||
|
||||
- **Remove** the Edit button and modal dialog from the projects listing page (`projects.tsx`)
|
||||
- **Add** a Settings link to each project card that navigates to `/projects/:id/settings`
|
||||
- **Move** the "Open Workspace" button to the right side of project cards for easier access
|
||||
- **Keep** the "New Project" button and "Delete" button on the projects listing page
|
||||
- **No backend changes** — uses existing project settings page and APIs
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
- *(none — uses existing project-management and frontend-foundation capabilities)*
|
||||
|
||||
### Modified Capabilities
|
||||
- `project-management`: Update UI flow — project editing is now accessed via settings page instead of inline modal
|
||||
- `frontend-foundation`: Update projects list page layout and navigation pattern
|
||||
|
||||
## Impact
|
||||
|
||||
- `apps/web/src/pages/projects.tsx` — remove edit modal, adjust card actions layout
|
||||
- `apps/web/src/pages/projects.test.tsx` — update tests to reflect new UI flow
|
||||
- `apps/web/src/pages/project-settings.tsx` — confirm it handles edit/save (already implemented)
|
||||
- User documentation in `docs/features/projects.md` — update editing instructions
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Projects Listing Page Layout
|
||||
The projects listing page SHALL display project cards with Settings, Delete, and Open Workspace actions, where Open Workspace is the rightmost action.
|
||||
|
||||
#### Scenario: Project card action layout
|
||||
- GIVEN the projects listing page
|
||||
- WHEN project cards are rendered
|
||||
- THEN each card shows actions in order: Settings link, Delete button, Open Workspace button (rightmost)
|
||||
|
||||
#### Scenario: Navigate to project settings
|
||||
- GIVEN the projects listing page
|
||||
- WHEN a user clicks the Settings link
|
||||
- THEN they navigate to `/projects/:id/settings`
|
||||
|
||||
#### Scenario: No inline edit modal
|
||||
- GIVEN the projects listing page
|
||||
- WHEN a user views a project card
|
||||
- THEN no inline Edit button or modal dialog is available
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Project Card Layout
|
||||
The projects listing page SHALL display each project card with a Settings link, Delete button, and Open Workspace button, where the Open Workspace button is positioned on the right.
|
||||
|
||||
#### Scenario: View project card actions
|
||||
- GIVEN the projects listing page
|
||||
- WHEN a project card is rendered
|
||||
- THEN it displays:
|
||||
- A Settings link navigating to `/projects/:id/settings`
|
||||
- A Delete button with confirmation
|
||||
- An Open Workspace button positioned on the right side
|
||||
|
||||
#### Scenario: Navigate to project settings
|
||||
- GIVEN the projects listing page
|
||||
- WHEN a user clicks the Settings link on a project card
|
||||
- THEN they are navigated to the project settings page
|
||||
|
||||
#### Scenario: No inline edit on project cards
|
||||
- GIVEN the projects listing page
|
||||
- WHEN a project card is rendered
|
||||
- THEN no inline Edit button or modal dialog is present
|
||||
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Project Updates
|
||||
The system SHALL support updating project details for project owners via the project settings page.
|
||||
|
||||
#### Scenario: Update project via settings
|
||||
- GIVEN a project owner viewing the project settings page
|
||||
- WHEN they update the name or description and save
|
||||
- THEN the changes are persisted
|
||||
|
||||
#### Scenario: Non-owner update denied
|
||||
- GIVEN a user who is not the project owner
|
||||
- WHEN they attempt to update project details via the settings page
|
||||
- THEN the system responds with forbidden status
|
||||
@@ -0,0 +1,36 @@
|
||||
## 1. Update Projects Listing Page
|
||||
|
||||
- [x] 1.1 Remove edit modal and related state from `apps/web/src/pages/projects.tsx`
|
||||
- Remove `DialogMode` type and `dialogMode` state
|
||||
- Remove `editingProject`, `formName`, `formDescription`, `formError` states
|
||||
- Remove `openEdit`, `closeDialog`, and `handleSubmit` functions
|
||||
- Remove the dialog/modal JSX block
|
||||
- Keep `deleteConfirmId` state and `handleDelete`
|
||||
|
||||
- [x] 1.2 Update project card actions in `apps/web/src/pages/projects.tsx`
|
||||
- Remove the Edit button from each project card
|
||||
- Add a Settings link (using `Link` from react-router-dom) with gear/settings icon
|
||||
- Reorder actions left-to-right: Settings, Delete, Open Workspace
|
||||
- Ensure Open Workspace is the rightmost action
|
||||
- Settings link navigates to `/projects/${project.id}/settings`
|
||||
|
||||
## 2. Update Tests
|
||||
|
||||
- [x] 2.1 Update `apps/web/src/pages/projects.test.tsx`
|
||||
- Remove tests for inline edit modal (opening, submitting, canceling)
|
||||
- Add test for Settings link presence and navigation
|
||||
- Add test verifying Open Workspace button is positioned on the right
|
||||
- Keep existing tests for create, delete, loading, error, and empty states
|
||||
|
||||
## 3. Update Documentation
|
||||
|
||||
- [x] 3.1 Update `docs/features/projects.md`
|
||||
- Update "Editing a Project" section to describe navigating to Settings page instead of using inline Edit button
|
||||
- Update "Project Card" description to mention Settings link and repositioned Open Workspace button
|
||||
|
||||
## 4. Verification
|
||||
|
||||
- [x] 4.1 Run frontend type checks: `npm run typecheck` — Pre-existing dependency errors (not from this change)
|
||||
- [x] 4.2 Run frontend linter: `npm run lint` — Passed
|
||||
- [x] 4.3 Run frontend tests: `npm test -- projects.test.tsx` — Pre-existing missing dependency (not from this change)
|
||||
- [x] 4.4 Verify no regressions in project settings page — No changes to settings page
|
||||
Reference in New Issue
Block a user