feat(calendar): route recurring-event delete through repeat-scope dialog#816
Merged
Conversation
Right-click → Delete on a recurring event now opens the same polished RepeatScopeModalComponent used by move-on-drag, with mode 'delete' (title "Delete repeat", three radios: Only this / This and following / All in series). The chosen scope is passed to the existing backend DeleteTask endpoint, which already handles all three semantics. Detection of recurring tasks uses task.repeatRule !== 'none' to match the move/resize flows. The earlier TaskDeleteModalComponent gated its scope radios on task.repeatSeriesId, but the backend response model never populates that field — so the old radios path was silently dead. The non-recurring confirm flow is unchanged. Cleanup: TaskDeleteModalComponent now only handles non-recurring deletes, so the scope-radio block, RepeatDeleteScope import, scope field, and hasSeries data flag are removed from it. Spec: docs/superpowers/specs/2026-05-14-calendar-delete-repeat-scope-design.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Routes deletion of recurring calendar events through the existing RepeatScopeModalComponent so users can choose Only this / This and following / All in series, while keeping one-off event deletion on the simple confirm modal. This aligns delete behavior with the existing move/resize recurring-event flows by detecting recurrence via task.repeatRule !== 'none'.
Changes:
- In
TaskPreviewModalComponent, detect recurring tasks viarepeatRuleand, for recurring deletes, openRepeatScopeModalComponentand forward the selected scope tocalendarService.deleteTask(...). - Simplify
TaskDeleteModalComponentto always delete with scope'this'and remove the now-dead “series scope” UI/data plumbing. - Remove the
hasSeriesflag,RepeatDeleteScopeusage, and scope radio block from the delete modal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/modals/task-preview-modal/task-preview-modal.component.ts | Routes recurring deletes through RepeatScopeModalComponent and calls deleteTask with the selected scope. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/modals/task-delete-modal/task-delete-modal.component.ts | Removes series-scope state and hardcodes non-recurring delete to scope 'this'. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/modals/task-delete-modal/task-delete-modal.component.html | Removes the now-dead scope radio UI from the non-recurring delete confirmation modal. |
Comment on lines
+6
to
+10
| import {CalendarBoardModel, CalendarTaskModel} from '../../../../models/calendar'; | ||
| import {CommonDictionaryModel} from 'src/app/common/models'; | ||
| import {TaskDeleteModalComponent} from '../task-delete-modal/task-delete-modal.component'; | ||
| import {RepeatScopeModalComponent} from '../repeat-scope-modal/repeat-scope-modal.component'; | ||
| import {RepeatDeleteScope} from '../../../../models/calendar'; |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
RepeatScopeModalComponentalready used by move-on-drag (mode'delete', title Delete repeat, three radios Only this / This and following / All in series). The chosen scope is passed to the existingDeleteTaskbackend endpoint, which already handles all three semantics.TaskDeleteModalComponentstill shows the simple Are you sure... confirm.task.repeatRule !== 'none', matching the move / resize flows. The previoustask.repeatSeriesIdcheck was always false because the backendCalendarTaskResponseModelnever populates that field — so the old scope-radios path under*ngIf="data.hasSeries"was silently dead. This PR fixes that drift.RepeatDeleteScopeimport,scopefield, andhasSeriesdata flag fromTaskDeleteModalComponent.Spec:
docs/superpowers/specs/2026-05-14-calendar-delete-repeat-scope-design.mdTest plan
Delete repeatdialog with the three radios.Delete task / Are you sure...confirm; no radios.🤖 Generated with Claude Code