Repository navigation
Conversation
When the backend is fully healthy it sends Health.State with Warnings = null (a nil Go map), not an empty map. HealthNotifier only called notifyHealthUpdated through a ?.let chain, so a null Warnings skipped the update entirely and a previously shown warning was never removed. In practice a short dns-forward-failing blip (e.g. switching networks) left "DNS unavailable" on the main screen for hours after the backend had logged "Health updated: null". Treat null Warnings as an empty set. The existing tests passed only because they used emptyMap(); add one with Warnings = null. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXBrJu3voaKptscn5jq7vt Signed-off-by: Konstantin Duczek (Claude Opus 5.5) <konz.duczek@gmail.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.
When the backend is fully healthy it sends
Health.StatewithWarnings = null(a nil Go map), not an empty map.HealthNotifieronly callednotifyHealthUpdatedthrough a?.letchain:so a null
Warningsskipped the update and a previously shown warning was never removed.Symptom
After a short
dns-forward-failingblip (bad mobile network, switching Wi-Fi), the main screen kept showing the warning triangle and "DNS unavailable" for hours, while DNS worked again. logcat at the time:Seen on 1.104.2 (Android 15). Toggling Tailscale off and on cleared it, because leaving
RunningcallsdropAllWarnings().Fix
Treat a null
Warningsas an empty set and always callnotifyHealthUpdated.Test
The existing tests passed only because they used
emptyMap(). AddedwarningClearsWhenBackendSendsNullWarnings, which usesWarnings = null. It fails without the fix (1 of 12 inHealthNotifierTest) and passes with it.ktfmtCheckis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01EXBrJu3voaKptscn5jq7vt