Repository navigation
feat: alerts outside the app, switched on in Settings - #361
Merged
8 commits merged intoNov 13, 2026
Merged
8 commits merged into
8 commits merged into
Conversation
The Resume button on a paused container sent the start mutation, which
Docker refuses ("cannot start a paused container, try unpause instead"),
so the container stayed paused. A paused container now gets the existing
UnpauseContainer mutation (docker.unpause, available since API 4.29.0, so
on every supported server and without a capability floor); a stopped
container still gets start.
The choice is made once, in UnraidRepository.startContainer(client, id,
paused), the same seam as restartContainer. The Docker tab row and the
container sheet both go through MainViewModel.startContainer(Container).
The demo follows the repository surface: UnraidGateway.startContainer
takes the same flag, and the demo model refuses start on a paused
container like Docker does, so the demo no longer hides the bug.
Closes #345
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ain http
The foreground clients followed redirects, and OkHttp keeps the x-api-key
header when it does, so a 3xx answer moved the key to whatever Location
named: another host, or http after the user entered https. For the
WebSocket the handshake was followed and the key then went out in
connection_init to the new host.
No client that carries the key follows a redirect any more (ADR-0051).
A redirect is reported as the new reason Redirected, naming the target
origin ("The server redirects to https://... Edit the server and enter
that address."), in the tabs, in the Add server sheet's Test and in the
action message. It is no connection problem, so the pill does not say
Offline. Unraid answers http requests with 302 when SSL is Yes or Strict.
Closes #354
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A key without the permission for an action no longer gets the button for it. The Docker, VMs and Array tabs and the container, VM and notification sheets hide Start, Stop, Restart, Update, parity, Archive and Delete controls when the capability probe says the key lacks DOCKER, VMS, ARRAY or NOTIFICATIONS UPDATE_ANY / DELETE_ANY, and show one "View only" note that names the missing permission, with a link to the README table. Unknown access keeps every button as before, and a refused action now says which permission it needed instead of "Forbidden resource". The Add server Test button now uses the capability probe instead of Ping, which the server answers for any key: a rejected key fails the test, and an accepted one reports the Unraid and API version and what the key can do. The API Key field gets a hint and a "Which permissions?" link. The Overview shows the failure reason of a total failure like the tabs do, and only a connection problem (unreachable server, rejected key) marks it offline and hides the needs-attention card. Closes #315 Closes #316 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ion card with services off The Containers and Virtual machines cards turned an unknown list (not loaded, turned off, not allowed, offline) into "0 running", "all healthy" and "0 configured". They now show the same dash as the other Overview cards; a real empty list still reads 0. The figures moved into OverviewFigures.kt so they can be unit-tested. Regression tests for #356: the Needs attention card stays with VMs or Docker switched off or forbidden for the key, and the cards render dashes while their data is unknown. ErrorReasonTest now also classifies the Docker-off answer through the real Docker query. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Settings, Notifications gets the switch for the background check that already exists on main (ADR-0048), off by default. - Switching on opens an explanation, then asks for POST_NOTIFICATIONS on Android 13 and later; only a granted answer schedules anything. A denial leaves the switch off and shows that Android blocks notifications for NOVA, with a button to Android's notification settings. The line is re-read when the screen returns to the front. - Interval (15 minutes to 3 hours), level (alerts and warnings, or alerts only) and Wi-Fi only go through AlertScheduler.update, which reschedules the existing work. The screen reads only the settings store and never asks for WorkManager while alerts are off. - "Send test notification" runs the same https-only probe once for the active server and posts its newest unread alert or warning. It never writes the remembered state. - Each server has a last-check line: the outcome and time are now kept in ServerAlertState.lastCheck, set by the check runner after every run and read by the screen only; what is notified does not change. A server with only http addresses reads "not checked in the background because the connection is not encrypted. An https address is needed."; the demo server is named as never checked. - A battery hint and a link to dontkillmyapp.com (opened by the user), and a link to the README recipe for instant alerts with Unraid's own agents. Documents: CHANGELOG, README (feature list and an Alerts section), privacy policy (what is sent in the background, the https rule, the new permissions, the alert state), the project site, the store description, HANDOFF, and an addendum to ADR-0048 for the https and demo rules. Closes #321 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Settings, Notifications: say so when the user switched off the "Server alerts" or "Server warnings" channel (AlertNotifier.blockedChannel, read only), with the same button to Android's notification settings. - Switching alerts off cancels a running test and a test that finishes after the switch is off posts nothing. - Robolectric tests for both. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nofuturekid
force-pushed
the
feat/alerts-settings-and-permission
branch
from
November 13, 2026 21:43
c577fd9 to
110bddd
Compare
#358 moved the Add server sheet's Test onto the capability probe, whose failure path never called redirectMessage(): a 3xx answer showed the generic "Http request failed with status code 302" instead of the sentence ADR-0051 documents. testOutcomeOf now prefers the redirect message when the probe's failure carries the HTTP exception. Tests: a 302 with a target and one without go through the real probe; the classifier test no longer claims to cover Test. ADR-0048's last sentence pointed at in-app clients that follow redirects; since ADR-0051 they do not. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ADR-0051, decision 4, said that classifyResponse returns the redirect sentence so the Add server sheet's Test shows it without a change of its own. Test no longer goes through classifyResponse: testConnection runs testOutcomeOf(probeCapabilities(...)), and testOutcomeOf prefers the redirect message of the probe's failure cause. Tabs still get the reason through classifyErrorReason and toQueryError, and the snackbar of a failed action gets the lower-cased sentence from checkActionResponse. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Settings gets a Notifications section that switches on the background check that is already on main (ADR-0048). It is off by default; with it off NOVA still does nothing in the background.
POST_NOTIFICATIONSon Android 13 and later; only a granted answer schedules anything. A denial (or a block in Android's settings on older versions) leaves the switch off and shows "Android blocks notifications for NOVA" with a button to Android's notification settings. The line is re-read when the screen comes back to the front.AlertScheduler.update, which updates the existing unique work.ServerAlertState.lastCheck(time and outcome), set byAlertCheckRunnerafter each run and read only by the screen.evaluateAlertsleaves it alone; what is notified is unchanged.Documents: CHANGELOG (Unreleased, Added), README (feature bullet, an "Alerts outside the app" section, a privacy bullet),
docs/privacy/POLICY.md(effective date, what is sent in the background, the https rule, alert state,POST_NOTIFICATIONS/WAKE_LOCK/RECEIVE_BOOT_COMPLETED),site/index.html(feature and privacy cards), store description (one line), HANDOFF.md (one bullet), ADR-0048 (status and an addendum for the https-only and demo rules).Tests (Robolectric, real settings store, real notifier, real WorkManager test driver)
Deliberately left out
.github/.evaluateAlertsresult is untouched.Shared files (regions touched)
SettingsScreen.kt(oneAlertsSection()call between Layout and Updates;SettingRow,Toggle,Segmentedmadeinternal),SettingsStore.kt(onealertStatesflow),SettingsRepository.kt(three read flows),CHANGELOG.md(end of Added),README.md(feature bullet, new section, privacy bullet),POLICY.md,site/index.html. Not touched:MainViewModel.kt, the tabs,AddEditServerSheet,OverviewTab,ApolloClientFactory,UnraidRepository. Rebased onto main at3fc9d16(one conflict in the README privacy list, resolved by keeping both).Device acceptance (for the maintainer; design section 8)
A0 switch off = no job, no alarm. A1 switch on, "Send test notification" with the read-only key shows a "Test: ..." notification or "No unread alerts or warnings". A2 one NOVA job with the chosen period. A3 forced run updates the last-check line and posts nothing (baseline). A4 tapping the test notification opens that server's notifications. A5 unreachable stays silent, line says so. A6 reboot: no check before unlock, job back after. A7 standby bucket. A8 switch off cancels job and removes notifications. Also: a server with only an http address shows the encryption line and is never contacted. The Android 13+ permission flow (grant, deny, deny twice) needs an Android 14/15 emulator or phone; the Huawei runs Android 9.
Checks
./scripts/local-ci.shpassed on the rebased tree (lint, assemble debug and release, 599 unit tests, 0 failed, 0 skipped).Closes #321
🤖 Generated with Claude Code