1271 Commits

Author SHA1 Message Date
librelad
b94cda0ffe Merge claude/1 2026-07-16 17:28:07 +01:00
librelad
7ab60a801d feat(updater): scrollable, worst-first CVE lists so long lists stay compact
An app with many CVEs (e.g. Trivy's 28) rendered every row full-height, pushing
the page down. Extract one renderCveList() shared by the standalone Security tab
and the per-app expander: sort worst-severity-first, and once past ~6 rows cap
the height (260px) with an internal scroll + themed scrollbar and a bottom fade
hint. Add a count pill to the expander's "Security" heading. Per-app sections
stay stacked and independently collapsible as before.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 17:28:07 +01:00
librelad
37e531ebbc Merge claude/1 2026-07-16 16:59:59 +01:00
librelad
a079050108 fix(trivy): scan local images via the mounted socket, not a registry pull
The client scan resolved images by pulling from Docker Hub, which fails on an
offline/privacy box ("index.docker.io ... network is unreachable") — yet every
installed app's image is already present locally. Point Trivy at the docker
socket that's already bind-mounted into the container (--image-src docker, plus
DOCKER_HOST=unix:///run/user/<uid>/docker.sock for rootless, derived from the
install user — rooted's default path is found automatically). Scans local
images with zero network. Verified: aquasec/trivy:latest -> 28 CVEs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 16:59:59 +01:00
librelad
6bb857f5a1 Merge claude/1 2026-07-16 16:51:49 +01:00
librelad
8aa4c175ae fix(trivy): scan in client mode against the running server
Standalone `docker exec trivy-service trivy image ...` opens the vuln-DB cache
the long-lived server already holds, failing with "cache may be in use by
another process: timeout" — so every scan silently returned [] (apps: 0 even on
vulnerable images). Point the exec'd client at the server (--server
http://localhost:4954, the container's fixed --listen port); the server owns the
DB, the client just submits the image. Verified against alpine:3.10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 16:51:49 +01:00
librelad
da049ca03e Merge claude/1 2026-07-16 16:47:08 +01:00
librelad
abd8e0b68b feat(updater): surface Trivy CVE scanner state (installed / DB updating / ready)
Trivy runs as a server whose vulnerability DB downloads on first boot; until it
lands no scan can produce results. Previously the updater generator wrote an
empty-but-valid cves.json the moment the file was missing, so installing Trivy
painted a green "no known vulnerabilities" all-clear that was actually a lie —
the DB hadn't even downloaded, and the Updates/Security view gave no signal.

Add an honest scanner state the WebUI branches on:
- containers/trivy/scripts/trivy_scan.sh — trivyScannerState (absent |
  db_updating | ready) via `trivy version -f json`, trivyDbUpdatedAt, and
  trivyScanImageCves (per-image scan normalized to {id,severity,package,
  installed,fixed_in,url}, deduped). All degrade safely on error.
- webui_updater_scan.sh — stamp cves.json with scanner.state; only run real
  per-image scans once the DB is ready. Always rewritten so state tracks live.
- updater-page.js — Security tab shows a loading box while the DB updates, an
  install nudge when absent, and the genuine 🎉 only when ready+empty; Overview
  CVE card sub + hint reflect the state.
- overview-manager.js — fleet Security row surfaces the "building CVE database"
  pending state instead of silently omitting.
