From 548ba3a66940241a1b2e9551af26cee17aca90e2 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 7 Sep 2026 13:12:27 +0100 Subject: [PATCH 1/7] =?UTF-8?q?v0.6.0:=20per-artifact=20actions=20menu=20(?= =?UTF-8?q?=E2=8B=AF=20+=20right-click)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A ⋯ button on row hover and right-click on a feed row open the same floating menu: Keep / Open / Copy link / Delete. Dismisses on click-away/Escape, edge-flips to stay on-screen. Standalone one-click Delete icon stays; the Trash view keeps its dedicated Undelete. - Row markup: actions grouped in a .row-actions container (delete + ⋯ in the feed/keep views; undelete in trash). Reuses the existing keep endpoint. - Menu only in the normal/keep views, not trash. Keep-toggle syncs the row's kept badge + the preview Keep button, and (in the Keep folder) drops the row when unkept. - Frontend-only (no backend change); inline JS validated with node --check; 152 tests pass; feed renders in all views. Share + Add-label join the menu in later slices. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 13 ++- daybook_project/__init__.py | 2 +- static/agentfeed.css | 56 +++++++++++-- templates/artifacts/_artifact_rows.html | 13 +-- templates/artifacts/feed.html | 100 +++++++++++++++++++++++- 5 files changed, 166 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cac692a..46204aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ former name, "Daybook".) _Nothing yet._ +## [0.6.0] — 2026-09-07 + +### Added +- **Per-artifact actions menu.** A **⋯** button appears on row hover, and + **right-clicking** a feed row opens the same floating menu — **Keep / + Open / Copy link / Delete**. Dismisses on click-away or Escape, edge-flips + to stay on-screen. The standalone one-click Delete icon stays; the Trash + view keeps its dedicated Undelete. (Share and Add-label will join the menu + in later slices.) + ## [0.5.1] — 2026-09-07 ### Added @@ -195,7 +205,8 @@ First tagged release. - Dockerised (Gunicorn + whitenoise), SQLite, `git`-based deploy with a runbook (`deploy/cloud_agent_deploy.md`) and health check. -[Unreleased]: https://git.cygnus.systems/peter/daybook/compare/v0.5.1...HEAD +[Unreleased]: https://git.cygnus.systems/peter/daybook/compare/v0.6.0...HEAD +[0.6.0]: https://git.cygnus.systems/peter/daybook/compare/v0.5.1...v0.6.0 [0.5.1]: https://git.cygnus.systems/peter/daybook/compare/v0.5.0...v0.5.1 [0.5.0]: https://git.cygnus.systems/peter/daybook/compare/v0.4.1...v0.5.0 [0.4.1]: https://git.cygnus.systems/peter/daybook/compare/v0.4.0...v0.4.1 diff --git a/daybook_project/__init__.py b/daybook_project/__init__.py index ee033ee..2d6a887 100644 --- a/daybook_project/__init__.py +++ b/daybook_project/__init__.py @@ -1,4 +1,4 @@ # Single source of truth for the app version. Bump this, commit, then tag the # commit `vX.Y.Z` and deploy. Surfaced on Settings -> About and in # GET /api/capabilities ("version"). -__version__ = "0.5.1" +__version__ = "0.6.0" diff --git a/static/agentfeed.css b/static/agentfeed.css index 667a968..aa0626e 100644 --- a/static/agentfeed.css +++ b/static/agentfeed.css @@ -1060,12 +1060,22 @@ kbd { position: relative; } -.row-action { +.row-actions { position: absolute; - right: 0.5rem; + right: 0.4rem; top: 50%; transform: translateY(-50%); + display: flex; + gap: 0.15rem; opacity: 0; +} + +.artifact-row:hover .row-actions, +.artifact-row:focus-within .row-actions { + opacity: 1; +} + +.row-action { cursor: pointer; font-size: 0.95rem; line-height: 1; @@ -1075,11 +1085,6 @@ kbd { color: var(--muted); } -.artifact-row:hover .row-action, -.artifact-row:focus-within .row-action { - opacity: 1; -} - .row-action:hover { background: var(--surface-alt); color: var(--text); @@ -1089,6 +1094,43 @@ kbd { color: var(--danger-text-plain); } +/* Per-row actions menu (opened by the ⋯ trigger or right-click) */ +.row-menu { + position: fixed; + z-index: 100; + min-width: 9rem; + background: var(--surface); + border: 1px solid var(--control-border); + border-radius: 8px; + box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); + padding: 0.25rem; + display: flex; + flex-direction: column; +} + +.row-menu[hidden] { + display: none; +} + +.row-menu button { + background: transparent; + border: 0; + border-radius: 5px; + color: var(--text); + cursor: pointer; + font-size: 0.85rem; + padding: 0.4rem 0.6rem; + text-align: left; +} + +.row-menu button:hover { + background: var(--surface-alt); +} + +.row-menu button.danger { + color: var(--danger-text-plain); +} + /* System folders (Keep / Deleted) at the bottom of the sidebar */ .source-folders { border-top: 1px solid var(--grid-line); diff --git a/templates/artifacts/_artifact_rows.html b/templates/artifacts/_artifact_rows.html index 45c2f2f..37c9ed1 100644 --- a/templates/artifacts/_artifact_rows.html +++ b/templates/artifacts/_artifact_rows.html @@ -30,10 +30,13 @@ {% endif %} {{ artifact.source }} - {% if in_trash %} - ↩ - {% else %} - 🗑 - {% endif %} + + {% if in_trash %} + ↩ + {% else %} + 🗑 + ⋯ + {% endif %} + {% endfor %} diff --git a/templates/artifacts/feed.html b/templates/artifacts/feed.html index 90a26bb..95e8659 100644 --- a/templates/artifacts/feed.html +++ b/templates/artifacts/feed.html @@ -147,6 +147,13 @@ + +