Defer feed chart rendering#4954
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughAdds a deferred-render hook and threads a ChangesDeferred Feed Chart Rendering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
front_end/src/components/post_card/multiple_choice_tile/index.tsx (1)
240-280: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPass
forFeedPagethrough to the child charts.
At lines 257, 280, and 376, the bare JSX prop makes each chart receivetrueunconditionally. That forces feed-mode behavior even when this tile is rendered outside the feed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@front_end/src/components/post_card/multiple_choice_tile/index.tsx` around lines 240 - 280, The `MultipleChoiceTile` child chart props are currently hardcoding `forFeedPage` to true, which forces feed behavior in both `MultipleChoiceChart` and `GroupChart` even when this component is not rendered on the feed. Update the `MultipleChoiceTile` render logic to pass the existing `forFeedPage` value through to each child chart instead of using a bare JSX prop, and make sure the same fix is applied wherever the chart component is rendered in this file.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@front_end/src/components/post_card/multiple_choice_tile/index.tsx`:
- Around line 240-280: The `MultipleChoiceTile` child chart props are currently
hardcoding `forFeedPage` to true, which forces feed behavior in both
`MultipleChoiceChart` and `GroupChart` even when this component is not rendered
on the feed. Update the `MultipleChoiceTile` render logic to pass the existing
`forFeedPage` value through to each child chart instead of using a bare JSX
prop, and make sure the same fix is applied wherever the chart component is
rendered in this file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 17b3364b-1dc0-4cc7-90a9-2eb191fb72f1
📒 Files selected for processing (7)
front_end/src/components/consumer_post_card/consumer_question_tile/index.tsxfront_end/src/components/consumer_post_card/group_forecast_card/date_forecast_card/index.tsxfront_end/src/components/consumer_post_card/group_forecast_card/index.tsxfront_end/src/components/consumer_post_card/index.tsxfront_end/src/components/post_card/multiple_choice_tile/index.tsxfront_end/src/components/post_card/question_tile/question_continuous_tile.tsxfront_end/src/hooks/use_deferred_render.ts
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
e24dbfd to
ecd2622
Compare
Related to #4937
Summary
Adds deferred feed chart rendering so feed cards can paint content before mounting expensive Victory charts.
Implemented changes:
Performance notes:
With Chrome CPU throttling at 4x slowdown, the post-response client-side render phase improved from ~10s before to ~6s after in local testing.
Summary by CodeRabbit