- function_manifest.sh — regenerated for the new trivy_scan.sh functions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 16:47:07 +01:00
librelad
ee64880293 Merge claude/1 2026-07-14 21:46:37 +01:00
librelad
4b85c24e94 feat(trivy): add Trivy as a recommended security app
New containers/trivy app (aquasec/trivy in server mode, private API port,
docker socket + cache volume) in the security,recommended categories, plus
placement in the setup wizard recommended step, the server-side install
tier after crowdsec, and the CLI first-install prompt. The updater's CVE
scan (design doc P4) will gate on this app being installed; §5 of the
design doc updated to record the app-based decision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-14 21:46:37 +01:00
librelad
5781b14934 Merge claude/1 2026-07-14 21:30:22 +01:00
librelad
6bf76d1774 docs(roadmap): design for per-app version updater + CVE scanning
Fills the gap updates-and-distribution.md always deferred: how versions
are actually detected, pinned, and reverted, and how cves.json gets real
data. Core decisions: floating tag stays the channel while the live
compose pins the digest (making detection possible and rollback honest),
and CVE scanning runs as a LibrePortal-orchestrated ephemeral Trivy
container (no host binary, no always-on scanner app).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-14 21:30:22 +01:00
librelad
26bae17b34 Merge claude/2 2026-07-14 21:09:22 +01:00
librelad
19189246b5 fix(install/ufw): trim trailing hint from install success message 2026-07-14 21:09:21 +01:00
librelad
0a3b681211 Merge claude/1 2026-07-13 15:49:56 +01:00
librelad
e85fba3b09 auto: session-start commit — 4 file(s) at 2026-07-13 15:49:56 2026-07-13 15:49:56 +01:00
librelad
cc60794367 Merge claude/2 2026-07-12 22:28:18 +01:00
librelad
0651dee155 fix(webui/overview): drop zero-count stats from health hero when nothing is tracked
With no apps tracked the sub line read '0 apps tracked · 0/0 backed up ·
last scan …' — pure noise. Show only the scan time in that case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-12 22:28:18 +01:00
librelad
574aaad565 Merge claude/2 2026-07-12 21:57:50 +01:00
librelad
30f1d5116b fix(webui/updater): shorten backup refresh notice
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-12 21:57:49 +01:00
librelad
83298f0df1 Merge claude/2 2026-07-12 21:53:16 +01:00
librelad
d429b5f94c fix(webui/updater): announce backup snapshot refresh so slow-network runs don't look frozen
After 'Generated apps-tools.json...' the next step reaches remote backup
locations (restic over SSH) with its output captured in $(...), so on a
slow connection the updater looked stalled with no message. Print an
in-progress notice before it, mirroring the per-app refresh hook loop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-12 21:53:16 +01:00
librelad
9d84e1e918 Merge claude/2 2026-07-07 22:25:03 +01:00
librelad
41786edd36 fix(backup/webui): show the retention "Backup style" divider only for Custom
.backup-retention-preset-block carried a permanent border-bottom (+ padding),
but the Keep-* fields it separates the dropdown from are hidden for every
preset except Custom — so on Self-hosting/etc. it was an orphaned line with
empty space beneath it. Moved the divider + spacing onto an .is-custom state
that applyVisibility() toggles alongside the fields.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 22:25:03 +01:00
librelad
34102eb6db Merge claude/1 2026-07-07 22:05:57 +01:00
librelad
d41073fad7 fix(webui/tasks): quiet the noisy task toasts for background (self-surfacing) tasks
A background task like the updater check surfaces its result in the page it was
launched from (the Updates/Overview tab repaints itself), yet it still fired the
full "View Task" pair — "Check task started!" then "Check task completed!" —
on top of the launcher's own small "Checking apps for updates…" line. Three
notifications for something you have no reason to open the Tasks page for.

Add a small, generic classifier (LP_BACKGROUND_TASKS) keyed by task action/type
(with a command regex that also catches the backend `updater check auto` run).
For a classified task:
  - executeTask() skips the standard "task started!" toast and, when the run is
    hand-launched, records its id as pending.
  - the taskCompleted handler skips the standard "task completed!" toast; if the
    id was pending (user launched it) it shows one small plain result line
    ("Apps checked for updates & vulnerabilities."), otherwise stays silent so
    the periodic auto-scan makes no noise at all.

Non-background tasks are unaffected — the standard task-notification style still
applies. Extend byAction to quiet another self-surfacing action.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-07 22:05:56 +01:00
librelad
e6d2eec141 Merge claude/2 2026-07-07 21:55:12 +01:00
librelad
143c1ca23d fix(config/webui): align multi-column config toggles inline with inputs
In the config grid (e.g. Backups > Configuration > Engine) toggle pills sat
~6px below and 2px taller than the text/select controls beside them, so they
read as misaligned. Two causes, both scoped to .config-fields:

- .field-group carried a vestigial margin-bottom:6px (the grid's own 16px gap
  already spaces rows). It inflated the grid track, so the align-self:end
  toggle landed 6px below the input controls. Zeroed inside the grid.
