|
| 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