3.7 KiB
3.7 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 02-animate-command-selected-sidebar-row | Animate and mark the command-selected sidebar row | done | 1 | plan.md | ../../specs/ui/requirements/command-panel-sidebar-task-reveal.md |
Task 02: Animate and Mark the Command-selected Sidebar Row
Outcome
Command-panel task navigation smoothly reveals an off-screen desktop sidebar row and gives the selected row a short visual cue. Reduced-motion users get an immediate scroll and a non-animated cue.
In scope
- Add motion-preference-aware nearest scrolling to the existing reveal helper.
- Add a restartable, bounded row cue and CSS reduced-motion behavior.
- Extend unit and desktop Playwright coverage while retaining the phone navigation regression.
Exclusions
- Sidebar filtering, expansion, ordering, or persistence changes.
- Command-panel search and task-route loading changes.
- Mobile task-switcher redesign.
Requirements and design
REQ-UI-COMMAND-PANEL-SIDEBAR-TASK-REVEAL-001AC-UI-COMMAND-PANEL-SIDEBAR-TASK-REVEAL-001.1throughAC-UI-COMMAND-PANEL-SIDEBAR-TASK-REVEAL-001.10docs/specs/ui/system-design/command-panel-sidebar-task-reveal.md
Implementation acceptance
- Off-screen rows use smooth nearest scrolling in normal motion and immediate nearest scrolling under reduced motion. Already visible rows do not move.
- Every successful reveal restarts one transient cue on the current row. An older request or cleanup timer cannot mark or clear the newer target.
- Desktop E2E proves final nested-viewport containment, active state, cue presence, and unchanged document scroll. Phone navigation remains direct.
TDD and verification
- RED: extend the DOM unit tests with exact smooth-scroll, reduced-motion, and cue lifecycle assertions before changing production code.
- Unit GREEN:
cd apps/web && pnpm exec vitest run lib/sidebar/task-navigation.test.ts - Typecheck:
cd apps/web && pnpm run typecheck - Desktop E2E GREEN:
cd apps/web && pnpm e2e:run --host --no-build tests/task/sidebar-scroll-preservation.spec.ts --grep "reveals a command-selected task$" - Mobile E2E GREEN:
cd apps/web && pnpm e2e:run --host --no-build --project mobile-chrome tests/task/mobile-command-panel-task-navigation.spec.ts
Make sure that Playwright discovers each focused scenario. Then accept each browser result as evidence.
Files likely touched
apps/web/lib/sidebar/task-navigation.tsapps/web/lib/sidebar/task-navigation.test.tsapps/web/app/globals.cssapps/web/e2e/tests/task/sidebar-scroll-preservation.spec.tsapps/web/e2e/tests/task/mobile-command-panel-task-navigation.spec.ts
Dependencies and parallelism
No code dependency. Execute in the primary session. Do not delegate unless the user explicitly authorizes implementation agents.
Results
Completed on 2026-08-26.
RED evidence
- The extended DOM suite failed 4 expected assertions for smooth and reduced motion options, visible-row cueing, and cue restart behavior.
GREEN evidence
pnpm exec vitest run lib/sidebar/task-navigation.test.tspassed 1 file and 10 tests.pnpm run typecheckpassed.pnpm e2e:run --host --no-build tests/task/sidebar-scroll-preservation.spec.ts --grep "reveals a command-selected task$"passed 1 Chromium test.pnpm e2e:run --host --no-build --project mobile-chrome tests/task/mobile-command-panel-task-navigation.spec.tspassed 1 mobile test.- The web lint, Vite production build, and
git diff --checkpassed.
The helper keeps one latest-row cue, guards cleanup by generation, and leaves hidden or missing rows as no-ops. The existing mobile test remains unchanged and confirms that phone navigation does not target the desktop sidebar.