- The .checkbox-label pill's 24px switch + 10px vertical padding rendered 46px
  vs the inputs' 44px. Trimmed to 9px padding so the pill is 44px.

Toggles now share the exact vertical band (top + height) as the inputs in
their row. Applies to every config-grid toggle, not just the backup engine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:55:12 +01:00
librelad
01e8743a8e Merge claude/1 2026-07-07 21:40:57 +01:00
librelad
ada5a4c177 fix(webui/config): box the master-toggle control row like the rest of a section
On /admin/config/general the Basic section's fields sit in the darker inset
".config-fields" box, but the Mail Enabled toggle and Installation Mode select
did not — their control sits in its own .mail-master-toggle / .git-master-toggle
wrapper, a sibling of .config-fields, which the boxing rule never covered. So a
gated section's enable row read as loose, unboxed content above the (hidden)
options.

Extend the boxed-panel rule to the master-toggle wrappers (mail / install-mode /
generic / backup-remote). Element-qualified to the wrapper <div> because
renderToggleSection stamps the same class on the inner .checkbox-label pill too,
which must not get its own nested box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-07 21:40:57 +01:00
librelad
17075274c2 Merge claude/2 2026-07-07 21:40:23 +01:00
librelad
64d298c6db fix(catalog/webui): make the official-catalog "Re-enable" button inline, full-height & clickable
When the official catalog is hidden, its "Re-enable" action rendered as a
flat, greyed-out ~27px pill pinned to the top-left of the row — shorter than
the 44px URL field and not obviously clickable (the generic .btn-secondary
loses its nebula-theme polish outside .config-actions, so it fell back to an
unstyled base button).

- The action column now align-self:stretch, so its control matches the URL
  field's height and sits inline (also vertically centres the compact × in the
  enabled state).
- The Re-enable button gets a dedicated .catalog-reenable-btn treatment: accent
  fill + accent border + hover state + an eye icon, filling the row height so it
  lines up with the input and clearly reads as a button.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:40:23 +01:00
librelad
126f563a07 Merge claude/2 2026-07-07 21:17:08 +01:00
librelad
6bed124984 fix(backup/webui): hold Refresh spin ~450ms so instant refetches still pulse
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:17:08 +01:00
librelad
ac07420ef1 Merge claude/2 2026-07-07 21:13:06 +01:00
librelad
6912c36aaf fix(backup/webui): render the Backups Configuration form (dup-id collision) + refresh feedback
The Backups tab's Configuration sub-tab showed only the warning banner and
an orphaned divider -- the actual config form (retention presets, engine,
keep-policies, Save/Reset) never appeared.

Root cause: a duplicate id. The Fleet Overview, the app grid and per-app
detail all render the shared apps-unified-layout, which keeps a hidden
#config-tab > #config-section in the DOM. The Backups Configuration sub-tab
created its OWN #config-section, and configManager.renderConfig() resolved
the target with getElementById('config-section') -- which returns the FIRST
(hidden) node in document order. So the 21KB form painted into the invisible
per-app container while the backup tab's container stayed empty. Because the
/backup routes now redirect into /apps/overview/backups, this fired every
time -- the form had effectively never been visible.

Fix:
- renderConfig(category, target) now accepts an explicit container (element
  or id) and falls back to #config-section; the error-retry button re-targets
  via configSection.id.
