fix: remove date field from contract signing section #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "13-remove-date-field"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Remove the date input from the contract signing form. The server records the signing timestamp independently, making the client-side date field useless UI clutter.
Changes
src/routes/contract/[token]/+page.svelte:dateStr$statevariable and itsonMountblock that formatted the current datedisplayDate$derivedvalue that depended ondateStrform-groupdiv (label + disabled date input)new Date().toLocaleDateString()Test Plan
npm run buildpasses (no new warnings)npm testpasses (12/12 tests)Review Checklist
npm run build)npm test— 12/12)Related
QA Review
Scope: 1 file changed, +1 / -18 lines. Surgical removal.
Checklist
dateStrstate variable removed -- no orphaned references in codebaseonMountblock that setdateStrremoved -- the otheronMount(signature pad init) remains intactdisplayDatederived value removed -- no orphaned referencesonMountimport retained correctly (still used by signature pad)new Date().toLocaleDateString('en-US', ...)-- correct locale options preserved.form-group/.form-inputclasses)npm run buildpassesnpm testpasses (12/12)Nits
None.
VERDICT: APPROVE
PR #14 Review
DOMAIN REVIEW
Stack: SvelteKit 5 (runes mode), TypeScript, adapter-node, direct Postgres.
Correctness of removal. The server endpoint (
src/routes/contract/[token]/sign/+server.ts, line 84) usescontract_signed_at = NOW()to record the signing timestamp server-side. The client-side date field (dateStr,displayDate, the disabled<input type="date">) was purely cosmetic -- it was never submitted in the POST body. Removing it is the correct fix. This also eliminates the timezone/SSR mismatch chain that spawned issues #9 and #11.Inline date in success overlay. The replacement
new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })is evaluated at render time whenshowSuccessbecomestrue. Since the overlay only appears immediately after the signing POST completes, this is functionally equivalent to the olddisplayDatederived value. No behavioral regression.onMountimport. Still used at line 107 for signature pad initialization. No dead import.No remnants. Grep confirms zero references to
dateStr,displayDate, orsignDateanywhere insrc/. Clean removal.Accessibility. The removed
<input type="date" id="signDate" disabled>had a proper<label for="signDate">association. Since both are removed together, no orphaned labels or broken ARIA references remain.BLOCKERS
None.
This is a pure removal of 18 lines of dead UI code with 1 line of inline replacement. No new functionality is introduced, so the "new functionality must have tests" blocker criterion does not apply. No user input paths are added. No secrets. No auth changes.
NITS
toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })formatting. If the locale or format options ever need to change, they would need to be updated in two places. Consider extracting a sharedformatDatehelper in$lib/. Non-blocking -- the duplication is trivial and read-only display logic.SOP COMPLIANCE
13-remove-date-fieldreferences issue #13)Closes #13).envfiles, or credentials committedfix: remove date field from contract signing section)PROCESS OBSERVATIONS
This PR closes the third issue in a chain (#9 SSR/timezone mismatch, #11 mobile date picker unresponsive, #13 remove the field entirely). The progression from "fix the date" to "make the date input work on mobile" to "remove the date entirely because the server records it" is a clean example of converging on the right solution. The removal eliminates an entire class of client-side date bugs.
Change failure risk: minimal. This is a subtraction, not an addition.
VERDICT: APPROVED