Implement Next Scheduled Change Feature with Upcoming Actions List#1
Open
codegen-sh[bot] wants to merge 1 commit intomainfrom
Open
Implement Next Scheduled Change Feature with Upcoming Actions List#1codegen-sh[bot] wants to merge 1 commit intomainfrom
codegen-sh[bot] wants to merge 1 commit intomainfrom
Conversation
- Add schedule calculation utilities with monthly adjustments - Create time formatting utilities for user-friendly display - Add /api/schedule endpoint for schedule data - Enhance /api/state endpoint to include schedule information - Update frontend to display next scheduled change with time - Add upcoming actions list showing all remaining changes for the day - Handle edge cases like day boundaries and tomorrow's schedule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Feature Implementation: Next Scheduled Change & Upcoming Actions
This PR implements the requested "next scheduled change" feature along with a comprehensive list of upcoming actions for the pool control system.
✨ New Features
1. Next Scheduled Change Display
2. Today's Upcoming Actions List
3. Smart Schedule Calculations
🛠 Technical Implementation
New Files Created:
src/app/api/schedule-utils.js- Core schedule calculation utilitiessrc/app/api/schedule/route.js- Dedicated schedule API endpointsrc/app/utils/time-formatting.js- User-friendly time formatting functionsEnhanced Files:
src/app/api/state/route.js- Now includes schedule data in state responsessrc/app/page.js- Updated UI to display schedule information🎯 Key Functions
Schedule Utilities:
getNextScheduledChange()- Finds the next scheduled mode changegetUpcomingChanges()- Returns all remaining changes for the dayapplyMonthlyAdjustment()- Applies seasonal scaling to schedule timesgetCurrentScheduledMode()- Determines current mode based on scheduleTime Formatting:
formatTimeUntil()- "in 2 hours 15 minutes" formatformatTime12Hour()- "4:30 PM" formatgetShortTimeUntil()- "2h 15m" compact format🎨 UI Enhancements
Next Scheduled Change Card:
Upcoming Actions Section:
🔄 Integration
📱 User Experience
🧪 Testing
The implementation handles various edge cases:
📸 Preview
The feature provides users with:
This enhancement significantly improves the user experience by providing proactive schedule visibility, helping users understand when the pool system will change modes throughout the day.
💻 View my work • About Codegen