oficina / docs Public

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>
Paul Campbell pushed by paul@keymail.dev 1b5113b78eef4f6046bd527df686498a50266309 parent e2c1039
11 files changed, +333 −33
  • fixtures/editor-entry.js +13 −0
  • internal/docs/app.go +2 −0
  • internal/docs/delete.go +121 −0
  • internal/docs/delete_test.go +63 −0
  • internal/docs/handlers.go +1 −1
  • internal/docs/menu.go +14 −4
  • internal/docs/menu_test.go +1 −1
  • internal/docs/render.go +10 −0
  • internal/docs/static/{editor.66d578092601063e.js => editor.084c563d1019f16d.js} +13 −13
  • internal/docs/suite_feed.go +20 −14
  • internal/docs/views/delete.html +75 −0

CI passed — run details

fixtures/editor-entry.js

Loading diff…

internal/docs/app.go

Loading diff…

internal/docs/delete.go

Loading diff…

internal/docs/delete_test.go

Loading diff…

internal/docs/handlers.go

Loading diff…

internal/docs/menu.go

Loading diff…

internal/docs/menu_test.go

Loading diff…

internal/docs/render.go

Loading diff…

internal/docs/static/{editor.66d578092601063e.js => editor.084c563d1019f16d.js}

Loading diff…

internal/docs/suite_feed.go

Loading diff…

internal/docs/views/delete.html

Loading diff…