Skip to content

Conversation

Copy link

Copilot AI commented Sep 28, 2025

Adds configurable time increments (15, 30, or 60 minutes) to enable more accurate and detailed time tracking, especially for users who switch tasks frequently.

Changes Made

New Time Increment Selector

  • Added a dropdown selector allowing users to choose between 1 hour, 30 minutes, or 15 minutes
  • Positioned prominently below the title for easy access
  • Dynamically updates the chart granularity in real-time

Dynamic Chart Generation

  • 1 hour: 24 slices (original functionality)
  • 30 minutes: 48 slices for half-hour precision
  • 15 minutes: 96 slices for detailed quarter-hour tracking

Smart Time Labeling

  • Hours display as "1AM", "2PM" (unchanged for 1-hour increment)
  • Sub-hour intervals show as "1:15AM", "2:30PM" with proper minute formatting
  • Clock face maintains 24-hour markers for consistent reference points

Enhanced Duration Display

  • Automatically formats mixed durations: "1 hour 30 minutes", "45 minutes", "2 hours 15 minutes"
  • Handles pluralization correctly for both hours and minutes
  • Updates time range displays in the summary section

Preserved Functionality

  • All existing features work seamlessly: drag selection, color coding, labeling
  • Backward compatibility maintained - defaults to 1-hour increment
  • State properly resets when switching between increments
  • Tooltip and summary generation adapts to selected increment

Implementation Details

The solution dynamically calculates the total number of slices as 24 × (60 / timeIncrement), ensuring the chart adapts correctly to each precision level. Time labels are generated using a smart formatting function that shows minutes only when necessary, maintaining clean readability across all increments.

All slice-based calculations, duration formatting, and range merging logic has been updated to work with variable slice counts while preserving the existing user experience.

Screenshots

Time Increment Selector:
Time Increment Options

30-Minute Precision:
30 Minutes

15-Minute Precision:
15 Minutes

The visual difference in granularity is clear - users can now choose the level of detail that best fits their workflow, from broad hourly overviews to precise 15-minute intervals.

Original prompt

The current chart segments the day into hourly slices. Allowing users to choose smaller increments (e.g., 15 or 30 minutes) would enable more accurate and detailed time tracking, especially for people who switch tasks frequently.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Sep 28, 2025

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

Project Deployment Preview Comments Updated (UTC)
daychart Ready Ready Preview Comment Sep 28, 2025 4:44am
time-tracker Ready Ready Preview Comment Sep 28, 2025 4:44am
time-tracker-qdcw Ready Ready Preview Comment Sep 28, 2025 4:44am

Copilot AI changed the title [WIP] The current chart segments the day into hourly slices. Allowing users to choose smaller increments (e.g., 15 or 30 minutes) would enable more accurate and detailed time tracking, especially for people who switch tasks frequently. Add support for 15 and 30-minute time increments Sep 28, 2025
Copilot AI requested a review from omarraf September 28, 2025 04:31
Copilot finished work on behalf of omarraf September 28, 2025 04:31
Copy link
Owner

@omarraf omarraf left a comment

Choose a reason for hiding this comment

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

I think it would be better for there only to be one mode instead of 3. I think the 15 minute slices is a little to much. Instead, it'd be nicer if there were 24 sections, but dragging across the chart doesn't increment by 1hr, it increments by 5 minutes, and users can decide themselves how long they want the chunk to be @copilot

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.

2 participants