Repository navigation
Conversation
There was a problem hiding this comment.
Hey - I've found 3 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/powerGraph/processDayGraphData.ts" line_range="189" />
<code_context>
})
// Prices
- if (currentRow.prices.grid > 0) {
+ if (currentRow.prices && currentRow.prices.grid > 0) {
currentItem.price = currentRow.prices.grid * 100000
}
</code_context>
<issue_to_address>
**Missing prices become zero**
When a graph contains both rows with prices and rows without valid prices, `transformRow` leaves `price` undefined for rows without a valid price, but `PriceLine` still sends those rows to its line generator. Missing values become zero-price segments or invalid path coordinates, so valid prices render incorrectly; the midpoint label can also receive a NaN position.
Exclude rows without valid prices from the price-line path and its midpoint-label calculation.
</issue_to_address>
### Comment 2
<location path="packages/modules/web_themes/colors/source/src/components/powerGraph/PriceLine.vue" line_range="71" />
<code_context>
.range([props.height - 10, 5])
.domain(e)
} else {
+ showLine.value = false
return scaleLinear()
.range([props.height - 10, 0])
</code_context>
<issue_to_address>
**Price line stays hidden**
When a mounted `PriceLine` receives a dataset without prices and later receives one with valid prices, `yScale` sets `showLine` to false for the no-price dataset, but the valid-extent branch never sets it back to true, so the root `v-if` keeps the SVG removed and users see no price line.
Set `showLine` to true in the valid-extent branch.
</issue_to_address>
### Comment 3
<location path="packages/modules/web_themes/colors/source/src/components/powerGraph/processDayGraphData.ts" line_range="189" />
<code_context>
})
// Prices
- if (currentRow.prices.grid > 0) {
+ if (currentRow.prices && currentRow.prices.grid > 0) {
currentItem.price = currentRow.prices.grid * 100000
}
</code_context>
<issue_to_address>
**Hovering breaks the tooltip**
When a row without a price is hovered while tariff data is active, `transformRow` leaves `entry.price` undefined, and the active-price tooltip passes it to `formatPrice`, which calls `toFixed` and throws, breaking tooltip rendering.
Guard missing prices before passing `entry.price` to `formatPrice`.
</issue_to_address>
cshagen
marked this pull request as draft
November 18, 2026 07:03
cshagen
marked this pull request as ready for review
November 18, 2026 17:21
Collaborator
Author
|
@sourcery-ai review |
Linked issuesChecked at commit 252be8b #4337 [BUG] Color Theme alte Tageswerte nicht darstellbar nach Upgrade 2.3.0 · 1 of 1 met
|
There was a problem hiding this comment.
Hey - I've found 1 issue
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/powerGraph/PgToolTipItem.vue" line_range="125" />
<code_context>
/>
<PgToolTipLine
- v-if="etData.active"
+ v-if="etData.active && entry.price != null"
cat="price"
:indent="5"
</code_context>
<issue_to_address>
**Tooltip shows invalid price**
When historical graph data contains a positive price that overflows to `Infinity` during parsing or scaling, `transformRow` retains the overflowing positive price as `Infinity`, and `entry.price != null` passes it to `formatPrice`; unlike `PriceLine`, the tooltip renders `Infinity` as a price, leaving a misleading entry.
Require `Number.isFinite(entry.price)` in the tooltip guard, matching `PriceLine`.
Also at `packages/modules/web_themes/colors/source/src/components/powerGraph/processDayGraphData.ts:189`.
</issue_to_address>
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 by Sourcery
Prevent missing or invalid prices in historical graph data from affecting the colors theme power graph.
Bug Fixes:
Enhancements: