Commit graph

22 commits

Author SHA1 Message Date
Barely Removable
9a277b9031 Bump to v1.6.3 for deploy
All checks were successful
Deploy / deploy (push) Successful in 24s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:19:17 -07:00
Barely Removable
395638aaf2 Surface parity temp in the Storage header, enlarge the settings cog
Parity went back into the GraphQL query, but for its temperature only —
it still gets no table row, since it has no filesystem to measure. The
temp rides in the card header next to the array summary, which was the
one genuinely useful thing the old parity row carried: a parity drive
cooking away is worth seeing. Multiple parity drives each get a badge,
and .meta-parity keeps the label and badge from wrapping apart.

The settings cog was a speck. The button was always a full 44px --tap
target, but the glyph inside it was set at --fs-sm (13px), so the
affordance read as far smaller than the hit area actually was. Now
--fs-xl (24px) with line-height 1 — roughly 55% of the button, which is
the usual proportion for an icon button. .icon-btn has exactly one user
(the cog), so nothing else shifts.

Verified at 1400px and 375px: no page overflow, the cog still measures
44x44, and the parity badge stays visible and intact on both.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:19:17 -07:00
Barely Removable
1aa01ed4e8 Bump to v1.6.2 for deploy
All checks were successful
Deploy / deploy (push) Successful in 26s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:15:42 -07:00
Barely Removable
5ef2502d4e Report disk sizes in the right unit and drop parity from the card
Two fixes to the Storage card.

Unraid's GraphQL reports fsSize/fsFree in KB, not bytes — the schema is
explicit about it ("(KB) Total Size of the FS"). We were passing those
straight to fmt_bytes as if they were bytes, so every figure came out
1024x too small and picked the unit below the right one: a 13 TB disk
rendered as "13.0 GB" and a 64.8 TB array as "64.8 GB". _fs_bytes() now
does the conversion at the point of reading, so everything downstream
still deals in bytes. The shutil fallback already returns real bytes and
deliberately doesn't go through it.

Parity is gone from the table and is no longer requested at all. It
mirrors the array rather than holding a filesystem — the schema notes
fsSize is "Not present on Parity type drive" — so it could only ever
render as a name, three em-dashes and a temperature, which earned little
for a whole row. Worth knowing: its temperature is no longer surfaced
anywhere, so a hot parity drive won't show up here.

Verified against the raw KB shape the API actually returns: an array of
3.7/11.2/13.0 TB disks now totals 27.9 TB rather than 27.9 GB, the sub-TB
cache still correctly reads in GB, and the local fallback still reports
this machine's real 228.3 GB rather than a 1024x-inflated figure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:15:42 -07:00
Barely Removable
6f4958ba89 Bump to v1.6.1 for deploy
All checks were successful
Deploy / deploy (push) Successful in 22s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:06:31 -07:00
Barely Removable
2f73367c6b Add a guarded way to retire the plaintext shared password
settings.json can still hold the old plaintext login_password after
accounts exist, where it's ignored but sitting in cleartext. Removing it
by hand has a sharp edge: with no accounts AND no login_password, the
login route reads "nothing configured" as dev mode and lets anyone in
without a password, so a tidy-up can quietly open the dashboard.

`manage_users.py retire-shared-password` removes the key only when at
least one account exists, and says so plainly when it won't. It also
warns if LOGIN_PASSWORD is still set in the environment, since that's a
second copy people forget.

Needed delete_setting() in app.py — save_settings() only ever merges, so
it had no way to take a key away.

Verified: refuses with exit 1 when no accounts exist and leaves the file
untouched; removes the key while preserving timezone and users; is
idempotent; warns about the env var; and after removal only the account
password signs in, with the retired shared password and the env value
both rejected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:06:31 -07:00
Barely Removable
63ad19eb12 Bump to v1.6.0 for deploy
All checks were successful
Deploy / deploy (push) Successful in 29s
Minor rather than patch — per-user logins are a new capability, even
though existing installs keep the shared password until an account is
added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:03:28 -07:00
Barely Removable
8c6992035f Add per-user logins alongside the shared password
The dashboard had one shared password and no concept of a user. This
adds real accounts: a username field on the login page, per-user
credentials, and the signed-in user recorded on the session, which is
the groundwork for per-user permissions later.

Credentials are salted pbkdf2 hashes in settings.json's `users` map.
Three deliberate choices there:

- settings.json rather than an env var, because a pbkdf2 hash contains
  '$' and docker compose interpolates that when it reads .env. It's also
  already the bind-mounted file that survives `up -d --build`.
- pbkdf2 rather than Werkzeug's default scrypt, which needs a hashlib
  built against OpenSSL — the macOS system Python has no hashlib.scrypt
  and would raise at hash time.
