flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Audit] Live "claimable amount" ticker keeps running every second while the tab is backgrounded

Open K1NGD4VID opened this issue 3 months ago • 7 comments

Filed from the second-wave repository audit (issue 40/100). See the audit summary for full category context.

  • Location: frontend/src/app/streams/[id]/stream-details-content.tsx:155-181
  • Problem: Uses setInterval(updateClaimable, 1000) with no document.hidden guard, unlike the more efficient useStreamingAmount hook (frontend/src/hooks/useStreamingAmount.ts:66-104), which uses requestAnimationFrame and explicitly skips work while backgrounded.
  • Evidence: Plain setInterval with no visibility-change listener, versus the existing rAF+visibility-aware hook already in the codebase.
  • Suggested implementation: Replace the inline interval with the existing useStreamingAmount hook (also resolves Architecture #D-dup below), or add the same visibility guard if it must stay separate.
  • Acceptance criteria: No updateClaimable calls occur while document.hidden is true, verified in a test toggling visibility.
  • Difficulty: S
  • Expected impact: Reduces unnecessary CPU/battery use on backgrounded tabs, which is common for a page users leave open to "watch" a stream.

K1NGD4VID avatar Aug 29 '26 18:08 K1NGD4VID

Hello and good day. I'm experienced and would love to resolve your issues in no time. Thank you

DeveloperEmmy avatar Aug 29 '26 19:08 DeveloperEmmy

@Akinsuyiphilip has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

i would love to work on this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Akinsuyiphilip to this issue.

Akinsuyiphilip avatar Aug 29 '26 19:08 Akinsuyiphilip

@Banx17 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

Good day team i will love to work on this issue for your team it matches my dev stack. please kindly assign.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Banx17 to this issue.

Banx17 avatar Aug 29 '26 19:08 Banx17

@enny791 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

Please assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @enny791 to this issue.

enny791 avatar Aug 29 '26 19:08 enny791

@omoh5 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

Please assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @omoh5 to this issue.

omoh5 avatar Aug 29 '26 19:08 omoh5

Congratulations, @omoh5! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

🧑‍💻 @omoh5: 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 🌊

drips-wave[bot] avatar Aug 29 '26 19:08 drips-wave[bot]

This issue has been completed by @omoh5 as part of the Stellar Wave Program's 10th Wave 🥳

😎 @omoh5: 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.

drips-wave[bot] avatar Oct 25 '26 09:10 drips-wave[bot]