v0.6.0: per-artifact actions menu (⋯ + right-click)

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 <noreply@anthropic.com>
This commit is contained in:
peter 2026-09-07 13:12:27 +01:00
parent 57ad58ff2d
commit 548ba3a669
5 changed files with 166 additions and 18 deletions

View file

@ -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);