Docs: File → Delete…, and an empty document opens ready to type
Paul, on the preview.
Delete: the owner's File menu ends with Delete…, a link to a
confirmation page (GET /d/{sqid}/delete: the page's drawing, its
title, what deleting does, Cancel and Delete document), whose POST
soft-deletes it (spec §4.1's deleted_at) and 303s to the list. Store.
Delete goes through softDelete, which deleteDocument now shares, so
the suite feed announces it gone. ownerDeletion is ownerMutation for
this one write: teammode.Guard authorizes again after the write and
checkPermission finds only live documents, so the owner check here
reads the row deleted or not. A writer gets no item and 404s, as on
share. No purge yet; that is still the spec's separate verb.
Focus: after the first reveal, an empty, editable document takes the
caret, unless something else already has focus (editor bundle
rebuilt).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 files changed,
+333
−33
fixtures/editor-entry.js+13 −0internal/docs/app.go+2 −0internal/docs/delete.go+121 −0internal/docs/delete_test.go+63 −0internal/docs/handlers.go+1 −1internal/docs/menu.go+14 −4internal/docs/menu_test.go+1 −1internal/docs/render.go+10 −0internal/docs/static/{editor.66d578092601063e.js => editor.084c563d1019f16d.js}+13 −13internal/docs/suite_feed.go+20 −14internal/docs/views/delete.html+75 −0
CI passed — run details
fixtures/editor-entry.jsLoading diff…
internal/docs/app.goLoading diff…
internal/docs/delete.goLoading diff…
internal/docs/delete_test.goLoading diff…
internal/docs/handlers.goLoading diff…
internal/docs/menu.goLoading diff…
internal/docs/menu_test.goLoading diff…
internal/docs/render.goLoading diff…
internal/docs/static/{editor.66d578092601063e.js => editor.084c563d1019f16d.js}Loading diff…
internal/docs/suite_feed.goLoading diff…
internal/docs/views/delete.htmlLoading diff…