Skip to content

Add time-tracking feature (#2890)#3204

Open
anshul23102 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
anshul23102:feature/time-tracking
Open

Add time-tracking feature (#2890)#3204
anshul23102 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
anshul23102:feature/time-tracking

Conversation

@anshul23102

Copy link
Copy Markdown
Contributor

Summary

Implements comprehensive time-tracking functionality for devtrack, resolving issue #2890. Users can now create tasks, start/stop timers with real-time elapsed display, view session history, and see aggregated time logged over the past 7 days via a dashboard chart widget.

Changes

  • Database: Supabase migration adding tasks and time_entries tables with proper foreign key constraints and indexes for efficient user_id and date-based queries.
  • API Routes: Five new Next.js API routes handling task CRUD, time entry creation with server-side duration calculation, and daily summary aggregation. All endpoints include authentication via NextAuth and authorization checks to prevent cross-user data access.
  • Frontend Components:
    • TaskTimeTracker.tsx: Full-featured timer component with start/stop controls, session history, localStorage-based persistence across page refreshes, and per-task deletion.
    • DailyTimeWidget.tsx: Dashboard widget displaying 7-day bar chart of logged minutes with error states and empty state handling.
  • Dashboard Integration: Added new widget types to the dashboard registry and integrated both components into the goals section with responsive layout.

Implementation Details

  • Timer state persists via localStorage using ISO 8601 timestamps, automatically resuming on page refresh.
  • Duration always calculated server-side from start/end timestamps to prevent client-side manipulation.
  • All API endpoints enforce user-based authorization to ensure users can only access/modify their own data.
  • Responsive design follows devtrack's existing CSS variable system.

Closes #2890

…gets.

Adds complete time-tracking functionality including:
- Supabase migration for tasks and time_entries tables with proper indexes
- API routes for task CRUD and time entry management with server-side duration calculation
- TaskTimeTracker component with start/stop timer, session history, and localStorage persistence across page refreshes
- DailyTimeWidget showing 7-day aggregated time logged as a bar chart
- Dashboard integration with new widget types and responsive layout
@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature labels Jul 13, 2026
@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) labels Jul 13, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@github-actions github-actions Bot added the type:performance GSSoC type bonus: performance (+15 pts) label Jul 13, 2026
@anshul23102

Copy link
Copy Markdown
Contributor Author

Hey, requesting a review for this time-tracking feature implementation. The code covers database schema, API endpoints with proper authentication/authorization checks, and full frontend components with localStorage persistence.

CI checks are in progress. Let me know if you have any feedback on the approach or implementation details.

Some potentially relevant labels for tracking: enhancement, type:feature (given the new feature scope)

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

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(time-tracking): add per-task time logging with session history

1 participant