feat(api,web): remove a movie, files optional
ci / web (push) Successful in 28s
ci / rust (push) Successful in 1m24s
e2e / e2e (push) Successful in 1m19s

`DELETE /api/movies/{id}` took the row and left the files, and no
surface exposed it. It now accepts `delete_files`, which unlinks the
title's §7.4 folder — atomic, so sidecars go with the feature. Targets
come from `media_files`, never from re-deriving the folder name, and a
path outside its root is never touched. The torrent is untouched (§7.3):
it keeps seeding and the reaper owns it.

The release deck grows a quiet REMOVE control opening one inline
confirmation: file count, size and folder first, then a delete-files
toggle that starts off, then what the choice costs.

Closes #104
This commit is contained in:
Miguel Palhas
2026-08-23 09:08:52 +01:00
parent 83ca921501
commit 4c73b3e7c6
11 changed files with 783 additions and 5 deletions
+131
View File
@@ -825,6 +825,137 @@ body {
font-size: var(--text-xs);
}
/* ---- removal confirmation (§7.4, issue 104) --------------------------- */
/* remove is not the deck's errand: it reads as a quiet control until the
operator reaches for it, and never competes with the sweep */
.control-quiet {
color: var(--ink-muted);
border-color: var(--line);
}
.control-quiet:hover,
.control-quiet[aria-expanded="true"] {
color: var(--accent-bright);
border-color: var(--accent);
}
.remove-panel {
margin: 0 0 var(--space-6);
}
.remove-body {
display: grid;
gap: var(--space-2);
padding: var(--space-3);
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: inset 0 1px var(--highlight);
}
/* armed is a state, so it is amber and it is also a word: the toggle reads
"on" with all colour removed */
.remove-body[data-armed="true"] {
border-color: oklch(from var(--signal-warn) l c h / 55%);
}
/* a control, not a form field: it stops at its own label */
.remove-files {
display: flex;
align-items: center;
justify-self: start;
max-width: 100%;
gap: var(--space-3);
min-height: 2.75rem;
padding: 0 var(--space-3);
font: inherit;
font-size: var(--text-sm);
text-align: left;
color: var(--ink);
background: var(--panel-raised);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: inset 0 1px var(--highlight);
cursor: pointer;
transition:
border-color 150ms var(--ease-out),
color 150ms var(--ease-out);
}
.remove-files:hover:not(:disabled) {
border-color: var(--line-strong);
}
.remove-files:disabled {
color: var(--ink-faint);
cursor: default;
}
.remove-files-name {
flex: 1;
min-width: 0;
}
.remove-files-word {
flex: none;
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--ink-faint);
}
.remove-files[aria-pressed="true"] {
border-color: oklch(from var(--signal-warn) l c h / 55%);
}
.remove-files[aria-pressed="true"] .remove-files-word {
color: var(--signal-warn);
}
.remove-evidence,
.remove-path,
.remove-note {
margin: 0;
font-size: var(--text-xs);
}
/* the folder is evidence: it wraps rather than truncating, because a path
the operator cannot read whole is not a confirmation */
.remove-path {
color: var(--ink-muted);
overflow-wrap: anywhere;
white-space: pre-line;
}
.remove-note {
color: var(--ink-muted);
}
.remove-note[data-tone="warn"] {
color: var(--signal-warn);
}
.remove-note[data-tone="fault"] {
color: var(--signal-fault);
}
.remove-actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
margin: var(--space-1) 0 0;
}
.remove-body[data-armed="true"] .remove-actions .control:first-child {
color: var(--signal-warn);
border-color: oklch(from var(--signal-warn) l c h / 55%);
}
.remove-body[data-armed="true"] .remove-actions .control:first-child:hover:not(:disabled) {
border-color: var(--signal-warn);
}
.bucket-head {
align-items: center;
}