fix: use reference price for market baseline#1333
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
There was a problem hiding this comment.
1 issue found across 4 files
Confidence score: 4/5
- In
src/app/[locale]/(platform)/event/[slug]/_components/EventLiveSeriesChart.tsx, if the reference snapshot is missingopening_price, the chart can still stream live prices but lose the Price To Beat, delta, and target line, which weakens key trading context for users viewing live events. Restore a fallback baseline (or guard with an explicit default behavior) before merging to avoid this regression.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/app/[locale]/(platform)/event/[slug]/_components/EventLiveSeriesChart.tsx">
<violation number="1" location="src/app/[locale]/(platform)/event/[slug]/_components/EventLiveSeriesChart.tsx:463">
P2: When the reference snapshot is unavailable or has no `opening_price`, the chart still receives live prices but now renders no Price To Beat, delta, or target line because the previous WebSocket baseline fallback was removed. Preserving the live baseline only while the canonical reference is unavailable would avoid blank baseline UI without overriding a valid reference price.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| const resolvedBaselinePrice = isEventClosed | ||
| ? referenceOpeningPrice | ||
| : baselinePrice ?? referenceOpeningPrice | ||
| const resolvedBaselinePrice = referenceOpeningPrice |
Contributor
There was a problem hiding this comment.
P2: When the reference snapshot is unavailable or has no opening_price, the chart still receives live prices but now renders no Price To Beat, delta, or target line because the previous WebSocket baseline fallback was removed. Preserving the live baseline only while the canonical reference is unavailable would avoid blank baseline UI without overriding a valid reference price.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/app/[locale]/(platform)/event/[slug]/_components/EventLiveSeriesChart.tsx, line 463:
<comment>When the reference snapshot is unavailable or has no `opening_price`, the chart still receives live prices but now renders no Price To Beat, delta, or target line because the previous WebSocket baseline fallback was removed. Preserving the live baseline only while the canonical reference is unavailable would avoid blank baseline UI without overriding a valid reference price.</comment>
<file context>
@@ -463,9 +460,7 @@ function EventLiveSeriesChartContent({
- const resolvedBaselinePrice = isEventClosed
- ? referenceOpeningPrice
- : baselinePrice ?? referenceOpeningPrice
+ const resolvedBaselinePrice = referenceOpeningPrice
const precisionReferencePrice = currentPrice
?? resolvedBaselinePrice
</file context>
github-actions Bot
added a commit
to gladwintan5331/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to jcpteam/premarket-kuest
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to a19ba14d/prediction-market-1
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to wollydolly/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to bahatijoseph097-prog/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to CrisMan7/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to bezsteam/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to seasonHxy/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to socksrust/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to miguelmoney2007-boop/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to alex5323d/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to MetaQQQ/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to 0xbrowser/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to viscf/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to b4fm2w52j8-netizen/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to brandonmathewp/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to mohitrajcoderf/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to Point-7/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to chance532/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to Excoinsevm/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to jointmeafreshone-max/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to trung78955/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to 17343225742/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to hottie1111/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to will2016/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to BIRURU337/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to kyrodigitalagency-dotcom/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to hahzterry/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to infoczechforestry-gif/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to VadymSova/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to culturalex/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to palotespedro534-ship-it/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to predictions-beta/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to o19k/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to dantech-gif/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to ibrunotome/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to IcarusThrice/Kneel-Polygon-prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to SergeWilfried/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to faustosarmiento8153/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to mir711163-lab/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to nexus-ledger-blockchain/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to youlgtm/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to BlockD3v/Prediction
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to ibruno/kuest-prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to maximumbeast777888-lang/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to qafeocapital-jpg/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to chenliangsea-design/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to lemoswebsite/prediction-market
that referenced
this pull request
Jul 22, 2026
github-actions Bot
added a commit
to mohamadnur/prediction-market
that referenced
this pull request
Jul 22, 2026
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 cubic
Use the reference opening price as the market baseline for live charts. Removes the WebSocket-derived baseline to keep the chart stable and consistent.
referenceOpeningPrice(no fallback to first live tick).useLiveSeriesPriceSnapshotanduseLiveSeriesWebSocket, and updated the chart accordingly.Written for commit e33e29e. Summary will update on new commits.