Skip to content

fix(stats): adds placeholders to empty screen time cards - #3156

Open
seferturan wants to merge 1 commit into
mainfrom
fix/empty_screentime
Open

fix(stats): adds placeholders to empty screen time cards#3156
seferturan wants to merge 1 commit into
mainfrom
fix/empty_screentime

Conversation

@seferturan

@seferturan seferturan commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🎶 Notes 🎶

  • toHumanDuration returns an empty string for 0 minutes, so any period without watch history rendered blank stat cards and flat, unlabelled graphs
  • new toScreenTimeDuration renders zero as 0m. The daily chart's inline zero fallback goes through it now too, so there's one source of truth
  • graph items carry an isEmpty flag computed in getGraphItems, and PulseGraph swaps the chart for a placeholder instead of a zeroed axis
  • also covers partial gaps, not just fully empty weeks. Movie mode with only episodes watched used to blank the Movies card
  • tightened ScreenTimeDailyData to one entry per day, so labels / minutes / percentages can't drift apart. Kills the defensive index fallbacks in the chart
  • drawer gets all of it for free, it renders the same PulseGraph / PulseCell
  • new text_stats_no_screen_time key, plus specs for the zero formatting and the isEmpty flags

👀 Example 👀

With no data:
Screenshot 2026-08-19 at 12 25 44

`toHumanDuration` returns an empty string for 0 minutes, so any period
without watch time rendered blank stat cards and flat, unlabelled graphs.
Zero durations now read as "0m" and both graphs show an empty state.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@trakt-bot
trakt-bot Bot enabled auto-merge (rebase) August 19, 2026 10:26
@seferturan
seferturan requested a review from rectifyer August 19, 2026 10:28
@deepsource-io

deepsource-io Bot commented Aug 19, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 4c8dac5...a06721b on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Aug 19, 2026 10:28a.m. Review ↗
Code coverage Aug 19, 2026 10:28a.m. Review ↗

Code Coverage Summary

Language Line Coverage (Overall)
Aggregate
69.3%
[▲ up 0.1% from main]
Javascript
69.3%
[▲ up 0.1% from main]

➟ Additional coverage metrics may have been reported. See full coverage report ↗


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant