fix(monero-dashboard): repair the true-luck window label - #4386
Conversation
The pass that renamed displayDays to cappedWindowDays missed the third template literal. That branch fires whenever the window is at least 24h, which is the normal case, so it threw a ReferenceError that the enclosing catch turned into reset() - blanking both the luck factor and the window on the Estimated True Luck card rather than surfacing anything.
|
Warning Review limit reached
Next review available in: 26 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 6, 2026 10:18p.m. | Review ↗ | |
| Shell | Aug 6, 2026 10:18p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
One-line fix on
main.displayDaysis not defined.dashboard.js:900#4378's simplify pass renamed
displayDaystocappedWindowDaysand updated two of the three references. Main before that pass was correct:Why it matters
That branch is the
elseofdisplayHours < 24, so it fires whenever the mining window is at least a day, which is the normal case. TheReferenceErroris caught by the enclosingtry, which callsreset()and blanks the whole card:So "Estimated True Luck" shows
–for both the factor and the window, with nothing visible except a console error. The luck factor is computed and set correctly one line earlier, then thrown away.Verification
node --checkpasses. Scope-checked every identifier inupdateWindowLuckagainst its params, locals, and module-level declarations after stripping comments and string literals:displayDayswas the only undefined one, and no other reference to it or to the other locals the rename removed survives anywhere in the file.