oficina / docs Public

Delete page: its own desk literal; say what a collaborator sees (#105 P3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev cea3df3249d67ea94a88a3a5872582c9bba648c4 parent 6521c74
2 files changed, +10 −1
  • internal/docs/delete.go +6 −0
  • internal/docs/views/delete.html +4 −1

CI passed — run details

diff --git a/internal/docs/delete.go b/internal/docs/delete.go
index b9a1635..bac3992 100644
--- a/internal/docs/delete.go
+++ b/internal/docs/delete.go
@@ -65,6 +65,12 @@ func (h *handlers) deleteGet(w http.ResponseWriter, r *http.Request) {
// (Store.Delete) and go back to the list, where it is no longer listed.
// Owner- and member-only, 404 to anybody else; a document already
// deleted is a 404 too, since Get no longer finds it.
+//
+// Anybody else with the document open at that moment is not told: their
+// next save is refused with the 404 every write to a deleted document
+// gets (deleted_at IS NULL in each write's check), which save-queue.mjs
+// takes as permanent and reports as a failed save. A live "this document was deleted" notice
+// is not built; the suite feed already carries the gone row for one.
func (h *handlers) deletePost(w http.ResponseWriter, r *http.Request) {
if !h.requireMemberRequest(w, r, true) {
return
diff --git a/internal/docs/views/delete.html b/internal/docs/views/delete.html
index e2b91c4..b866f21 100644
--- a/internal/docs/views/delete.html
+++ b/internal/docs/views/delete.html
@@ -4,8 +4,11 @@
works with no script, and a 303 back to the list. Cancel goes back
to the document. */}}
{{define "content"}}<style>
+ /* The document's own desk (show.html), so the confirmation reads as
+ the same place the person came from. Kept in step with show.html's
+ :root values by hand: two literals, one page each. */
body:has([docs-delete]) {
- background: var(--docs-desk, var(--rst-bg));
+ background: light-dark(#e3e7ee, #0e1015);
}
[docs-delete] {
display: flex;