From 43ff2f20e1366ecbc8261595359d98a4288cf87c Mon Sep 17 00:00:00 2001 From: Brummel Date: Mon, 1 Jun 2026 14:20:14 +0200 Subject: [PATCH] spec: copy-close on case page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Design spec for the case-page half of #14: a single "Kopieren + Schließen" text button below the document that copies the document text to the clipboard and then closes the case, landing on /cases. The H1 trash-can close button is removed; the standalone icon copy button stays. A failed clipboard write aborts the close so a finished case never disappears with an empty clipboard. Frontend-only (one Askama template + its inline script); no Rust route change — the close handler already strips the case-page Referer to /cases. The case-list half of #14 is deferred. refs #14 --- docs/specs/0002-copy-close-on-case-page.md | 247 +++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 docs/specs/0002-copy-close-on-case-page.md diff --git a/docs/specs/0002-copy-close-on-case-page.md b/docs/specs/0002-copy-close-on-case-page.md new file mode 100644 index 0000000..d984ef0 --- /dev/null +++ b/docs/specs/0002-copy-close-on-case-page.md @@ -0,0 +1,247 @@ +# Copy + Close on the Case Page — Design Spec + +**Date:** 2026-06-01 +**Status:** Draft — awaiting user spec review +**Authors:** orchestrator + Claude + +## Goal + +Give a user finishing a case a single gesture on the case detail page +(`server/templates/case_page.html`): copy the document text to the +clipboard, close the case, and land back on the case list (`/cases`). + +Today these are two separate controls — the icon copy button +(`#copy-btn`, above the document) and the trash-can close form (in the +`

` title row). The close already redirects to `/cases` from a case +page (see Data flow), so "back to list" needs no new server work; what +is missing is fusing copy + close into one button. + +Scope is **the case page only**. Issue #14 also asks for a per-row +copy+close on the case list (`my_cases.html`); that part is explicitly +deferred — this cycle leaves the list untouched and the issue stays +open (`refs #14`, not `closes`). + +## Architecture + +Frontend-only. One template file (`server/templates/case_page.html`) +and its inline `