Review: Bug: signature pad init after checkbox
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type — Bug
- [x] Lineage — plan-wkq Phase 14, discovered during e2e testing
- [x] Repo — forgejo_admin/westside-contracts
- [x] What Broke — clear description of 0-dimension canvas init
- [x] Repro Steps — 6 steps, reproducible
- [x] Expected Behavior — pad usable immediately after checkbox
- [x] Environment — cluster, version, file path identified
- [x] Acceptance Criteria — 3 criteria listed
- [x] Related — project and cross-ref present
All required bug template sections present. Template is complete.
Traceability
- [ ] story:X label — missing. Bug discovered during e2e testing, not tied to a user story. Acceptable for unplanned bug work.
- [ ] arch:westside-app label — INCORRECT. Bug is in
westside-contractsrepo, notwestside-app. Label should bearch:westside-contracts. - [x] Forgejo issue — westside-contracts#4, open
File Targets
- [x]
src/routes/contract/[token]/+page.svelte— verified:initSignaturePad()at line 30,agreedstate at line 12,onMountcallssetTimeout(initSignaturePad, 100)at line 109 - [x]
src/app.cssline 338 — verified:.signature-areastarts withmax-height: 0; overflow: hidden; opacity: 0;, toggled by.visibleclass bound toagreedstate
Bug diagnosis is accurate:
initSignaturePad() runs on mount when canvas has 0 dimensions (hidden by CSS). The getBoundingClientRect() returns 0x0, so canvas width/height are set to 0. Only a window resize re-triggers init. The fix must call initSignaturePad() when agreed transitions to true (after the CSS transition completes or using requestAnimationFrame).Repo Placement
OK. Issue filed on
forgejo_admin/westside-contracts, fix is in westside-contracts. Single-repo fix.Dependencies
No blockers. All related contract board items are in
done: #179 (contract flow), #300 (e-sign page), #301 (contract_token migration), #309 (travel contracts sent), #310 (local contracts sent), #311 (CI activation), #330 (e2e walkthrough), #331 (date SSR bug). No items in in_progress that touch this file.Acceptance Criteria
- [x] "Bug no longer reproduces" — verifiable by manual test or Playwright
- [ ] "Playwright test: check agree, draw, submit enabled (no resize dispatch)" — ISSUE: No Playwright is configured in westside-contracts. No
playwright.config, no e2e test directory. Only test file istests/validation.test.ts(unit). This criterion requires either (a) setting up Playwright infrastructure first, or (b) rewriting the criterion as a manual test or unit test. - [x] "Works on mobile touch and desktop mouse" — verifiable by manual test
Recommendation: Rewrite the Playwright criterion to "Manual verification: check agree, draw signature, confirm submit button enables — tested on both mobile (touch) and desktop (mouse)" OR create a separate ticket for Playwright e2e setup in westside-contracts first.
Blast Radius
Low.
initSignaturePad is used in exactly one file (+page.svelte). No other services consume this component. The signature_pad library is only imported in this one route. No sibling services affected.Decomposition
Not needed. 1 file target (possibly 2 if CSS changes needed), 1 repo, 3 acceptance criteria. Well within the 5-minute rule for a single agent pass.
Recommendation
Two issues to fix before READY:
- Fix arch label: Change board item #312 label from
arch:westside-apptoarch:westside-contracts. - Fix Playwright acceptance criterion: Either rewrite as manual verification, or split into two tickets (one for Playwright setup, one for the bug fix with manual AC).