Skip to content

Commit 7001ed9

Browse files
committed
Merge branch 'feat/pc-style-polish' into develop
2 parents 7884b54 + 10e8cb6 commit 7001ed9

45 files changed

Lines changed: 4901 additions & 764 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# PC Style Polish Phase 2 Implementation Plan
2+
3+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4+
5+
**Goal:** Tighten the remaining desktop settings chrome gaps and expand desktop UI review coverage with deeper workspace states.
6+
7+
**Architecture:** Keep the phase-1 page structure intact, then layer a desktop-only settings header shell on top of the existing settings route while preserving the mobile header path. Extend `ui-preview` with isolated desktop review scenes for workspace editor and diff states so future visual review covers more than empty and launcher states.
8+
9+
**Tech Stack:** React, TypeScript, Jotai, Vitest, Playwright `e2e-ui`, CSS tokens in `packages/web/src/styles`
10+
11+
---
12+
13+
### Task 1: Add a dedicated desktop settings header shell
14+
15+
**Files:**
16+
- Modify: `packages/web/src/features/settings/components/settings-page.tsx`
17+
- Modify: `packages/web/src/features/settings/components/settings-page.test.tsx`
18+
- Modify: `packages/web/src/styles/components.css`
19+
- Modify: `packages/web/src/styles/components.theme.test.ts`
20+
21+
- [x] **Step 1: Write the failing tests**
22+
23+
Add a desktop-only assertion in `settings-page.test.tsx` that checks:
24+
- `.settings-header__desktop` renders on desktop
25+
- `.settings-header .mobile-page-header` is absent on desktop
26+
- the current section pill shows the active section label
27+
28+
Add CSS assertions in `components.theme.test.ts` that check:
29+
- `.settings-header__desktop` uses a centered max-width layout
30+
- `.settings-header__section-pill` uses elevated panel styling
31+
- mobile header assertions still target `.mobile-page-header`
32+
33+
- [x] **Step 2: Run the focused tests and verify they fail**
34+
35+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/settings/components/settings-page.test.tsx src/styles/components.theme.test.ts`
36+
37+
Expected:
38+
- settings page test fails because desktop header selectors do not exist
39+
- theme test fails because new desktop header selectors are missing
40+
41+
- [x] **Step 3: Implement the desktop settings header**
42+
43+
In `settings-page.tsx`:
44+
- render `MobilePageHeader` only for mobile
45+
- add a desktop header block with back action, product/title copy, active section summary, and a section pill using the active section icon
46+
47+
In `components.css`:
48+
- keep existing mobile overrides intact
49+
- add `.settings-header__desktop`, `.settings-header__copy`, `.settings-header__summary`, `.settings-header__section-pill`, and related desktop-only spacing/alignment rules
50+
51+
- [x] **Step 4: Re-run the focused tests and verify green**
52+
53+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/settings/components/settings-page.test.tsx src/styles/components.theme.test.ts`
54+
55+
Expected:
56+
- both test files pass with `0 failed`
57+
58+
### Task 2: Expand desktop UI review coverage to editor and diff states
59+
60+
**Files:**
61+
- Modify: `packages/web/src/ui-preview/scenes/desktop-review-scenes.tsx`
62+
- Modify: `packages/web/src/ui-preview/scene-metadata.ts`
63+
- Modify: `packages/web/src/ui-preview/scene-metadata.test.ts`
64+
- Modify: `packages/web/src/ui-preview/catalog.test.tsx`
65+
66+
- [x] **Step 1: Write the failing tests**
67+
68+
Add metadata assertions for two new scene ids:
69+
- `workspace-editor-review`
70+
- `workspace-diff-review`
71+
72+
Add catalog render tests that check:
73+
- editor review renders a desktop review card plus code editor chrome
74+
- diff review renders a desktop review card plus git diff content
75+
76+
- [x] **Step 2: Run the focused preview tests and verify they fail**
77+
78+
Run: `pnpm --filter @coder-studio/web exec vitest run src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx`
79+
80+
Expected:
81+
- metadata test fails because the new scene ids are not registered
82+
- catalog test fails because the new scenes do not exist yet
83+
84+
- [x] **Step 3: Implement the new desktop review scenes**
85+
86+
In `desktop-review-scenes.tsx`:
87+
- add helper state for a realistic code editor view
88+
- add `workspace-editor-review` with a preloaded text editor surface
89+
- add `workspace-diff-review` with a populated `GitDiffViewer`
90+
91+
In `scene-metadata.ts`:
92+
- register both scenes as desktop-only review entries with `.desktop-review-card` capture selectors
93+
94+
- [x] **Step 4: Re-run the focused preview tests and verify green**
95+
96+
Run: `pnpm --filter @coder-studio/web exec vitest run src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx`
97+
98+
Expected:
99+
- both preview test files pass with `0 failed`
100+
101+
### Task 3: Run regression verification for the phase-2 polish slice
102+
103+
**Files:**
104+
- No code changes required unless regressions surface
105+
106+
- [x] **Step 1: Re-run targeted component and preview tests**
107+
108+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/settings/components/settings-page.test.tsx src/styles/components.theme.test.ts src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx src/features/workspace/index.test.tsx src/features/command-palette/components/command-palette.test.tsx`
109+
110+
Expected:
111+
- all selected tests pass
112+
113+
- [x] **Step 2: Re-run targeted desktop captures**
114+
115+
Run: `pnpm --dir e2e-ui exec playwright test --config playwright.config.ts --project desktop --workers 4 --grep '(settings-light-theme-review|settings-density-review|workspace-editor-review|workspace-diff-review|workspace-topbar-review|workspace-terminal-empty-review|desktop-overlay-review|desktop-statusbar-review) \\[desktop/'`
116+
117+
Expected:
118+
- desktop review capture matrix passes for the touched scenes
119+
120+
- [x] **Step 3: Rebuild the report**
121+
122+
Run: `pnpm --dir e2e-ui exec tsx report/build-report.ts`
123+
124+
Expected:
125+
- report command exits `0`
126+
127+
## Verification Notes
128+
129+
- `pnpm --filter @coder-studio/web exec vitest run src/features/settings/components/settings-page.test.tsx src/styles/components.theme.test.ts`
130+
- Result: `Test Files 2 passed (2)`, `Tests 102 passed (102)`
131+
- `pnpm --filter @coder-studio/web exec vitest run src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx`
132+
- Result: `Test Files 2 passed (2)`, `Tests 25 passed (25)`
133+
- `pnpm --filter @coder-studio/web exec vitest run src/features/settings/components/settings-page.test.tsx src/styles/components.theme.test.ts src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx src/features/workspace/index.test.tsx src/features/command-palette/components/command-palette.test.tsx`
134+
- Result: `Test Files 6 passed (6)`, `Tests 149 passed (149)`
135+
- `pnpm --dir e2e-ui exec playwright test --config playwright.config.ts --project desktop --workers 4 --grep '(settings-light-theme-review|settings-density-review|workspace-editor-review|workspace-diff-review|workspace-topbar-review|workspace-terminal-empty-review|desktop-overlay-review|desktop-statusbar-review) \\[desktop/'`
136+
- Result: `120 passed (7.8m)`
137+
- `pnpm --dir e2e-ui exec tsx report/build-report.ts`
138+
- Result: exited `0`
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# PC Style Polish Phase 3 Implementation Plan
2+
3+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4+
5+
**Goal:** Tighten the remaining desktop panel chrome in file tree, git panel, and command palette, then expand desktop review coverage for the most visible workspace states.
6+
7+
**Architecture:** Keep the existing desktop workspace structure intact and polish the panel surfaces in place. Use CSS/token tweaks for the visual system, add focused tests for desktop-only selectors and theme rules, and reinforce the result with deterministic `ui-preview` scenes plus desktop capture coverage.
8+
9+
**Tech Stack:** React, TypeScript, Jotai, Vitest, Playwright `e2e-ui`, CSS tokens in `packages/web/src/styles`
10+
11+
---
12+
13+
### Task 1: Tighten the desktop file tree panel
14+
15+
**Files:**
16+
- Modify: `packages/web/src/features/workspace/views/shared/file-tree-panel.tsx`
17+
- Modify: `packages/web/src/features/workspace/views/shared/file-tree-panel.test.tsx`
18+
- Modify: `packages/web/src/styles/components.css`
19+
- Modify: `packages/web/src/styles/components.theme.test.ts`
20+
21+
- [ ] **Step 1: Write the failing test**
22+
23+
Add a focused desktop assertion in `file-tree-panel.test.tsx` that checks:
24+
- the desktop shell still renders `.file-tree-shell.file-tree-shell--desktop`
25+
- the search bar and selected row stay in the same chrome family as the desktop panel
26+
- the selected row keeps its selected class when the active path matches
27+
28+
Add CSS assertions in `components.theme.test.ts` that check:
29+
- `.file-tree-shell .file-tree-search` has the tighter desktop chrome used by the panel
30+
- `.file-tree-shell .tree-item` keeps the desktop row density and hover transition
31+
- `.file-tree-shell .tree-item.selected` uses the desktop active surface language
32+
33+
- [ ] **Step 2: Run the focused test and verify it fails**
34+
35+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/workspace/views/shared/file-tree-panel.test.tsx src/styles/components.theme.test.ts`
36+
37+
Expected:
38+
- the new desktop selector expectations fail until the panel chrome is tightened
39+
40+
- [ ] **Step 3: Implement the desktop file tree polish**
41+
42+
In `file-tree-panel.tsx`:
43+
- keep the data flow unchanged
44+
- keep using the existing `selected` class for the active row
45+
46+
In `components.css`:
47+
- tighten `.file-tree-shell .file-tree-search`
48+
- tighten `.file-tree-shell .tree-item`
49+
- tighten `.file-tree-shell .tree-item.selected`
50+
- keep mobile rules intact under `.file-tree-shell--mobile`
51+
52+
- [ ] **Step 4: Re-run the focused test and verify green**
53+
54+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/workspace/views/shared/file-tree-panel.test.tsx src/styles/components.theme.test.ts`
55+
56+
Expected:
57+
- both test files pass with `0 failed`
58+
59+
### Task 2: Tighten the desktop git panel and desktop command palette
60+
61+
**Files:**
62+
- Modify: `packages/web/src/features/workspace/views/shared/git-panel.tsx`
63+
- Modify: `packages/web/src/features/workspace/views/shared/git-panel.test.tsx`
64+
- Modify: `packages/web/src/features/command-palette/components/command-palette.tsx`
65+
- Modify: `packages/web/src/features/command-palette/components/command-palette.test.tsx`
66+
- Modify: `packages/web/src/styles/components.css`
67+
- Modify: `packages/web/src/styles/components.theme.test.ts`
68+
69+
- [ ] **Step 1: Write the failing tests**
70+
71+
Add desktop assertions in `git-panel.test.tsx` that check:
72+
- the desktop panel keeps `.git-panel.git-panel--desktop`
73+
- `.git-commit-block`, `.git-panel-section`, `.git-worktree-row`, and `.git-history-row` all stay present in the desktop chrome
74+
- at least one active change row still renders with the `.active` class
75+
76+
Add desktop assertions in `command-palette.test.tsx` that check:
77+
- the desktop overlay still renders `.command-palette-overlay` and `.command-palette`
78+
- the header, search, hint, and list remain present as desktop chrome
79+
- filtered items still render with `.command-palette-item-selected` when keyboard navigation moves selection
80+
81+
Add CSS assertions in `components.theme.test.ts` that check:
82+
- `.git-panel-scroll`, `.git-commit-block`, `.git-panel-section`, `.git-worktree-row`, and `.git-history-row` follow the tighter desktop density
83+
- `.command-palette`, `.command-palette-header`, `.command-palette-search`, and `.command-palette-item` use the desktop tool surface language
84+
85+
- [ ] **Step 2: Run the focused tests and verify they fail**
86+
87+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/workspace/views/shared/git-panel.test.tsx src/features/command-palette/components/command-palette.test.tsx src/styles/components.theme.test.ts`
88+
89+
Expected:
90+
- the new desktop selector expectations fail until the git panel and command palette chrome are tightened
91+
92+
- [ ] **Step 3: Implement the desktop git panel and command palette polish**
93+
94+
In `git-panel.tsx` and `command-palette.tsx`:
95+
- keep behavior unchanged
96+
- keep mobile / desktop branching unchanged
97+
- only adjust the desktop chrome classes and structure where needed for consistent spacing and hierarchy
98+
99+
In `components.css`:
100+
- tighten the desktop `.git-panel-*` rules for commit, section, worktree, change, and history rows
101+
- tighten the desktop `.command-palette-*` rules for overlay, palette, header, search, hint, list, item, and shortcut chip
102+
- keep mobile sheet rules unchanged
103+
104+
- [ ] **Step 4: Re-run the focused tests and verify green**
105+
106+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/workspace/views/shared/git-panel.test.tsx src/features/command-palette/components/command-palette.test.tsx src/styles/components.theme.test.ts`
107+
108+
Expected:
109+
- all selected tests pass with `0 failed`
110+
111+
### Task 3: Expand desktop review scenes for workspace panel density
112+
113+
**Files:**
114+
- Modify: `packages/web/src/ui-preview/scenes/desktop-review-scenes.tsx`
115+
- Modify: `packages/web/src/ui-preview/scene-metadata.ts`
116+
- Modify: `packages/web/src/ui-preview/scene-metadata.test.ts`
117+
- Modify: `packages/web/src/ui-preview/catalog.test.tsx`
118+
119+
- [ ] **Step 1: Write the failing preview tests**
120+
121+
Add metadata assertions that confirm the desktop review catalog still includes:
122+
- `workspace-sidebar-files-review`
123+
- `workspace-sidebar-git-review`
124+
- `command-palette`
125+
126+
Add catalog assertions that check:
127+
- the file-tree review scene renders seeded file hierarchy chrome
128+
- the git review scene renders seeded commit / worktree / history chrome
129+
- the command palette scene renders the desktop overlay chrome and selected item state
130+
131+
- [ ] **Step 2: Run the focused preview tests and verify they fail**
132+
133+
Run: `pnpm --filter @coder-studio/web exec vitest run src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx`
134+
135+
Expected:
136+
- the new desktop chrome expectations fail until the review scenes are updated to match the tightened panels
137+
138+
- [ ] **Step 3: Update the review scenes and metadata**
139+
140+
In `desktop-review-scenes.tsx`:
141+
- keep the seeded data deterministic
142+
- enrich the existing `workspace-sidebar-files-review` and `workspace-sidebar-git-review` scenes with denser desktop panel state so the new chrome rules are visible in screenshots
143+
- keep `command-palette` as the canonical desktop palette review scene
144+
145+
In `scene-metadata.ts`:
146+
- keep the existing scene ids registered
147+
- update descriptions only if the scene surface changed
148+
149+
- [ ] **Step 4: Re-run the focused preview tests and verify green**
150+
151+
Run: `pnpm --filter @coder-studio/web exec vitest run src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx`
152+
153+
Expected:
154+
- both preview test files pass with `0 failed`
155+
156+
### Task 4: Run regression verification for the phase-3 polish slice
157+
158+
**Files:**
159+
- No code changes required unless regressions surface
160+
161+
- [ ] **Step 1: Re-run targeted component, style, and preview tests**
162+
163+
Run: `pnpm --filter @coder-studio/web exec vitest run src/features/workspace/views/shared/file-tree-panel.test.tsx src/features/workspace/views/shared/git-panel.test.tsx src/features/command-palette/components/command-palette.test.tsx src/styles/base.theme.test.ts src/styles/components.theme.test.ts src/ui-preview/scene-metadata.test.ts src/ui-preview/catalog.test.tsx`
164+
165+
Expected:
166+
- all selected tests pass
167+
168+
- [ ] **Step 2: Re-run targeted desktop captures**
169+
170+
Run: `pnpm --dir e2e-ui exec playwright test --config playwright.config.ts --project desktop --workers 4 --grep '(workspace-sidebar-files-review|workspace-sidebar-git-review|command-palette|workspace-topbar-review|desktop-overlay-review|desktop-statusbar-review) \\[desktop/'`
171+
172+
Expected:
173+
- the desktop review capture matrix passes for the touched scenes
174+
175+
- [ ] **Step 3: Rebuild the report**
176+
177+
Run: `pnpm --dir e2e-ui exec tsx report/build-report.ts`
178+
179+
Expected:
180+
- report command exits `0`

0 commit comments

Comments
 (0)