- load_users() re-reads the file per check, so adding a user or changing
  a password is live in every gunicorn worker with no restart. The old
  _runtime_password was per-worker and only ever half-applied.

Multi-user activates only once an account exists. Until then the
original LOGIN_PASSWORD path is used unchanged and the username field is
hidden, so deploying this can't lock the existing install out.
manage_users.py prompts for passwords via getpass — never echoed, never
a CLI argument — and only ever writes hashes; it refuses to remove the
last account, which would silently drop the dashboard back to the shared
password.

Two fixes carried along: login no longer requires the LOGIN_PASSWORD env
var specifically, so a settings.json-only password works instead of
locking you out; and the legacy comparison now uses hmac.compare_digest,
which the old docstring claimed but '==' didn't provide.

Also gitignores settings.json and data/ — they hold API keys and now
password hashes, were excluded from the deploy rsync but not from git.

Verified: legacy fallback still signs in with no accounts configured; a
9-case credential matrix (right/wrong user x right/wrong password, plus
the retired shared password); per-user change-password scoped to the
signed-in account and live without restart; and the add/passwd/remove
guards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:03:21 -07:00
Barely Removable
01ca334f6b Bump to v1.5.1 for deploy
All checks were successful
Deploy / deploy (push) Successful in 24s
Covers the one-row status pills (3c93187) and the redundant inline
margin removal (2a4236e). Patch rather than minor — neither changes what
the dashboard shows, only how it lays out at narrow widths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 08:12:47 -07:00
Barely Removable
41205be83c Bump to v1.5.0 for deploy
All checks were successful
Deploy / deploy (push) Successful in 23s
Covers the Status section move; the date is unchanged since 1.4.0 hasn't
left today.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 08:00:03 -07:00
Barely Removable
f572d95bd0 Make the listen port configurable via PORT
All checks were successful
Deploy / deploy (push) Successful in 22s
app.py's dev server and gunicorn both hardcoded 5000, which is awkward
locally — macOS ControlCenter already holds that port, so the app can't
bind on the dev laptop without editing source.

Both now read PORT, defaulting to 5000 so EXPOSE, the compose
`${HOST_PORT}:5000` mapping and the deployed container are unchanged.
Read at run time rather than import time so a dev harness can assign a
free port.

Also tracks .claude/launch.json with autoPort set. It doesn't actually
launch on this machine — the preview sandbox can't read files under
~/Desktop — so CLAUDE.md notes that running from a shell with an
explicit PORT is the working local path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 07:51:07 -07:00
Barely Removable
95b7ce7c03 Bump to v1.4.0 and document the local all-offline baseline
All checks were successful
Deploy / deploy (push) Successful in 24s
The footer version is the honest check that a deploy landed, so cut
1.4.0 for the Storage table.

Also record something that has now cost two sessions: the dev machine
isn't on the media stack's network, so every service is offline and the
live-poll endpoints 500 on a timer. That's the normal local baseline,
not a regression. Notes the monkey-patch pattern for exercising a card's
real rendering, plus the two traps that go with it — Jinja's auto_reload
follows app.debug (off), so template edits need a restart rather than a
browser reload, and LOGIN_PASSWORD has to be set explicitly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 07:46:29 -07:00
Barely Removable
1cc5a247cf Fetch per-disk temp and spin state for the Storage card
All checks were successful
Deploy / deploy (push) Successful in 28s
The GraphQL query only asked for aggregate array fsSize/fsFree, so the
per-disk breakdown added in templates/dashboard.html (commit 5045316)
had no data to render. Now pulls name/device/temp/isSpinning for data
disks, cache disks, and parity disks, and shapes them into the
disks/caches/parities lists the template expects.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 06:21:41 -07:00
Barely Removable
4b56f1fba9 Bump to v1.3.0 for deploy
All checks were successful
Deploy / deploy (push) Successful in 29s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 23:03:35 -07:00
Barely Removable
909a0b568c Show per-indexer grab share and rebuild the Indexers card as a list
All checks were successful
Deploy / deploy (push) Successful in 26s
The Indexers card sat beside Requests as a stretched, vertically centred
grid of pills — mostly dead space once the Ombi list was expanded, and it
said nothing about which indexer was actually doing the work.

- Fetch Prowlarr's indexerstats over a rolling 30-day window and merge
  per-indexer queries/grabs into the summary. Cached 10 min on success and
  never on failure, so a stats outage can't blank the column after it
  recovers or take the up/down list down with it.
- Rank indexers busiest-first by grab share (query share as fallback);
  queries mostly count enabled indexers, grabs count who delivered.
- One indexer per line, matched to the Ombi request rows: same padding,
  gap, radius and two-line body, plus a share bar scaled to the busiest
  indexer and an Online/Offline badge the 30s poll keeps current.
- Let that row size cards to their own content instead of stretching.

