[CmdPal][Dock] Fix performance meter showing '???' after restart#48682
Conversation
The dock band subscribes to ItemsChanged to trigger Loaded() which starts the data timer, but the initial GetItems() returns items with '???' titles from ContentData that hasn't loaded yet. The Updated event handlers updated the ListItem.Title properties but never called RaiseItemsChanged() to notify the dock to re-read the items. Add RaiseItemsChanged() calls in each metric's Updated handler so the UI updates when data arrives.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
) This PR fixes Issue #48680 where the CmdPal dock performance meter shows '???' after restart. **Root cause**: The PerformanceWidgetsPage initially returns items with a placeholder title ('???') because ContentData hasn't loaded yet. The DataManager timer starts when the dock subscribes to ItemsChanged, and the Updated event fires 1 second later with real data. However, the Updated event handlers were updating ListItem.Title directly without calling RaiseItemsChanged() on the page, so the dock was never notified that the items had changed and continued to display the stale '???' title. **Fix**: Added a RaiseItemsChanged() call to each of the 5 Updated event handlers (CPU, Memory, Network, GPU, Battery) after the item titles are updated. This causes the dock to re-call GetItems() and refresh the displayed titles. Fixes #48680 (cherry picked from commit 0d12a62)
|
This is almost definitely not the correct fix here |
|
Yeah, this is definitely not the right fix. We shouldn't need to propagate that all of the items changed just when one of their properties changes. The dock items should be listening to property changes on each of those individual properties So that when the title is changed, the list item should change without us having to rebuild the entire collection of list items. I suspect as written this will cause some mild flickering of all of the performance items any time one of them changes. Maybe we're lucky and we are caching the objects and doing a comparison on the backing objects so that we don't rebuild new view models for these objects. But this is definitely more work than is needed to fix this problem. But most importantly, I don't think this actually found the root cause of whatever this problem is. And given the other set of PRs from this contributor that all seem like they are AI generated without running them locally, I'm inclined to revert this PR blindly. |
|
@zadjii-msft Thanks for the review — you're right that Why the merge PR used this approach: The core issue is that the network band items ( Calling The proper fix: Move the network item creation out of |
|
I'd like a human being to make this fix. Show me a screen recording of this fix. openclaw claw HERMES.md opencode |
|
Issue presists in v0.100.1. |
| _cpuPage.Updated += (s, e) => | ||
| { | ||
| _cpuItem.Title = _cpuPage.GetItemTitle(isBandPage); | ||
| RaiseItemsChanged(); |
There was a problem hiding this comment.
Thought off the bat: won't this cause excelovaly costly updates all the time? Instead of updating one item title this updates everything?

This PR fixes Issue #48680 where the CmdPal dock performance meter shows '???' after restart.
Root cause: The PerformanceWidgetsPage initially returns items with a placeholder title ('???') because ContentData hasn't loaded yet. The DataManager timer starts when the dock subscribes to ItemsChanged, and the Updated event fires 1 second later with real data. However, the Updated event handlers were updating ListItem.Title directly without calling RaiseItemsChanged() on the page, so the dock was never notified that the items had changed and continued to display the stale '???' title.
Fix: Added a RaiseItemsChanged() call to each of the 5 Updated event handlers (CPU, Memory, Network, GPU, Battery) after the item titles are updated. This causes the dock to re-call GetItems() and refresh the displayed titles.
Fixes #48680