[Frontend] Fix memo-defeating props and per-mousemove state in CashflowProjectionChart
Overview & Background
dashboard-view.tsx:895 builds the chart's streams prop as a fresh array of fresh objects on every render ([...snapshot.incomingStreams.map(...), ...snapshot.outgoingStreams.map(...)]), so all three useMemos in CashflowProjectionChart.tsx:9 recompute — including projectCashflow, a full daily-bucket projection over up to 365 points. Independently, onMouseMove calls setHovered on every mouse move, re-rendering the whole chart and rebuilding path strings at pointer speed. The component is not React.memo'd.
Technical Specification & Architecture
- Build the
ProjectionStream[]in auseMemokeyed onsnapshot(orReact.memothe chart with a stable comparator). - Throttle/
requestAnimationFrame-defer the hover index update.
Target Files
frontend/src/components/dashboard/dashboard-view.tsxfrontend/src/components/dashboard/CashflowProjectionChart.tsx
Acceptance Criteria
- [ ] The chart's memos do not recompute on unrelated dashboard renders.
- [ ] Mouse-move updates do not re-render at pointer rate.
- [ ] Measurable render-count reduction (e.g. React profiler) is demonstrated.
@samjay8 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
I can fix this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @samjay8 to this issue.
Congratulations, @samjay8! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.
🧑💻 @samjay8: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @samjay8 as part of the Stellar Wave Program's 11th Wave 🥳
😎 @samjay8: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.