- The Backups Configuration sub-tab uses a unique id (#backup-config-section)
  and passes it to renderConfig; retention-preset and engine-details
  selectors are scoped to it.

Also: the Refresh button now spins + locks while refreshAll()+render() run,
so the click has visible feedback instead of appearing to do nothing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:13:06 +01:00
librelad
b33764f259 Merge claude/2 2026-07-07 20:47:21 +01:00
librelad
6148a6597e fix(backup/webui): wrap the global Backups tab list in a themed box
The global Backups tab rendered its snapshot list (and the "No backups
yet." empty state) as a bare flex column directly on the tab panel, so
the list section had no visual container -- unlike the Dashboard tab's
cards and the per-app Backups tab's recessed panel. Wrap it in a
.backup-snapshot-panel box (translucent fill + hairline border, matching
.backup-card) so the section reads as a bounded surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 20:47:03 +01:00
librelad
95fc2f73e9 Merge claude/1 2026-07-07 20:46:46 +01:00
librelad
73a93cf145 fix(webui/backups): sync fleet Backups sub-tab URLs (/apps/overview/backups/<sub>)
The embedded backup center deep-links *in* fine (mountBackupCenter parses the
sub-segment), but clicking a sub-tab never wrote the URL: BackupPage disables
pushTabToUrl() when embedded and nothing on the fleet side stepped in, so the
address bar stayed stale and the sub-tabs weren't shareable/deep-linkable —
unlike the sibling Migrate sub-tabs.

Give BackupPage an onTabChange hook fired on every switch; the OverviewManager
supplies it to replaceState /apps/overview/backups/<sub> (replaceState, matching
Migrate, so the on-entry deep-link re-sync can't stack a duplicate history
entry). Standalone /backup keeps using pushTabToUrl() unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-07 20:46:45 +01:00
librelad
ff711d3c2b Merge claude/1 2026-07-06 23:25:46 +01:00
librelad
8aae1bde4f fix(webui/config): nudge the "Official" catalog badge inline with the URL text
The badge centres on the input box (top:50%), but the single-line input renders
its text a hair low, so the pill read as slightly above the URL. +2px lands it
optically inline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-06 23:25:46 +01:00
librelad
6b83fa34ad Merge claude/2 2026-07-06 23:13:55 +01:00
librelad
d571018b9f fix(catalog/webui): replace the official-hide warning wall-of-text with a ✓/✗ checklist
Feedback: the removal warning was an overwhelming paragraph and made it look like
updates might break. Keep the official catalog removable, but present the effects
as a clear two-part list instead of prose:
  ✓ Still works: system updates & hotfixes, installed apps, re-enabling any time
  ✕ What changes: official apps hidden from the App Center "Available" list
Backed by a new optional messageHtml arg on the shared confirmation dialog (dev-
controlled HTML body) + styles for the effect groups. Required tickbox kept.

Signed-off-by: librelad <librelad@digitalangels.vip>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:13:55 +01:00
librelad
2c67b9b622 Merge claude/1 2026-07-06 23:03:56 +01:00
librelad
fb0c3ba3fb feat(config): split core-component toggles into a "Core" advanced section
The General → Install section was cluttered with 8 CFG_REQUIREMENT_* dev toggles
(config mgmt, CLI, WebUI, task service, database, passwords, Docker CE, Docker
Compose) — all **ADVANCED** **DEV** "which core components to install" switches.
Move them into a dedicated general_core section ("Core", advanced) so Install
keeps just the install-mode / release / git settings.

- New configs/general/general_core (**ADVANCED** header → advanced group, 🧩 icon).
- Removed those fields from general_install.
- .category SUBCATEGORY_ORDER: general_core after general_install.
Var names unchanged, so all install-requirement logic still resolves them. Live
install migrated in place (values preserved) + configs.json regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-06 23:03:56 +01:00
librelad
86d1c34e39 Merge claude/1 2026-07-06 22:47:10 +01:00
librelad
e0e13f7566 fix(webui/config): proper acronym/brand casing in config section names
formatSubcategoryName title-cased naively, so section headers read "Ssh",
"Dns", "Libreportal". Add a whole-word acronym/brand map so they render
professionally as "SSH", "DNS", "LibrePortal" (also covers VPN/API/IP/UI/URL/
HTTP(S)/TLS/SSL/WebUI for future files). Composes with stripCategoryPrefix,
which runs after and is case-insensitive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-06 22:47:10 +01:00
librelad
431d6561a8 Merge claude/2 2026-07-06 22:44:55 +01:00
librelad
190c06ebce fix(catalog/webui): inline info note + official row shows its URL, height matches
- Info banner: drop the borrowed traefik warning banner (icon sat above the
  text, amber-warning styling) for a .catalog-note — icon inline with the text,
  neutral boxed look matching the content sections.
- Official row (#1): render the release-host URL in a read-only input (same
  element/height as the third-party rows) with the "✓ Official" badge overlaid,
  instead of short text — so it shows the URL and its box height matches the
  others. URL is read from the loaded config (CFG_RELEASE_BASE_URL).

Signed-off-by: librelad <librelad@digitalangels.vip>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 22:44:55 +01:00