#304 · Agreeing to the terms works again
- timeline-app
- pull request
Closes #303. - `platform/components/terms-prompt.jsx` read `new FormData(event.currentTarget)` after `await api('session')`. React clears `currentTarget` once a handler yields, so **Agree** failed with "Failed to construct 'FormData'" and nothing was recorded. It now reads the checkbox before awaiting. - The other forms that build `FormData` from the event read it before their first `await`, so they aren't affected. - New `test/terms-live-postgres.mjs`, in the PostgreSQL job: the production platform with a real browser. It signs in as an account that hasn't agreed, checks that the box is required, ticks it, presses Agree, and checks the panel is gone, no page errors occurred, and `terms_version` and `terms_accepted_at` are recorded. With the old component it times out waiting for the panel to go.
Sources
Open #304 · Agreeing to the terms works again in the timeline