Bump APP_VERSION to 1.2.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 22:28:39 -07:00
Barely Removable
18c7719cd7 Extract CSS/JS to static files, wrap header pills, add version footer
All checks were successful
Deploy / deploy (push) Successful in 23s
The palette lived in a :root block duplicated across all three
templates, so every reshade meant three edits — and drifted twice in
practice (the favicon hardcoded its own hex; stale danger-border rgba
literals survived two palette changes). Move tokens to a single
static/css/base.css, derive every dim/border tint from the four source
hues with color-mix, and point the favicon at one static/favicon.svg.

Also splits the 1558-line dashboard.html into template + static assets:
662 lines of CSS and 396 of JS were re-sent uninlined on every load
with no browser caching, which costs real time on the remote/cellular
access this app is built for. Templates drop to 501/42/107 lines.
Server-rendered config (timezone, script_root) now arrives via
<body data-*>; wiring URL_BASE to request.script_root also fixes /api/*
fetches for a future subpath mount, which the hardcoded "" would break.

Header service pills now wrap instead of scrolling — they were clipped
at narrow widths, and a hidden pill is a service whose status you
cannot see. Verified 0 clipped and no page overflow at 320/375/700/1280.

Footer gains a version and date so the running build is identifiable
without trusting the Unraid Docker tab's cached container IDs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 14:27:52 -07:00
Barely Removable
600a48da93 Persist settings.json across deploys via a data volume
All checks were successful
Deploy / deploy (push) Successful in 21s
The previous commit made Settings-saved API keys override .env, but the
key still never survived: settings.json was written to the container
filesystem, and every deploy runs `up -d --build`, which recreates the
container and discards it. Saving a rotated SABnzbd key and restarting
therefore still fell back to the stale .env value.

SETTINGS_FILE is now configurable and pointed at /data/settings.json on
a ./data bind mount, so runtime settings live on the host. The deploy
rsync also excludes data/ — it runs --delete and would otherwise wipe
the directory for not being in the repo, reintroducing the same bug.

This affected everything the Settings page writes, not just API keys:
timezone and a UI-changed login password were being reverted on every
deploy too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 09:34:46 -07:00
Barely Removable
20f348eb9e Fix Settings-saved API keys never actually being used
All checks were successful
Deploy / deploy (push) Successful in 22s
Every *_API_KEY was read from the env var once at startup and never
checked against settings.json again, so saving a new key on the
Settings page updated the file but had zero effect on real requests —
reported live as "SABnzbd rejected the API key" right after rotating
and saving a new one there. A saved key now overrides the .env value
at startup, matching what the Settings page's own toast already says
("restart the container to apply").

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 09:29:39 -07:00
Barely Removable
339b9f3310 Redesign dashboard: single neutral theme, urgency-ordered layout
Replaces the five novelty themes with one professional dark theme built
on a shared token set (surfaces, 6-step type scale, semantic colours,
44px tap target) used across dashboard, login and settings.

Layout now matches the cache tiers in app.py: a "Right now" strip with
live streams, the download queue and array usage sits above the fold,
with library, discovery, requests and watch insights below. Previously
the page opened on rarely-actionable disk stats and buried active
streams under twenty recommendation rows.

Also from the design review:
- Discover lists show 5 with a Show more toggle instead of 10 each
- RT descriptions render inline and clamped, not hover-only tooltips
  that touch devices could never reach
- Adding a title is now two-step (tap to arm, tap to confirm) since it
  queues a real download
- role=alert on errors, aria-live on polled regions, semantic dl/dt/dd
  stats, labelled search inputs
- every text/surface pair verified at >= 5:1 contrast

Drops the dead delete-modal JS, which threw a TypeError on every load,
and the stale root-level template copies that Flask never rendered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 08:12:41 -07:00
Barely Removable
951914dd69 Redact API keys from error technical-details disclosure
All checks were successful
Deploy / deploy (push) Successful in 27s
SABnzbd and Tautulli embed their API key in the request URL, so it
was showing up verbatim in the raw exception text under "Technical
details" on the dashboard — visible to anyone with the study-room
password. Added a redact_secrets filter that strips apikey/token/
password query params before the raw string is rendered.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 05:11:28 -07:00
Barely Removable
2e1f8efa33 Fix unreachable mobile Settings link and raw error tracebacks
All checks were successful
Deploy / deploy (push) Successful in 2m6s
Settings lived inside .header-right, which is hidden below 600px,
leaving no way to reach it on mobile. It's now a standalone 44x44px
button next to the title.

Dashboard error cards showed raw Python/urllib3 exception strings.
Added a friendly_error() filter that classifies the failure (timeout,
connection refused, DNS, auth, 4xx/5xx, TLS) into plain-English copy,
with the raw string still available behind a details disclosure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 23:59:07 -07:00
c1e30bc8f0 Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00