Repository navigation
feat: Smart Availability Solver — find times for everyone - #34
Merged
Merged
Conversation
- Add GET /api/v1/projects/:id/availability-solver endpoint - Query Microsoft Graph calendarview API for engineer free/busy data - 5-minute cache for calendar data to respect Graph API rate limits - Find windows of session_length_minutes where all engineers are free - Exclude existing time blocks to prevent double-scheduling - Add AvailabilitySolverModal component with loading/error/empty states - Show 'Find a Time for Everyone' button when project has ≥2 engineers - One-click block creation from solver suggestions (prefills AddTimeBlockModal) - Graceful degradation when engineers lack calendar connections - Add Zod schema for query params (from, to, limit) - Add shared types: AvailabilitySuggestion, AvailabilitySolverResponse
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.
Summary
Implements issue #16 — Smart Availability Solver: Find Times for Everyone.
Backend
New endpoint:
GET /api/v1/projects/:id/availability-solverfrom(ISO datetime),to(ISO datetime),limit(max suggestions)time_block_engineers/calendarviewfor busy intervalssession_length_minuteswhere ALL engineers are freeengineers_without_calendararrayNew utility:
fetchCalendarBusyIntervals()inmicrosoftCalendar.ts/me/calendarviewwith pagination supportshowAs: 'free')Frontend
AvailabilitySolverModal — new component showing suggested time slots
"Find a Time for Everyone" button on ProjectDetailPage
One-click block creation — clicking "Create Block" on a suggestion:
Shared
AvailabilitySuggestionandAvailabilitySolverResponsetypesavailabilitySolverQuerySchemaZod validation for query paramsAvailabilitySolverQuerycontract typeAcceptance Criteria
Closes #16