fix(meshcore): show Connecting… instead of Disconnected while status loads#3380
Merged
Conversation
…loads The MeshCoreSourcePage header chip derives connected state from mcStatus, which starts null until the snapshot fetch completes. This caused the header to always show "Disconnected" for the duration of the initial load — even when the device was fully connected — because `null?.connected ?? false` evaluates to false. Fix: treat mcStatus === null as a loading state and render the existing .status-indicator.connecting CSS class with "Connecting…" text, matching the same idiom used by the DashboardSidebar. Once the snapshot resolves, the chip correctly shows "Connected" or "Disconnected" based on the actual device state. Closes #3379 https://claude.ai/code/session_019ReNykYcCcqLfYRTEqAWYY
|
Claude finished @Yeraze's task —— View job PR Review: MeshCore Status Loading State FixReview Tasks:
✅ Overall Assessment: APPROVEDThis is a well-implemented fix that addresses a clear UX issue. The solution is elegant, well-tested, and follows project conventions. Code Quality & Implementation✅ Excellent Implementation
📍 Key Implementation Details (
|
1 task
Yeraze
added a commit
that referenced
this pull request
Jun 10, 2026
The [4.9.4] section captured only the entries present in [Unreleased] when
the release branch was cut. Add the remaining changes that shipped in
v4.9.4 but merged without their own CHANGELOG entries: {DATE}/{TIME}
tokens (#3382), MeshCore JSONL export (#3391), system theme (#3344),
Map Pin Style fix (#3364), MeshCore connecting state (#3380), the Map
Analysis security gate (#3365/#3366), and the 11 dependency bumps.
Co-authored-by: Claude Opus 4.8 <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.
Summary
When a user navigates to the MeshCore source page, the header connection chip was immediately showing "Disconnected" for the entire duration of the initial snapshot fetch — even when the device was fully connected. This created a confusing discrepancy where the dashboard sidebar showed "Connected" (from its polled cache) while the source page showed "Disconnected" (the default
null → falsestate before the snapshot resolved).The root cause is that
mcStatusstarts asnull, andmcStatus?.connected ?? falseevaluates tofalse, causing "Disconnected" to render prematurely. The fix treatsmcStatus === nullas a loading state and shows "Connecting…" until the snapshot completes.Changes
src/pages/MeshCoreSourcePage.tsx: DerivestatusLoading = mcStatus === null; render.status-indicator.connecting+source.status_connecting("Connecting") while loading, then switch to "Connected" / "Disconnected" once the snapshot resolvessrc/pages/MeshCoreSourcePage.test.tsx: Add two new test cases — one verifying "Disconnected" renders after aconnected: falsesnapshot, and one verifying "Connected" renders after aconnected: truesnapshotReuses the existing
.status-indicator.connectingCSS class and thesource.status_connectingi18n key — no new styles or translations needed.Issues Resolved
Fixes #3379
Documentation Updates
No documentation changes needed.
Testing
🤖 Generated with Claude Code
Generated by Claude Code