webapp: Add visual indicator for stale data in webUI#2284
Draft
Copilot wants to merge 3 commits intodevelopmentfrom
Draft
webapp: Add visual indicator for stale data in webUI#2284Copilot wants to merge 3 commits intodevelopmentfrom
Copilot wants to merge 3 commits intodevelopmentfrom
Conversation
Co-authored-by: AndreasBoehm <1270749+AndreasBoehm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add visibility for stale powermeter in webUI
Add visual indicator for stale power meter data in webUI
Oct 10, 2025
Member
|
@copilot do the same for battery, gridcharger and solarcharger |
Co-authored-by: AndreasBoehm <1270749+AndreasBoehm@users.noreply.github.com>
Author
Done! I've extended the stale data indicator to battery, grid charger, and solar charger components. All cards in InverterTotalInfo now change from blue to red headers when data becomes stale (>30 seconds old). Changes committed in 7c7f4e1. |
Copilot
AI
changed the title
Add visual indicator for stale power meter data in webUI
Add visual indicator for stale data in webUI (power meter, battery, grid charger, solar charger)
Oct 10, 2025
Member
|
@vaterlangen good find! After looking at what copilot built i very much want to align all classes that expose statistics to clean up the mess of „isOutdated“ checks |
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.
Overview
This PR implements visual indicators to make stale data immediately visible in the webUI for all components in InverterTotalInfo, as requested in #2229. All component cards (power meter, battery, grid charger, and solar charger) now change color from blue to red when data becomes stale (>30 seconds old), providing at-a-glance feedback for connectivity issues.
Problem
Previously, the component cards in the webUI always displayed with a blue header, regardless of whether the data was fresh or stale. This made it difficult to identify connectivity issues at a glance, requiring users to check logs or dig deeper to realize their components had stopped reporting.
Solution
The implementation follows the same pattern already used by the detailed Battery and Solar Charger views:
text-bg-primary)text-bg-danger)Changes
Backend (C++)
src/WebApi_ws_live.cpp: AddedisDataValidfield to the WebSocket JSON response for all four components:PowerMeter.isDataValid()methodgetAgeSeconds() < 30checkgetLastUpdate()timestamp checkgetAgeMillis() < 30000checkFrontend (TypeScript/Vue)
webapp/src/types/LiveDataStatus.ts: Added optionalisDataValidfield to all four interfaces:PowerMeter,Battery,GridCharger, andSolarChargerwebapp/src/components/InverterTotalInfo.vue: Modified all component cards (7 total) to conditionally change header color based on data validity:Technical Details
Testing
Fixes #2229
Fixes #2231
Original prompt
Fixes #2231
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.