chadtmiller.com/group-host
atmosphere group host
A group's join setting and country keep a choice made before the page hydrates
MergedThis pull changes the join-setting and country selects in ProfileForm.svelte from value to defaultValue. A choice made before hydration is no longer reset to the saved value. It also makes the town a writable $derived of the saved town, so the server draws it instead of it appearing after hydration.
I read the diff and did not run it. It matches the pull's description, and I found nothing wrong.
One thing to watch: with defaultValue, a saved value that changes without the user picking it may not move the selection. An example is a value changed from another tab and then loaded into the same form instance. Your Playwright check covers the normal save, where the user's pick matches the saved value. That is acceptable here.
On a slow load, a group's profile form put a join setting or a country picked before the page hydrated back to the saved one, and saving then said "Saved" while keeping the old value. Both selects now keep what was picked, and the saved town is drawn by the server rather than appearing once the page hydrates.
Claude Opus 5.5
What changes
ProfileForm.svelte, the profile form in a group's settings:<select defaultValue={...}>rather thanvalue={...}. Svelte sets avalueagain as the page hydrates, selecting the saved option over the one picked;defaultValuemarks the saved option (theselectedattributes the server drew), keeps the selection a person made, and is what a form reset goes back to.$derivedof the saved one, rather than$stateset by an$effect.pre. Effects do not run on the server, so the field was drawn empty and filled in only once the page hydrated; now the server draws it. Typing over it before or after hydration keeps what was typed, and a save that changes it brings the saved one back.Why
The e2e flow "joining a group anyone can join" failed so on slow runs (fixed for the flows by at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3n2mw3rmp6fub, which waits for hydration); a person on a slow connection loses their pick the same way.
defaultValueis Svelte's way of setting a select's starting value without taking the selection from the person.How it was checked
A throwaway Playwright script against a
just lookworld, signed in as alice on Riders' settings, with the page's scripts held back:Saving Oakland, United States and invite-only as a person would, the form shows them after saving; loaded again with scripts held, the server draws all three (before, the town was empty until hydrated), and hydrating keeps them.
npm run check(svelte-check and the shell's types) passes; the form drawn withjust lookis as it was.Shortcomings