chadtmiller.com/group-host
atmosphere group host
0
0
A form that edits in place says it is changed, saving, saved, or why not
Merged Approved
This adds a Saving class and a SaveBar so the profile and visibility forms show "Unsaved changes", "Saving…", "Saved" or why not. It also holds the submit button while any in-place form is sent, adds a LeaveGuard dialog for unsaved changes, and adds a Saving rule to the ui skill. The change-tracking logic reads correctly. Putting an edit back clears the status. A refusal sticks until the form saves. The type === 'form' and leaving escapes in the guard are right. The e2e flows cover the new behaviour.
I couldn't run it or read the checks, so this is from reading the diff only. Two small things, neither blocking:
LeaveGuardcancels every non-formnavigation while any form is unsaved. That includes agotoafter a redirect result from a form action.Saving.submitdoesn't mark the form saved beforeupdatefollows a redirect, so a future redirecting action on a tracked form would trip the dialog. Neither current action redirects.- Two lines in the skill's Saving bullet (the "never disabled" line and the "Cancel there could mean…" line) run past the wrapped width of the rest. If
oxfmtcovers.claude, the format check may flag them.
Merged as 290de3e
What changes
Saving in place says what happened. The profile form and the who-sees-it form end in a new
SaveBar: the Save button, and beside it a status line read out to screen readers. It says "Unsaved changes" once something is edited, "Saving…" while the save is on its way, "Saved" when the host has it, or why the host refused. A refusal stays until the form saves. Save is quiet while there is nothing to save and turns primary once there is. It is never disabled, so it can always be reached.Saving(#lib/saving.svelte.ts) tracks this by comparing what the form would send with what it held when last drawn or saved, so putting an edit back clears it.Buttons hold while their form is sent. Every form sent in place (
inPlace,inDialog,Saving) disables the button that sent it and marks itaria-busyuntil the answer comes back. A double click no longer sends twice.Leaving with unsaved changes asks first.
LeaveGuard, in the root layout, opens "Leave without saving?" when the reader follows a link or goes back while a form holds unsaved changes. When the tab is closed or reloaded, the browser asks in its own words.The ui skill gains a Saving rule under "The same act, the same way". It also says that an act whose result shows on the page (a link added, a request approved) needs no more confirmation, and that the console uses no toasts.
Why
After the move to
use:enhance, saving the profile changed nothing visible: the page was redrawn with the same values, with no message. This follows Primer's and GitLab's saving patterns:The leave dialog's quiet button is "Keep editing", not "Cancel", because "Cancel" there could also mean "throw the changes away".
How it was checked
npm run check,harness/layers.mjsandharness/dialogs.mjspass.just look. A fresh agent critiqued the pictures against the house rules. Its fixes are in: shorter dialog wording, "Saved" no longer bold, and the skill now covers two changed forms on one page.Shortcomings
--danger.🤖 Generated with Claude Code