feat(predict): update liveline chart foundation#30003
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Investigation confirmed that Performance Test Selection: |
|



Description
This PR updates the shared Liveline chart foundation used by the Predict crypto up/down work. It makes the React Native wrapper and WebView template support imperative live-point updates, queued messages before chart readiness, native loading behavior, and safer callback handling.
TODO
Changelog
CHANGELOG entry: null
Related issues
Fixes: N/A - stacked Predict crypto up/down implementation split from #29436.
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes the RN↔WebView messaging contract and rendering flow (adds queued imperative updates and live-mode state), which could affect chart correctness, loading states, and performance.
Overview
Updates
LivelineChartto support an imperative ref API (appendPoint,clearData) that sends incremental WebView messages, queues them untilCHART_READY, and flushes deterministically before firingonChartReady.Extends the RN↔WebView protocol and template to handle
APPEND_POINT/CLEAR_DATA, maintain a live-mode data buffer with merge/trim behavior, and optionally hide in-chart controls via the newhideControlsprop (CSS body class).Adjusts loading and callback handling: keeps a native loading overlay while
loadingis true, stabilizesonMessagewhile always using latest callback props, and adds dev-onlyPERFtelemetry logging plus expanded unit tests for the new behaviors.Reviewed by Cursor Bugbot for commit ce2a7e2. Bugbot is set up for automated code reviews on this repo. Configure here.