feat: choose collection scope through searchable selectors

This commit is contained in:
2026-10-11 21:48:07 +02:00
parent d70a077076
commit 36afc157d1
3 changed files with 164 additions and 33 deletions
+7 -5
View File
@@ -71,13 +71,13 @@ These are the default bindings. Overrides in `[keys]` replace an action's bindin
| `s` | Edit the selected channel's tags |
| `S` | Edit tags for all saved channels in the current category |
| `w` | Save the selected video to watch later (also works in previews) |
| `W` | Open all-categories watch later from any video view or preview |
| `W` | Choose combined or category watch later from any video view or preview |
| `Alt-w` | Open the current category's watch later |
| `f` | In watch later, cycle All → Unwatched → Watched |
| `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` | Open all-categories saved videos from any video view or preview |
| `V` | Choose combined or category saved videos from any video view or preview |
| `Alt-v` | Open the current category's saved videos |
| Tab / Shift-Tab | Switch between visible views |
| `r` | Reload configuration and refresh the current view |
@@ -177,7 +177,9 @@ Bulk editing refuses to clear all tags when a target has no `[channels]` registr
Watch later is **one collection**, deduplicated by YouTube video ID. Category lists are derived from the saved videos' channel identities and the **current** subscription categories: adding or removing a channel from a category changes its watch-later list after saving tags or reloading config with `r`. No category memberships are stored on individual videos.
`W` always opens the all-categories watch-later list, even from a category view or preview. To browse one category, choose it with `c` and press `Alt-w`. Moving between watch-later scopes carries the current All/Unwatched/Watched filter to the destination, including cached lists; back navigation restores the originating category list. Repeating the shortcut for the current list does not add history. The border title shows the active filter. Lists use saved title, creator, and publication metadata without fetching video lists, so they also work offline.
`W` opens a searchable collection selector from any video view or preview. The bold **All categories (combined)** entry comes first, followed by configured categories; it remains available even when there are no categories. Navigate with `j` / `k` or arrows in normal mode, or press `i` to filter by name and use arrows / `Ctrl-j` / `Ctrl-k` while typing. `Enter` browses the selected match; with no matches it does nothing. `Esc` returns to normal mode, then closes the selector without navigating. Reopening clears the search. `Alt-w` still opens the current category's watch later directly.
Moving between watch-later scopes carries the current All/Unwatched/Watched filter to the destination, including cached lists; back navigation restores the originating category list. Choosing the current list does not add history. The border title shows the active filter. Lists use saved title, creator, and publication metadata without fetching video lists, so they also work offline.
Watch-later-only titles are **magenta** in all video tables; categorized channel names remain cyan. A `✓` marks watched videos, including outside watch-later views. The selected row retains its usual highlight.
@@ -202,13 +204,13 @@ Progress sessions survive Tubular exit so later player reports can be recovered
Saved videos is a separate collection from watch later, deduplicated by YouTube video ID. It uses the same offline title, creator, and publication metadata and follows **current channel category memberships**, not categories stored on individual videos.
`V` always opens the all-categories saved-video list from any video view or preview. Choose a category with `c`, then press `Alt-v` for its saved-video list. `Alt-w` / `Alt-v` retain the explicit category when switching between category-scoped collection lists; without a current category, they leave the view unchanged. All four shortcuts work in normal mode and previews, not text-entry fields or modal selectors. Both collections share the existing temporary-tab and back/forward history behavior.
`V` opens the same searchable selector for saved videos, with **All categories (combined)** first and configured categories beneath it. `Alt-v` opens the current category's saved videos directly. `Alt-w` / `Alt-v` retain the explicit category when switching between category-scoped collection lists; without a current category, they leave the view unchanged. All four shortcuts work in normal mode and previews, not text-entry fields or modal selectors. Both collections share the existing temporary-tab and back/forward history behavior.
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 saving and combined browsing with `video.saved.save` and `view.saved.browse`; category browsing uses `view.saved.category`. The corresponding watch-later navigation actions are `view.watch_later.browse` and `view.watch_later.category`. The live hints and `?` reference reflect overrides. Alt shortcuts require the terminal to transmit Alt/Meta; if macOS Option inserts symbols, enable Option-as-Meta or remap the actions.
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 the collection selector with `video.saved.save` and `view.saved.browse`; direct category browsing uses `view.saved.category`. The corresponding watch-later navigation actions are `view.watch_later.browse` and `view.watch_later.category`. Selectors use the shared `selector.*` and `input.*` bindings. The live hints and `?` reference reflect overrides. Alt shortcuts require the terminal to transmit Alt/Meta; if macOS Option inserts symbols, enable Option-as-Meta or remap the actions.
## Collection removal