Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 29, 2025

  • Replace Categories_Recur with RecurringEventUpdateScope enum
  • Add comprehensive enum validation tests
  • Update backend service logic to handle enum values
  • Update frontend API and type definitions
  • Preserve backward compatibility with old type
  • Remove redundant enum test file (per code review feedback)

Changes Made

New Enum Definition

Created RecurringEventUpdateScope enum in @compass/core with human-readable values:

  • THIS_EVENT = "This Event" - Update only the selected event instance (new functionality)
  • THIS_AND_FOLLOWING_EVENTS = "This and Following Events" - Replaces "future"
  • ALL_EVENTS = "All Events" - Replaces "all"

Updated Type System

  • Modified Query_Event_Update interface to use the new enum
  • Updated backend service logic in getUpdateAction function to handle all three enum values
  • Updated frontend API and type definitions to use the enum instead of string literals

Backward Compatibility

  • Preserved the old Categories_Recur type for transition period
  • No breaking changes to existing functionality

Benefits

  1. Type Safety: Enum provides better IntelliSense and compile-time checking compared to string literals
  2. Clarity: Human-readable values like "This Event" are more intuitive than cryptic strings like "future"
  3. Extensibility: Easy to add new update scopes in the future
  4. Maintainability: Single source of truth for update scope values

Testing

  • Removed redundant standalone enum test file following code review feedback
  • All existing tests pass (core: 50/50, web: 176/176)
  • Manual verification: application loads and functions correctly

The enum is strategically placed in the @compass/core package to enable reuse across both frontend and backend packages, following the repository's architectural patterns.

Fixes #815.


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

@Copilot Copilot AI changed the title [WIP] modify recurring events update scope interface feat: replace Categories_Recur with RecurringEventUpdateScope enum Aug 29, 2025
@Copilot Copilot AI requested a review from victor-enogwe August 29, 2025 17:29
Copilot finished work on behalf of victor-enogwe August 29, 2025 17:29
@Copilot Copilot AI requested a review from victor-enogwe August 29, 2025 17:48
Copilot finished work on behalf of victor-enogwe August 29, 2025 17:48
@victor-enogwe victor-enogwe marked this pull request as ready for review August 29, 2025 18:50
@victor-enogwe victor-enogwe merged commit 43ce146 into main Aug 29, 2025
4 checks passed
@victor-enogwe victor-enogwe deleted the copilot/fix-815 branch August 29, 2025 19:23
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.

modify recurring events update scope interface
2 participants