home and stats nits: wording, border, sparse chart#652

open2
main
621
opened11h agobyMMalek Gara-Hellal
View on GitHubTwo-way sync enabledPR last imported 7h ago

Refs #621 (the desktop nits; the phone ones are deferred to v2). from the ui audit:

  • release cards: the cover tile placeholder keeps a real border on the grey light-mode page (it used an outline that vanished), and 'asked lyterion' now reads 'requested'
  • made for you: the full description is set as a tooltip, and the card label chip is opaque so it stays readable on the dither
  • stats: when you pick a range longer than 7 days and fewer than 3 days have listening, the chart is shorter and says 'only N day(s) of M so far · this fills in as you listen' instead of a nearly empty tall chart. a day with only a short play now counts as a listening day (the server floors it at 1 minute), so it never says 0 days next to a streak. the range tabs are taller (they were 25 px).

home and stats, before and after (dark, light):

e2e: the releases matcher and a border check, the sparse chart sentence and the tab height. not done: moving made for you and jump back in above the purchase actions (phone only, v2). the mock library has no releases, so the release card border and the 'requested' text are covered by the e2e only, not by a screenshot.

Checks

1 failing · 12 successful · 9 skipped
Some checks failed

Failing1

96c6789
Synced from GitHub

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

External image Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3246a36f-0b7a-4896-ab1e-29526afb9b57
External image Commits

Reviewing files that changed from the base of the PR and between e7df5c1b03272ada24d4bac9469c91cd3ca2bf74 and 96c67892a1f7f68d7e8a9a16bff62e2b50406dba.

External image Files ignored due to path filters: 8

  • docs/home-nits-after-dark.png is excluded by !**/*.png
  • docs/home-nits-after-light.png is excluded by !**/*.png
  • docs/home-nits-before-dark.png is excluded by !**/*.png
  • docs/home-nits-before-light.png is excluded by !**/*.png
  • docs/stats-nits-after-dark.png is excluded by !**/*.png
  • docs/stats-nits-after-light.png is excluded by !**/*.png
  • docs/stats-nits-before-dark.png is excluded by !**/*.png
  • docs/stats-nits-before-light.png is excluded by !**/*.png
External image Files selected for processing: 8

  • apps/api/src/stats.test.ts
  • apps/api/src/stats.ts
  • apps/player/src/components/day-chart.tsx
  • apps/player/src/components/mix-row.tsx
  • apps/player/src/components/release-card.tsx
  • apps/player/src/pages/stats.tsx
  • e2e/releases.e2e.ts
  • e2e/stats.e2e.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Synced from GitHub
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review✅ Completed 2026-11-19T16:37:07.149406Zbd5cb83PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Cchatgpt-codex-connectorBotreviewed · 1 inline thread11h ago
Synced from GitHub

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd5cb83bb9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

e2e/stats.e2e.tsline 41Outdated · bd5cb83Open thread
……@@ -38,6 +38,9 @@ test("stats show what you played, forgotten favourites make a playlist, and the
3838 await chart.focus();
3939 await page.keyboard.press("End");
4040 await expect(chart).toHaveAttribute("aria-valuetext", /: \d[\d,]* minutes?$/);
41+ await expect(page.getByText(/^only 1 day of 30 so far/)).toBeVisible();

P2 Badge Avoid hard-coding the sparse day count

When this test starts within 39 minutes after local midnight, its 40 records posted at now - i * 60_000 span two local dates, so the chart correctly reports 2 listened days and this exact assertion fails. Anchor the test records to one date or assert the sparse message without fixing the count.

Useful? React with 👍 / 👎.

ran it all. build, bun run size (156.9 of 161 KB), bun run colors, biome ci clean. home, stats, releases, cls pass one at a time. the new asserts in e2e/releases.e2e.ts and e2e/stats.e2e.ts fail on a clean origin/main build and pass here. a11y had 2 flaky fails in the full run (landmarks, focus return) that pass alone, unrelated.

fine

  • release card: rendered it with a throwaway spec (follow Night Owls). border is 1px on the cover in light (rgb(197,197,197)) and dark (rgb(38,38,38)), still 160x160 border-box, so RELEASE_CARD_HEIGHT and the virtualization math are untouched. dark edge is faint but there
  • 'requested' was the only 'asked lyterion' left in apps, e2e, docs
  • tabs: group-data-[orientation=horizontal]/tabs:h-9 is only on the stats list. the only other TabsList is settings, which has its own h-auto override, and the coarse pointer h-auto in packages/ui stays. tab now ~35px
  • DayChart is only used on stats. sparse is correct at the edges (7 day range never sparse, 3 listening days not sparse), days are bucketed server side by the user's tz so the count matches the bars. sentence reads 'only 1 day of 30 so far', singular/plural ok through plural. cls spec doesnt visit /stats, but the height only flips when data arrives, same as the old tall chart
  • opaque chip reads fine on the dither in the light screenshot

should fix

  • src/components/day-chart.tsx counts days with minutes > 0 but minutes are Math.rounded server side, so a day with a 20s play is 0. a range with only a short play shows 'only 0 days of 30' next to a streak of 1 day. count the days by plays instead, or floor each listening day at 1 minute
  • e2e/stats.e2e.ts: the 40 plays are now - i * 60_000, so a run in the first 40 min after midnight splits across two days and only 1 day flakes
  • mix-row.tsx: title is hover only, so touch and keyboard still cant read the cut text (screen readers get the full text anyway since line-clamp is visual). also the pr body says tooltip 'when it is cut off' but it is always set. fine for a desktop nit, a tap to expand would close the issue properly

unverified visually

  • 'requested' text and the made for you tooltip are in no screenshot. both after-dark and after-light home shots show the new border only on recently added covers, not release cards. the made for you chip is only in the light shot, dark chip contrast was not shown (opaque bg-background so should be fine)
  • issue also asked for y scale / day ticks on the chart, not done, the sentence covers the 'say something' part

verdict: approve

Added 2 commits

  • fix(player): home and stats nits2902217
  • fix(stats): count short play days96c6789