Repository navigation
feat: a needs-attention summary on the Overview - #336
Merged
2 commits merged intoNov 13, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
…d 7.4 Unraid 7.4.0 refuses requests above a cost of 1,000, depth 20, 100 aliases and 5,000 GraphQL tokens (unraid/api request-protection.ts, graphql-armor 3.2.0). A query that grows past them would only show up as a failed screen. GraphqlRequestLimitsTest re-implements the server's formulas (documented with their source in GraphqlDocumentMetrics), measures every operation in app/src/main/graphql as Apollo sends it and fails, naming the operation and the measure, when one passes 70 percent of a limit. Its other tests pin the formulas to the server's own boundaries. HANDOFF.md records the limits, the margin and the result measured on a real Unraid 7.4.0. No app code changes: the largest operation (GetArray) costs 59 of 1,000. Closes #320 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A card at the top of the Overview lists what needs attention, most urgent first: an array that is not started or is degraded, a parity operation that is running, paused or failed, disks with errors, disks at or above their warning or critical temperature, and unread alert and warning notifications. Tapping a row opens the Array tab or the notifications. The card is hidden when nothing needs attention and while the server is offline. The rules are one pure function in the data layer (attentionItems) that returns items with a severity, a stable key per condition, a title, a detail and a target, so background alerts and a widget can reuse it. It reads only data the app already loads. The array mapper now also keeps how the last parity run ended (the query already asked for it). Closes #319 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nofuturekid
force-pushed
the
feat/needs-attention-card
branch
from
November 13, 2026 16:49
c79e7f1 to
3258fbb
Compare
2 tasks
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
A "Needs attention" card at the top of the Overview lists what needs the user's attention, most urgent first. One row per item, coloured with the existing Warn / Danger / Info tones and also labelled in words (Critical / Warning / Info), so it does not rely on colour alone. Tapping a row opens the Array tab, or the notifications sheet for notification rows. The card is hidden when the list is empty and while the server is offline (an Error on the info, array, docker or VMs stream, the same rule as the top bar's Offline pill).
What it flags:
numErrorsabove zero (critical), one row per disk.Architecture
The rules are one pure function in the data layer,
attentionItems(AttentionSnapshot): List<AttentionItem>indata/model/Attention.kt, with no Compose or Android dependency, so background alerts (#321) and a widget (#322) can reuse it. EachAttentionItemhas a severity, a title, a detail, a target (ArrayorNotifications) and a stable key that names the condition and not the moment: progress, error counts and temperatures stay out of the key, while warm to critical is deliberately a new key.Only data the app already loads is used: the array stream, the notifications stream and the display thresholds. No new polling and no new query.
Decisions
isSpinningis the truth source), a missing threshold,ArrayState.Offline(the mapper's "unknown") and an unreported parity error count raise nothing.AttentionTarget.Notifications; the Overview opens the sheet.ArrayInfo.parityLastRun(outcome and the error count if the API gives one), filled fromarray.parityCheckStatus, which the existingGetArrayquery already asks for.ParityCheckand the existingparitymapping are unchanged. Neitherqueries.graphqlnorUnraidRepository.ktis touched.Deliberately left out
errorstoday, so "completed with errors" can only appear once a server reports it; aFAILEDstatus is flagged now..github/.Checks
./scripts/local-ci.sh: passed (generateApolloSources, lintDirectDebug, assembleDirectDebug, assembleRelease, testDirectDebugUnitTest).AttentionItemsTest(32 tests: each rule raised and not raised on unknown data, stable keys, ordering, healthy server empty) and four new mapper tests inArrayMappingTest; 0 failures, 0 skipped.Closes #319
🤖 Generated with Claude Code