Repository navigation
Description
Feature Summary
Provide shared Netlify registration, URL-encoded submission transport and accessible state handling across five capture routes. XL reflects cross-cutting contracts, concurrency and verification.
Linked Stories/Tasks
Parent: #16. Project: This One Time on Acid — book. Individual forms, deployment, thank-you and QA are separate children.
Milestones & Timeline
No milestone, cycle, due date or release date requested.
Proposed Solution
Three identities: draft-unlock for /, /read-the-draft and /read-the-book; waitlist for /waitlist; contact for /contact. Draft/waitlist fields: email, source-route, bot-field, form-name. Contact additionally name, organisation, enquiry-type and message. Keep organisation optional, existing requirements and enquiry values media/speaking/events/publisher/general. Preserve pathname only, including actual alias; no queries/fragments/full URLs or unapproved tracking/consent fields.
Register three hidden static declarations in root index.html outside #root, exact names, POST, data-netlify, netlify-honeypot and all matching fields/options/textarea. No extra alias detectors or inactive src/app/index.html/src/app/public/. Inspect dist/index.html and test parity.
Proposed files:
- src/app/utils/netlifyForms.ts: separate encoding/transport; synchronously capture FormData before disabling/awaiting; preserve empty organisation, plus-addresses, ampersands, Unicode/multiline text; URLSearchParams POST to same-origin / with application/x-www-form-urlencoded; reject HTTP/network failure, no JSON assumption; injected fetch.
- src/app/hooks/useNetlifyForm.ts: idle/pending/success/error; immediate in-flight guard plus rendered state; native validation; aria-busy; success once only after accepted response; retain values/unlock on failure; clear stale errors on explicit retry; safe unmount/cancellation; no automatic retries.
- src/app/data/mock/ui/book-forms.ts: contracts/options/destinations/approved copy.
- src/app/components/common/NetlifyFormFields.tsx and FormSubmissionStatus.tsx: hidden metadata/honeypot and accessible feedback.
- src/styles/blocks/form-submission.css: BEM/token styles.
Honeypot hidden from humans/keyboard; do not erase bot-filled content. No personal-data logs/browser persistence, credentials, Functions, Supabase or custom backend. Proposed failure copy: “We couldn’t confirm your submission. Please try again.” Associate labels/IDs, autocomplete/email hints, live feedback/predictable focus; no colour-only errors; preserve mobile/themes/reduced motion and repository syntax.
Linked Stories/Tasks
No PR linked. Brevo newsletter is independent and does not use this transport or a fourth detector.
Milestones & Timeline
Release timing remains unset.
Acceptance Criteria
- Three complete generated declarations match runtime schemas.
- Five routes submit exact identity/fields/pathname; validation and optional organisation preserved.
- Pending prevents immediate duplicates; accepted response invokes success once.
- Failure/cancellation never navigates, resets or triggers confetti; values retained with explicit retry.
- Encoding, honeypot, keyboard/mobile/themes/reduced motion and accessible feedback verified.
- No secrets, browser persistence, fourth detector or backend bridge.
- All acceptance criteria met
- Documentation/changelog updated
- Tests added/updated
- PR uses correct branch prefix (feat/)
- Labels/types match org standards
- PR description updated with relevant details
- Changelog entry prepared for PR (if applicable)
- Labels/types match org standards
Designs / References
Repository, setup, spam filters. Follow project Figma Make and repository AGENTS.md/BEM/token guidance.
Dependencies
Verified deployment/configuration, enabled detection and approved contracts/copy remain dependencies. The identities, schemas and routes above are capture proposals, not approved manuscript-entry processing or verification architecture. Reconcile DEC-001–003 before implementation: the complete short website edition requires verified email, including direct chapters; receipt alone grants none. Exact routes, provider/method, returning access, retention/deletion and offline reconciliation remain unresolved. Resolve waitlist/newsletter purpose and route relationship without silent merging, redirection or enrolment.
Testing Approach
Encoding/network/state/component tests, static/runtime parity and deployed stored-record evidence. Check dashboard extra spam prevention; honeypot rejection separately from ordinary receipt; inspect Verified/Spam. Local preview/HTTP acknowledgement alone does not prove storage.
Additional Context
React/Vite, not WordPress. Paths above are proposals. This capture utility does not implement verified manuscript access or customer confirmation emails; those required outcomes retain separate dependencies. No cross-form marketing enrolment. Search/demo/legacy Typeform/reader preferences unchanged. LightSpeed Feature defaults retained; native Backlog with status:needs-triage is approved.
Definition of Ready (DoR)
- Problem statement and outcome defined
- Acceptance criteria written (Given/When/Then)
- Designs/specs/references attached (if relevant)
- Dependencies mapped
- Estimate added
- Stakeholders/approvers listed
- Milestone/iteration assigned (if applicable)
Definition of Done (DoD)
- All acceptance criteria met
- Feature implemented and tested
- Tests added/updated; CI green
- Accessibility: WCAG 2.2 AA compliance verified (semantic HTML, keyboard support, colour contrast)
- Security: input validated, output escaped, no OWASP Top 10 vulnerabilities
- Performance: no measurable regression introduced
- Documentation/changelog updated if needed
- Feature toggles/rollout considered
- QA verified/UAT approved (if applicable)
- Release notes prepared; monitoring/alerts set
- Branch prefix is correct (feat/)
- Branch deleted after merge
- Linked issue(s) updated with latest status and closed after merge,
- The related epic should not be closed, instead updated with a comment to reflect the closed issue
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
linear-code commentedon Oct 5, 2026
TOA-205