Repository navigation
#1037 Server Health: connection stats on the Servers page - #1041
Merged
Merged
Conversation
Record ping latency, event-stream state changes, drop causes and server restarts for the active Connection Profile while the app is open (7 days, on device). Show a quick view on the active server card and a Server Health screen with uptime, reconnects, error rate and latency charts. Adds chart components (sparkline, band chart, status strip, bar chart, chart card, stat tile, proportion row) and a list item footer slot on both platforms.
Collaborator
Author
ivanfenenko
marked this pull request as ready for review
November 14, 2026 17:04
There was a problem hiding this comment.
Automated review: no finding that 2+ of 2 passes agreed on.
9 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/Data/Local/ServerHealth/SwiftDataServerHealthStore.swift:115high: iOS health store ordering is nondeterministic on equal timestamps (muse-spark-1.3-contributor)ios/OpenCode Mobile/OpenCode Mobile/Domain/ServerHealth/ServerHealthMonitor.swift:179medium: iOS records stream failures while occupancy is Stopped (muse-spark-1.3-contributor)ios/OpenCode Mobile/OpenCode Mobile/Data/Local/ServerHealth/SwiftDataServerHealthStore.swift:188medium: Unknown persisted failure decodes to no failure on iOS (muse-spark-1.3-contributor)android/app/src/main/java/dev/opencode/mobile/domain/serverhealth/ServerHealthMonitor.kt:1076medium: Stream failure attributed to the wrong/previous profile during a profile switch (glm-5.3-flash)ios/OpenCode Mobile/OpenCode Mobile/Domain/ServerHealth/ServerHealthMonitor.swift:7256medium: Stream failure recorded even while the stream is stopped (app backgrounded) (glm-5.3-flash)android/app/src/main/java/dev/opencode/mobile/domain/serverhealth/ServerHealthMonitor.kt:959low: Ping loop can keep pinging a profile the connection no longer uses (glm-5.3-flash)ios/OpenCode Mobile/OpenCode Mobile/Domain/ServerHealth/ServerHealthPinger.swift:7500low: Ping cancellation misclassified when only the URLSession task was cancelled (glm-5.3-flash)android/app/src/main/java/dev/opencode/mobile/di/ServerHealthModule.kt:466low: Ping target defaults to v1 before protocol detection, producing false failures on v2 servers (glm-5.3-flash)android/app/src/main/java/dev/opencode/mobile/domain/serverhealth/ServerHealthReportBuilder.kt:1360low: meanTimeBetweenDrops computed as liveMs/drops, not time between drops (glm-5.3-flash)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.111 · 1 pass(es) failed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.










Summary
global/healthon v1,api/infoon v2)pidchanges or the version changesOpenCodeSparkline,OpenCodeBandChart,OpenCodeStatusStrip,OpenCodeBarChart,OpenCodeChartCard,OpenCodeStatTile,OpenCodeProportionRow, plus an optionalfooterslot onOpenCodeListItem(existing call sites unchanged). All are on a new "Charts" gallery page.Migration(1, 2).Checks
./gradlew :app:assembleDebug :app:assembleDebugAndroidTestpasses.:app:testDebugUnitTestfor theserverhealthandui.settingspackages passes. This covers the new report-builder, monitor, pinger, format and view-model suites, plus additions toConnectionSessionCoordinatorTestandDefaultForegroundEventStreamTest.2,5svs2.5s)SseRecoveryFaultOracleTest, which passes when run alonektlintCheckreports no violations in new code.DefaultForegroundEventStreamTests,ConnectionSessionCoordinatorTests,ConnectionProbeServiceTests,SceneWorldSignalsTests,SseAttemptPolicyTestsandOpenCodeListItemTitleHighlightTestspass.DefaultForegroundEventStreamTests.transportFailureBeforeHeadersKeepsTransportErrorfailed once in a parallel run and passed when the suite ran alone; it waits on the shared diagnostic log.Evidence
Screenshots are in the evidence comment.
Issue
Fixes #1037
Risks / Follow-ups
global/healthping path is covered only by unit tests.#Indexneeds iOS 18, so the store has no (profile, time) index. Data volume is small (about 10k rows per profile per week).URLSessionhas no separate 3 s connect timeout..decimals, not localized formatting.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.