Skip to content

feat(pomodoro): implement pomodoro features and add more profile settings#35

Open
Niravanaa wants to merge 1 commit into
masterfrom
feat/15-pomodoro-page
Open

feat(pomodoro): implement pomodoro features and add more profile settings#35
Niravanaa wants to merge 1 commit into
masterfrom
feat/15-pomodoro-page

Conversation

@Niravanaa
Copy link
Copy Markdown
Member

Linked Issue

Closes #15
Closes #16
Closes #17
Closes #18

Type of Change

  • feat — new feature
  • fix — bug fix
  • refactor — code change that neither fixes a bug nor adds a feature
  • test — adding or updating tests
  • docs — documentation only

Summary

This PR expands the Pomodoro break minigame experience with multiple playable game modes, champion visibility, and stricter leaderboard submission rules. It also modularizes game UI into dedicated components for maintainability and improves draw-tracking accuracy for the circle game. Alongside feature delivery, test fixtures and page/action tests were updated to align with the latest schema and timer page data requirements.

Changes

  • Added new break minigames: Shakespeare typing sprint, circle draw accuracy game, and cursor survivor.
  • Kept and integrated existing minigames (aim, dino, bricks, flappy arrow) under a unified selector.
  • Refactored minigame rendering into modular components under a dedicated minigames folder.
  • Added shared minigame config/types modules and wired timer client to consume them.
  • Updated score submission logic to submit only when a score beats the player’s best of the day or all-time best.
  • Added champion snapshot support and champion display per game in the break minigame card.
  • Improved circle draw fidelity with pointer events, pointer capture, and interpolated point sampling.
  • Updated timer page data loading to include champion snapshot data.
  • Updated action tests for new leaderboard submission semantics.
  • Updated admin members test fixture to include required pomodoro preference fields after schema evolution.
  • Updated README badges/logo/links and removed outdated feature-set references.

How to Test

  1. Run pnpm lint, pnpm typecheck, and pnpm build.
  2. Run pnpm test:ci (or focused suites) and verify all tests pass.
  3. Launch the app, open the timer page, enter a break, and verify:
    • You can select/play each minigame.
    • Circle draw follows cursor smoothly.
    • Score is submitted only when beating daily/all-time best.
    • Champion list updates for the relevant game after qualifying submissions.

Screenshots / Recording

Before After
N/A Added in PR attachments

Checklist

  • Branch name follows <type>/<issue-number>-<description> convention
  • All commits follow Conventional Commits format with Refs: #N or Closes: #N footer
  • pnpm lint passes with zero warnings
  • pnpm typecheck passes
  • pnpm build succeeds
  • Tests added or updated for new/changed behaviour
  • Coverage thresholds pass locally (pnpm test:ci)
  • No commented-out code left behind
  • No console.log / debug statements left in production code
  • Self-reviewed — read through every line of this diff before opening

Notes for Reviewer

Please pay special attention to the leaderboard semantics change:

  • allTimeScore now behaves as best-ever score for ranking.
  • bestScore is treated as best score for the current day (reset behavior is date-driven via updatedAt in action logic).

Follow-up suggestion:

  • If desired, we can make daily-best explicit in schema with a dedicated dailyBestScore + dailyBestDate for clearer long-term semantics and reporting.

@Niravanaa Niravanaa self-assigned this Mar 21, 2026
@Niravanaa Niravanaa added enhancement New feature or request epic:pomodoro labels Mar 21, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
st-tools Ready Ready Preview, Comment May 31, 2026 9:37pm

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 67.41573% with 493 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/app/timer/_components/timer-client.tsx 54.64% 235 Missing and 53 partials ⚠️
src/app/actions/pomodoro.ts 73.66% 30 Missing and 29 partials ⚠️
...p/settings/profile/_components/appearance-form.tsx 71.72% 43 Missing and 11 partials ⚠️
src/app/actions/profile.ts 54.83% 22 Missing and 20 partials ⚠️
src/stores/timer-store.ts 76.92% 9 Missing and 9 partials ⚠️
src/components/layout/workspace-shell.tsx 73.68% 6 Missing and 9 partials ⚠️
...timer/_components/minigames/CircleDrawMinigame.tsx 50.00% 6 Missing and 3 partials ⚠️
src/lib/pomodoro.ts 97.29% 1 Missing and 2 partials ⚠️
src/app/timer/_components/emote-card.tsx 90.00% 0 Missing and 2 partials ⚠️
src/app/actions/emotes.ts 97.05% 0 Missing and 1 partial ⚠️
... and 2 more

❌ Your patch check has failed because the patch coverage (67.41%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Files with missing lines Coverage Δ
...rc/app/dashboard/_components/online-users-card.tsx 87.50% <100.00%> (-0.42%) ⬇️
src/app/dashboard/page.tsx 95.23% <ø> (ø)
.../profile/_components/pomodoro-preferences-form.tsx 100.00% <100.00%> (ø)
src/app/settings/profile/page.tsx 80.00% <ø> (ø)
...rc/app/timer/_components/minigames/AimMinigame.tsx 100.00% <100.00%> (ø)
...app/timer/_components/minigames/BricksMinigame.tsx 100.00% <100.00%> (ø)
.../app/timer/_components/minigames/ChampionsList.tsx 100.00% <100.00%> (ø)
...imer/_components/minigames/FlappyArrowMinigame.tsx 100.00% <100.00%> (ø)
...mer/_components/minigames/TypingSprintMinigame.tsx 100.00% <100.00%> (ø)
src/app/timer/_components/minigames/config.ts 100.00% <100.00%> (ø)
... and 14 more

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Niravanaa Niravanaa force-pushed the feat/15-pomodoro-page branch from 02c8c5b to 32c058d Compare May 31, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request epic:pomodoro

Projects

None yet

1 participant