feat(web): the edit surface — /e/<uuid>, live slug change, soft-delete - #3
Merged
Conversation
The owner's edit screen: possession of the unguessable UUID edit link is the whole authorization — no account, no session (the token is re-hashed and verified inside the RPC). Loads via get_link_for_edit, saves via update_link, removes via delete_link — the live Step 02 seam, no new backend. - /e/:uuid loads the link behind the token; a dead or expired token → the not-found screen the edge serves. - The slug changes live and never breaks the edit link — the UUID is the stable token, the slug a mutable column. useSlugAvailability gains an optional `current` arg so the owned slug reads idle (you can't collide with yourself) and fires no lookup; a changed claim checks as before. - Transport is read-only (fixed once minted); the field set mirrors create per kind — Server URL for http, the clone/build/run trio for stdio. Fields the edit surface doesn't show (the other transport's inputs, the description) are preserved on save, never nulled. - Two-step soft-delete behind a bad-tinted confirm → delete_link → the link 404s from every read → the not-found screen. - SlugField gains a `hint` prop so the idle helper fits its surface (create invites a blank; edit reassures a change is safe). - track.editSave / track.editDelete wired. Co-located behavior tests + a hermetic edit-route e2e; the whole flow verified live against the local stack (load → save-with-preservation → soft-delete → not-found), both themes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 05 — the owner's edit surface. Possession of the unguessable UUID edit link is the whole authorization (no account, no session; the token is re-hashed and verified inside the RPC). Loads via
get_link_for_edit, saves viaupdate_link, removes viadelete_link— the live Step 02 seam, no new backend, no Turnstile.What ships
/e/:uuidloads the link behind the token; a dead/expired token → the not-found screen the edge serves.useSlugAvailabilitygains an optionalcurrentarg so the owned slug readsidle(you can't collide with yourself) and fires no lookup; a changed claim checks as before.Server URLfor http, the clone/build/run trio for stdio. Fields the surface doesn't show (the other transport's inputs, the description) are preserved on save, never nulled.bad-tinted confirm →delete_link→ the link 404s from every read → the not-found screen.SlugFieldgains ahintprop so the idle helper fits its surface (create invites a blank; edit reassures a change is safe).track.editSave/track.editDeletewired.Verification
edit.jsxmock (design gate lifted) — reuses create's field molecules + the shared components./e/<uuid>./verify-edit404s → not-found. Both http and stdio, both themes.Closes Step 05.