feat: scope individual and bulk removal to collection views

This commit is contained in:
2026-10-11 21:09:47 +02:00
parent 343010ce5c
commit a9fef33e51
4 changed files with 816 additions and 255 deletions
+22 -11
View File
@@ -73,11 +73,10 @@ These are the default bindings. Overrides in `[keys]` replace an action's bindin
| `w` | Save the selected video to watch later (also works in previews) |
| `W` | Browse watch later for the current category, or the combined collection elsewhere |
| `f` | In watch later, cycle All → Unwatched → Watched |
| `X` (Shift-X) | Remove only the selected watch-later video (also works in previews) |
| `D` | In watch later, confirm removal of all videos matching the current list/filter |
| `x` | In watch-later or saved-video lists, remove the selected video |
| `X` (Shift-X) | In either collection list, confirm bulk removal of the current category/filter subset |
| `v` | Save the selected video to saved videos (also works in previews) |
| `V` | Browse saved videos for the current category, or the combined collection elsewhere |
| `x` | Remove only the selected saved video (also works in previews) |
| Tab / Shift-Tab | Switch between visible views |
| `r` | Reload configuration and refresh the current view |
| `?` | Open / close the scrollable keybinding reference |
@@ -184,12 +183,6 @@ Watch-later-only titles are **magenta** in all video tables; categorized channel
Terebi reports acknowledged playback positions. A video becomes watched when an eligible position reaches **95% of a known positive duration**. Seeking near the end counts; live/non-seekable, unknown-duration, and audio-only inputs do not. Launcher exit or window closure alone never marks a video watched. Watched status is global across categories and remains after removing a video from watch later.
### Removal
`X` (Shift-X) immediately removes **only the selected video** from watch later, including from Search, category views, or previews. Other videos, saved-video membership, and watched status remain unchanged. Configure this action with `video.watch_later.remove`; it is separate from the bulk action `view.watch_later.remove`.
`D` snapshots all videos matching the current list and filter, then shows their count, category, and filter. **`y` confirms; `n` or Esc cancels.** Enter does not confirm. Removal deletes those videos from the shared collection, so they disappear from every matching category; watched status is untouched. An empty filtered list has nothing to remove.
### Storage
Files are siblings of `config.toml`:
@@ -209,11 +202,29 @@ Saved videos is a separate collection from watch later, deduplicated by YouTube
Browse a category with `c`, then use `V` for its saved-video list. From Search, Feed, or a channel view, `V` opens the combined collection. Switching between a category's saved videos and watch later with `V` / `W` retains that category. Both lists share the existing temporary-tab and back/forward history behavior.
`x` removes **only the selected video** from saved videos, whether in a list or a preview. Removing it never changes watch-later membership or global watched status. There is no watched filter or bulk removal for saved videos.
Saved lists have no watched filter. Individual and bulk removal use the shared collection-list controls below.
Saved titles are **green**, taking precedence over watch-later magenta when a video belongs to both collections. Removing it from saved videos restores magenta if it remains in watch later. Channel styling, selected-row highlighting, and watched markers are unchanged.
The collection is persisted independently in `saved-videos.toml` beside `config.toml`, using the same atomic, owner-only writes and validation as watch later. Saving repeatedly does not add duplicates. Configure the actions with `video.saved.save`, `view.saved.browse`, and `video.saved.remove`; the live hints and `?` reference reflect overrides.
The collection is persisted independently in `saved-videos.toml` beside `config.toml`, using the same atomic, owner-only writes and validation as watch later. Saving repeatedly does not add duplicates. Configure saving and browsing with `video.saved.save` and `view.saved.browse`; the live hints and `?` reference reflect overrides.
## Collection removal
Removal controls apply **only in watch-later and saved-video views**, including previews opened from those lists. Search, Feed, ordinary channel/category views, and their previews do not expose removal actions or hints. Text fields and selectors retain their normal controls.
`x` immediately removes only the selected video from the active collection. `X` snapshots the current list and opens bulk confirmation: watch later uses the current category and All/Unwatched/Watched filter; saved videos uses the current category's entire saved list. An empty list does not open confirmation.
The prompt names the collection, category, count, and applicable filter. **`y` confirms; `n` or Esc cancels.** Enter never confirms. Only the snapshotted IDs are removed, even if membership or watched status changes while confirmation is open.
Removal changes only the active collection. Matching category views update, while the other collection and global watched status remain untouched.
The old collection-specific removal settings are no longer accepted. Replace them with:
```toml
[keys]
view.collection.remove.selected = "x"
view.collection.remove.bulk = "X"
```
## Configurable keybindings