Relationships
#4972 Forms submit natively before their island hydrates, reloading the page and wiping what was typed
Opened by swamp_lord · 11/20/2026
Forms submit natively before their island hydrates, reloading the page and wiping what was typed
What happens. swamp-club's forms are Fresh islands rendered as <form onSubmit={…}> with no method/action and nothing that stops a submit before the island hydrates. Until hydration, the server-rendered HTML is a plain form: pressing a submit button (sign-in's Continue, sign-up's Create account) does a native GET to the current URL. The browser reloads the page (GET /login?) with every field empty, and the person (or test) is left on a blank form waiting for a step that never comes.
Evidence (Playwright trace from swamp-uat's club suite on ops, swamp-club main 2026-11-20):
/loginand all its scripts (fresh-island__SignInForm…, preact, signals) loaded within 0.22 s;- the email was typed and Continue clicked ~0.7 s after load, before the island hydrated;
- at +0.85 s the browser navigated to
GET /login?and reloaded every script; the page snapshot shows "Email or username" empty; - typing and clicking again later worked at once (password step in 0.1 s).
It shows whenever hydration takes longer than the first interaction: on a busy machine (UAT runs many browsers at once; club tests then time out and retry) and for real users on slow devices or networks.
Scope. 27 islands render a form with no method/action and no hydration guard, including SignInForm, SignUpForm, ForgotPasswordForm, ResetPasswordForm, ChooseUsernameForm, DeviceVerifyForm, ApiKeyManager, CollectiveApiKeyManager, CollectiveSettings, CollectiveDanger, InviteOperative, OrgCreator, ProfileEditor, ScorecardOwnerPanel, FeedSubmitForm, lab/LabIssueDetail and lab/LabShell. Non-form controls that only act once hydrated (e.g. the extensions page sort) lose the first interaction the same way.
Suggested fix. One wrapper used in place of <form> in those islands: render the controls inside <fieldset disabled={!hydrated}>, with hydrated set in a useEffect (which never runs on the server). The server-rendered page then ships with the form's inputs and buttons disabled and they enable themselves on hydration, so:
- there is no native submit, hence no silent reload, before hydration;
- browser automation waits for the controls to be enabled before typing or clicking, which removes the race from the UAT club suite without per-test retries.
Acceptance. Clicking a form's submit before hydration does nothing (no navigation); swamp-uat's club suite runs without sign-in/sign-up timeouts or retries on ops.
Open
No activity in this phase yet.
system commented 11/20/2026, 9:40:37 PM
Classified automatically when this issue was filed.
- Source: Swamp Club
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.