Repository navigation
Colors: Absturz beheben, wenn eine Verbraucher-Nachricht vor der Hierarchie-Nachricht ankommt - #4296
Open
seaspotter wants to merge 2 commits into
Open
seaspotter wants to merge 2 commits into
seaspotter wants to merge 2 commits into
Conversation
Reviewer's GuideAPIAdd a hierarchy-registration entry point that creates consumers and replays messages buffered for them, while buffering messages for consumers not yet registered.
Uses of the APIRoute hierarchy-discovered consumers through the registration entry point and update imports to use it.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/modules/web_themes/colors/source/src/components/consumerList/processMessages.ts" line_range="22" />
<code_context>
}
if (!consumers.has(index)) {
- console.warn('Invalid consumer id received: ' + index)
+ addConsumer(index)
}
const dev = consumers.get(index)!
</code_context>
<issue_to_address>
**Removed consumers remain visible**
When a retained or stale per-consumer topic arrives for an ID absent from the hierarchy, `addConsumer` creates a list-visible entry, and `processHierarchy` does not remove IDs absent from the hierarchy, so the removed consumer remains as a phantom row and can shift real consumers’ colors.
Ignore unknown per-consumer IDs until they appear in the hierarchy.
</issue_to_address>
### Comment 2
<location path="packages/modules/web_themes/colors/source/src/components/consumerList/processMessages.ts" line_range="22" />
<code_context>
}
if (!consumers.has(index)) {
- console.warn('Invalid consumer id received: ' + index)
+ addConsumer(index)
}
const dev = consumers.get(index)!
</code_context>
<issue_to_address>
**Consumer colors depend on message order**
When per-consumer messages first arrive in an order different from the hierarchy order, `addConsumer` assigns colors from `consumers.size`, so an early message fixes each consumer’s color according to arrival order. The later hierarchy call does not replace existing consumers, leaving the same consumer IDs with different colors across sessions and their graph series displayed in those inconsistent colors.
Assign consumer colors from a stable ID or explicitly apply hierarchy-order colors when the hierarchy arrives.
</issue_to_address>…tead of creating phantom entries
cshagen
approved these changes
Nov 10, 2026
cshagen
left a comment
Collaborator
There was a problem hiding this comment.
Vielen Dank für den Fix !
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.
#3466 (comment): Verbraucher bleiben teilweise bei "Verbraucher" statt ihrem echten Namen, in der Konsole erscheint dabei "Uncaught TypeError: Cannot set properties of undefined".
Verbraucher werden beim Verarbeiten der "openWB/counter/get/hierarchy"-Nachricht in die consumers-Map eingetragen. Die Pro-Verbraucher-Topics (zB "module" mit dem Namen) kommen aber unabhängig davon an, nicht garantiert danach. Kommt eins davor an, hat der alte Code gewarnt und ist dann beim Versuch, einen noch nicht existierenden Verbraucher zu aktualisieren, abgestürzt - das Update ging für den Rest der Session verloren.
Fix: Verbraucher beim ersten Topic anlegen statt abzustürzen, analog zum bereits vorhandenen Muster in processDayGraphData.ts für historische Daten.
Summary by Sourcery
Handle out-of-order consumer messages safely by registering consumers from the hierarchy and replaying messages received before registration.
Bug Fixes:
Enhancements: