Commit 0c5e2bf
refactor: options-page: Refactor options UI/UX, add new configurable modules, added app settings object for using configurables variables (#34)
* feat: redesign options page with sidebar nav, history view, and S3 config
- Replace flat options layout with a sidebar + multi-view layout (Download Settings, Cloud Providers, History)
- Add History view with search/format/status/date filters, bulk delete, per-item actions (re-download, copy URL, manifest health check, delete)
- Add S3/compatible cloud provider form alongside existing Google Drive panel
- Add history button (clock icon) in popup top bar that opens options directly to History view
- Add CHECK_URL message type so options page can probe manifest URLs via service worker (bypasses CORS)
- Add bulkDeleteDownloads() IDB utility for efficient multi-item deletion
- Extend StorageConfig with historyEnabled and s3 fields
- Auto-delete terminal downloads from IDB when historyEnabled is false
- All views centered; CSS tooltips on history action icon buttons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: limit popup downloads tab to in-progress downloads only
Completed/failed/cancelled downloads now appear exclusively in the
History view on the options page, not in the popup Downloads tab.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: move Open File action from popup to history view
Completed downloads no longer appear in the popup Downloads tab, so the
Open File button is now in the History view (options page). Only shown
for COMPLETED items with a known localPath. Removes dead completed/failed
action button code from render-downloads.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(options): use extension icon in sidebar header, clean up download settings icon
Replaces SVG placeholder logo with the actual extension icon (icon-32.png).
Swaps the messy gear/path icon on Download Settings for a clean sliders icon.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(history): replace inline action buttons with a dropdown menu
Collapses Open file / Re-download / Copy URL / Check manifest / Delete
into a single ··· button per row. Menu closes on outside click or action
selection. Check manifest state feedback is shown inline on the menu item.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(history): show check manifest result as toast notification
Replaces the inline button state feedback with a bottom-center toast.
"Checking…" appears immediately, then resolves to success/warning/error
with the HTTP status or a CORS note. Toast auto-dismisses after 3 seconds.
Removes now-unused check-btn CSS from the menu item.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(history): show toast when copying URL to clipboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(history): toast on re-download and refresh history list
Shows "Download queued" toast on success or an error toast if the
service worker rejects. Refreshes the history list in place so the
user stays on the history view without a full page reload.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(history): use stored metadata for readable filename on re-download
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(options): restore active section on page refresh
switchView() now calls history.replaceState to keep the URL hash in sync
with the active section. On refresh, init() reads the hash and opens the
correct view instead of always falling back to download-settings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(history): infinite scroll with IntersectionObserver
Render first 50 items on load; append subsequent batches as the user
scrolls near the bottom via a sentinel div watched by IntersectionObserver.
Filters and search reset to the first page on every change.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(options): rename terminal → finished stages and add live history updates
- Rename TERMINAL_STAGES → FINISHED_STAGES and handleTerminalDownload →
handleFinishedDownload to align with DownloadStage terminology used
elsewhere in the codebase
- Update service-worker.ts JSDoc comment to match ("terminal" → "finished")
- Add real-time history updates via DOWNLOAD_PROGRESS message listener —
newly finished downloads appear/update without requiring a page reload
- Flash animation (history-item--new) highlights items as they arrive
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(options): remove redundant check mark from manifest live toast
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(options): add Recording, Notifications, and Advanced settings pages
- Add three new options sections: Recording (poll intervals), Notifications
(OS notify + auto-open), and Advanced (retries, backoff, caches, IDB sync)
- Wire all new settings through DownloadManager → BasePlaylistHandler →
fetch-utils so retryDelayMs and retryBackoffFactor now take effect at runtime
- Read detectionCacheSize/masterPlaylistCacheSize from chrome.storage in
content script init so detection cache limits are configurable
- Add cross-field validation: min poll interval must be < max poll interval
- Add notifications permission to manifest for OS completion alerts
- Add post-download actions handler (notify on completion, reveal in Finder)
- Fix re-recording: clean up finished IDB entry before starting fresh
- Fix CHECK_URL: use GET for HLS/DASH manifests to avoid CDN 403s on HEAD
- Fix history re-download: send START_RECORDING for live stream entries
- Add live badge to history items for recordings from live streams
- Add history-item flash animation on completion while history tab is open
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(config): introduce loadSettings() and consolidate maxConcurrent
- Add src/core/storage/settings.ts with AppSettings interface and
loadSettings() — single function that reads StorageConfig and applies
all defaults, eliminating scattered ?? DEFAULT_X fallbacks
- Migrate all read-only config calls in service-worker.ts and options.ts
load functions to use loadSettings(); save functions keep raw
ChromeStorage reads to preserve merge-and-write-back pattern
- Consolidate maxConcurrent into StorageConfig (was stored under a
separate "max_concurrent" key); remove MAX_CONCURRENT_KEY constant
- loadSettings() now does a single storage read instead of Promise.all
with two keys
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(options): consolidate constants and unify notifications via toast
- Add src/options/constants.ts for options-page-only validation bounds
and UI timing constants (TOAST_DURATION_MS, MS_PER_DAY, MIN/MAX clamps)
- Add DEFAULT_GOOGLE_DRIVE_FOLDER_NAME to shared/constants (used by both
options.ts and settings.ts)
- Replace showStatus(elementId, msg, type) with showStatus(msg, type)
that delegates to showToast — all save confirmations now use the same
bottom toast as history actions
- Remove all status-msg div elements and their CSS from options.html
- Replace every hardcoded clamp literal in saveRecordingSettings and
saveAdvancedSettings with named constants
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(options): unify all time fields to seconds in the UI
All time inputs now display in seconds; internal storage remains ms
throughout. Conversion happens only at the options page boundary
(divide on load, multiply on save).
- ffmpeg-timeout: minutes → seconds (15 min = 900 s, range 300–3 600)
- poll-min/max: ms → seconds (1 000 ms = 1 s, 10 000 ms = 10 s)
- retry-delay: ms → seconds (100 ms = 0.1 s)
- db-sync-interval: ms → seconds (500 ms = 0.5 s)
Remove DEFAULT_FFMPEG_TIMEOUT_MINUTES, MIN/MAX_FFMPEG_TIMEOUT_MINUTES,
and MS_PER_MINUTE from shared/constants (options-only). Replace with
_S equivalents in options/constants.ts alongside updated _S clamp bounds.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(options): remove dead code
Remove makeIconBtn and iconSpinner — defined but never called.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: update CLAUDE.md and README to reflect refactor/options-page changes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(styles): extract shared design tokens and badge styles into shared.css
Move duplicated @font-face declarations, CSS custom properties, reset,
scrollbar, and badge styles out of popup.html and options.html into a
new public/shared.css. Both pages now reference it via /shared.css.
Also unifies token drift between the two files: options gains --recording,
--space-*, and --radius-lg; badge colors are harmonised; options gets
light-mode badge overrides it was missing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(options): add inline field validation before saving
Replace silent Math.max/Math.min clamping in all save handlers with
explicit validation. Invalid fields get a red border and an inline error
message; the button stays enabled and no write is attempted until all
fields pass.
Helpers: validateField(), markInvalid(), clearInvalid() in options.ts.
The recording cross-field check (min < max) now marks the specific field
invalid instead of falling back to the toast. Toast is reserved for
storage/network errors. Documents the pattern in CLAUDE.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 94d5efb commit 0c5e2bf
File tree
27 files changed
+3246
-854
lines changed- public
- src
- core
- database
- detection
- dash
- hls
- downloader
- dash
- hls
- storage
- types
- utils
- options
- popup
27 files changed
+3246
-854
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
126 | 151 | | |
127 | 152 | | |
128 | 153 | | |
| |||
177 | 202 | | |
178 | 203 | | |
179 | 204 | | |
180 | | - | |
| 205 | + | |
| 206 | + | |
181 | 207 | | |
182 | 208 | | |
183 | 209 | | |
| |||
207 | 233 | | |
208 | 234 | | |
209 | 235 | | |
| 236 | + | |
210 | 237 | | |
211 | 238 | | |
212 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
106 | | - | |
107 | | - | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
126 | | - | |
127 | | - | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
171 | | - | |
| 174 | + | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
192 | | - | |
| 196 | + | |
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
| |||
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
254 | | - | |
| 258 | + | |
255 | 259 | | |
256 | 260 | | |
257 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
0 commit comments