6.7 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-separate-review-sticky-headers | Separate Review sticky headers | done | 1 | plan.md | ../../specs/ui/submodule-review.md |
Task 01: Separate Review sticky headers
Intent
Keep repository-scope and current-file headers simultaneously visible and interactive in Review without changing repository grouping or responsive composition.
Acceptance
- With workspace-root and submodule changes, the sticky Other changes header ends at or above the current file header on desktop and phone.
- The current file disclosure control remains the topmost element at its center and can still be activated after the headers stick.
- A Review diff with no rendered repository header keeps the existing zero sticky inset and gains no empty header lane.
- Programmatic file navigation aligns grouped file sections below the repository header rather than hiding the selected header or first diff content.
Files likely touched
apps/web/components/review/review-diff-list-groups.tsxapps/web/components/review/review-diff-list.tsxapps/web/components/review/review-diff-header.tsxapps/web/e2e/tests/review/submodule-review-helpers.tsapps/web/e2e/tests/review/submodule-review.spec.tsapps/web/e2e/tests/review/mobile-submodule-review.spec.tsdocs/plans/review-sticky-header-clearance/plan.mddocs/plans/review-sticky-header-clearance/task-01-separate-review-sticky-headers.md
Dependencies
None.
Parallelism
sequential. Regression assertions and source changes share one sticky-layout contract and overlapping files.
Inputs
docs/specs/ui/submodule-review.md, especially the mixed root/submodule sticky-header requirement and scenario.docs/plans/review-sticky-header-clearance/plan.md, including Root cause, Sticky repository and file lanes, and Mobile design contract.apps/web/components/review/review-diff-list.tsx:showRepoHeaders,FileDiffSection, and programmaticscrollIntoViewbehavior./tdd,/e2e, and/mobile-parityguidance. Use strict Red-Green-Refactor; no production change before both browser regressions fail for the expected overlap.
TDD sequence
- RED: add a shared nested-submodule Review assertion that scrolls the root file header to the top, requires the Other changes header to end above the file header, and requires
document.elementFromPoint()at the disclosure center to resolve to the control. Invoke it from desktop and mobile specs. Run both with--retries=0; record failures showing intersecting boxes and the covering repository header owning the hit point. - GREEN: give the repository header a stable height, pass the grouped-header state to each file section, offset grouped file headers by that height, and give grouped sections matching scroll margin. Do not alter ungrouped headers.
- REFACTOR: keep one shared geometry assertion and one shared spacing value per rendered relationship. Remove duplication without introducing a general sticky-header abstraction.
- Rerun both E2E scenarios after the last source edit against the rebuilt production bundle.
Verification
Bootstrap once if this worktree lacks dependencies:
cd apps && pnpm install --frozen-lockfile
Run desktop and phone regressions in order. The first command rebuilds current production assets; the second reuses those unchanged assets:
cd apps/web && pnpm e2e:run tests/review/submodule-review.spec.ts -- --grep "shows nested scopes and commits child gitlinks through the UI" --workers=1 --retries=0
cd apps/web && pnpm e2e:run --no-build --project mobile-chrome tests/review/mobile-submodule-review.spec.ts -- --grep "keeps nested scope and diff context touch-reachable" --workers=1 --retries=0
Run focused frontend checks:
cd apps/web && pnpm run typecheck
cd apps && pnpm --filter @kandev/web exec eslint components/review/review-diff-list-groups.tsx components/review/review-diff-list.tsx components/review/review-diff-header.tsx e2e/tests/review/submodule-review-helpers.ts e2e/tests/review/submodule-review.spec.ts e2e/tests/review/mobile-submodule-review.spec.ts
cd apps && pnpm exec prettier --check web/components/review/review-diff-list-groups.tsx web/components/review/review-diff-list.tsx web/components/review/review-diff-header.tsx web/e2e/tests/review/submodule-review-helpers.ts web/e2e/tests/review/submodule-review.spec.ts web/e2e/tests/review/mobile-submodule-review.spec.ts ../docs/specs/ui/submodule-review.md ../docs/plans/review-sticky-header-clearance/plan.md ../docs/plans/review-sticky-header-clearance/task-01-separate-review-sticky-headers.md
git diff --check
Output contract
Report the RED failure messages for desktop and phone, final command outcomes and test counts, exact changed files, rendered geometry deltas, generated artifacts and cleanup evidence, residual risks, and synchronized task/plan status. State that no backend, API, persistence, localization, or external side effect changed.
Results
- TDD RED reproduced the overlap in both focused browser scenarios. Desktop and
mobile-chromeeach reportedheadersSeparated: falseanddisclosureHit: falsewith retries disabled. - GREEN gives
RepoGroupHeadera fixedh-8lane.ReviewDiffListopts grouped sections into matchingscroll-mt-8, andReviewDiffHeaderusestop-8only when that repository lane exists; direct and ungrouped callers default totop-0. - The shared E2E helper now scrolls the file section as production navigation
does, compares repository/file bounding boxes, verifies the disclosure owns
its center hit point, and activates it with mouse or touch. Final desktop and
phone runs each passed one focused scenario with
--retries=0. - Geometry delta: repository header 30px to 32px; grouped file sticky inset 0px to 32px; nominal overlap 30px to 0px. Browser separation and hit-target states changed false to true on desktop and phone.
- Changed code/tests:
review-diff-list-groups.tsx,review-diff-list.tsx,review-diff-header.tsx,submodule-review-helpers.ts,submodule-review.spec.ts, andmobile-submodule-review.spec.ts. Durable records changed in the owning spec, plan, and this task file. - Verification: header unit suite 8/8; web typecheck, scoped ESLint, scoped
Prettier, and
git diff --checkall passed. A single mobile setup attempt hit a transient disposable-repositoryindex.lock; a clean zero-retry run passed. - Managed E2E cleanup removed disposable repositories; no generated artifact is
tracked. Residual risk is limited to keeping the three matching Tailwind
8spacing classes synchronized if this geometry changes later. - No backend, API, persistence, localization, external-service, or other external side effect changed.