Remove meeting category and slot kind from task/schedule system#268
Remove meeting category and slot kind from task/schedule system#268masa10-f wants to merge 1 commit into
Conversation
#267) Remove the unused "meeting" value from type definitions across the codebase: Backend changes: - Remove MEETING from TaskCategory enum - Remove meeting from TimeSlotSchema description Frontend changes: - Remove meeting from SlotKind type and related labels/colors - Remove meeting from TimeSlot.kind type - Remove meeting from getCategoryColor functions - Update fallback from meeting to light_work in schedule.ts Test changes: - Update tests to use ADMIN/REVIEW instead of MEETING category This consolidates the work type definitions and removes the meeting option since meetings are not included in the project workflow. https://claude.ai/code/session_01Cghpa5Bg6ZNPhwzmL4xS9G
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR removes the dedicated “meeting” category from weekly recurring tasks and the “meeting” slot kind from the scheduling system, updating backend enums, schemas, frontend types, and UI mappings to align with the new category model.
Changes:
- Backend: Removed
TaskCategory.MEETING, updatedTimeSlotSchema.kinddescription, and refactored tests to useADMIN/REVIEWcategories instead ofMEETING. - Frontend: Removed
'meeting'fromSlotKind,slotKindLabels,slotKindColors, and all category color maps; added color mappings for newmaintenanceandreviewcategories and adjusted fallbacks to'light_work'. - Type alignment: Synced frontend
TimeSlot/SlotKindunions with the backend’s documented slot kinds (study,focused_work,light_work).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/web/src/types/ai-planning.ts | Aligns the TimeSlot.kind union with the remaining valid slot kinds, removing 'meeting' from the type surface used by AI planning. |
| apps/web/src/constants/schedule.ts | Removes 'meeting' from the SlotKind type and related label/color maps, and updates logging/fallback behavior to default to 'light_work'. |
| apps/web/src/app/weekly-tasks/page.tsx | Drops the meeting category color and adds color mappings for maintenance and review so the UI reflects the expanded backend categories. |
| apps/web/src/app/ai-planning/page.tsx | Removes the obsolete meeting category color entry to match the updated TaskCategory enum. |
| apps/api/src/humancompiler_api/models.py | Removes the MEETING member from TaskCategory and updates the TimeSlotSchema.kind field description to no longer advertise meeting as a valid value. |
| apps/api/tests/test_weekly_recurring_tasks.py | Updates fixtures and filter tests to use REVIEW and ADMIN instead of MEETING, but still contains one remaining test case (test_weekly_recurring_task_api_endpoints) that uses TaskCategory.MEETING, which will now fail because that enum member no longer exists. |
Notable issue (blocking):
- In
apps/api/tests/test_weekly_recurring_tasks.py,test_weekly_recurring_task_api_endpointsstill sets"category": TaskCategory.MEETING, butTaskCategory.MEETINGhas been removed fromTaskCategory. This will break the test suite and should be updated to a valid category such asTaskCategory.ADMINorTaskCategory.REVIEW(and, optionally, adjust the test title/description strings if you no longer want them to describe a meeting).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """Test getting weekly recurring tasks with filters.""" | ||
| # Create tasks with different categories and statuses | ||
| active_meeting_task = weekly_recurring_task_service.create_weekly_recurring_task( | ||
| active_admin_task = weekly_recurring_task_service.create_weekly_recurring_task( |
There was a problem hiding this comment.
Variable active_admin_task is not used.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd55eed485
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| class TaskCategory(str, Enum): | ||
| """Weekly recurring task category enum""" | ||
|
|
||
| MEETING = "meeting" | ||
| STUDY = "study" | ||
| EXERCISE = "exercise" | ||
| HOBBY = "hobby" |
There was a problem hiding this comment.
Add migration/backfill for removed TaskCategory
Removing the MEETING enum value from TaskCategory means any existing DB rows with category='meeting' will fail to hydrate through SQLAlchemy’s enum mapping (the category fields in models.py use SQLEnum(TaskCategory, ...)). In deployments with historical meeting tasks, reads (e.g., weekly recurring task listings) will raise a LookupError/validation error and 500. The commit doesn’t include a migration/backfill to rewrite existing rows, so this breaks existing data unless handled elsewhere.
Useful? React with 👍 / 👎.
|
🚀 Preview Environment Deployed! |
Description
This PR removes the "meeting" category from the weekly recurring task system and the "meeting" slot kind from the schedule/time slot system. The changes consolidate task categorization by removing the dedicated meeting category and updating related UI components and type definitions accordingly.
Type of Change
Changes Made
Backend Changes
MEETING = "meeting"enum value fromTaskCategoryinmodels.pyTimeSlotSchemafield description to remove "meeting" from the list of valid slot kindsTaskCategory.REVIEWinstead ofTaskCategory.MEETINGTaskCategory.ADMINinstead ofTaskCategory.MEETINGfor filtering testsFrontend Changes
getCategoryColor()inai-planning/page.tsxgetCategoryColor()inweekly-tasks/page.tsxweekly-tasks/page.tsxSlotKindtype definition inschedule.tsto remove 'meeting' optionslotKindLabelsandslotKindColorsconstantsgetSlotKindLabel()andgetSlotKindColor()functionsTimeSlotinterface inai-planning.tsto remove 'meeting' from the kind union typeRelated Issues
Closes #
Testing
Test Cases
Test Coverage
Breaking Changes
Details:
MEETINGenum value has been removed fromTaskCategory. Any existing code or data usingTaskCategory.MEETINGwill need to be migrated to use alternative categories (e.g.,ADMIN,REVIEW).'meeting'slot kind has been removed from theSlotKindtype. Any time slots previously usingkind: 'meeting'should be updated to use'light_work'or another appropriate kind.Deployment Notes
Details:
category = 'meeting'should be migrated to an appropriate alternative category (recommend'admin'or'review'based on context).kind = 'meeting'should be migrated to'light_work'or another appropriate kind.Documentation
Checklist
https://claude.ai/code/session_01Cghpa5Bg6ZNPhwzmL4xS9G