Skip to content

feat(schedule-actions): add confirmation modal and mutation flow#1426

Merged
Assem-Uber merged 9 commits into
cadence-workflow:masterfrom
Assem-Uber:feat/schedule-actions-modal
Jul 2, 2026
Merged

feat(schedule-actions): add confirmation modal and mutation flow#1426
Assem-Uber merged 9 commits into
cadence-workflow:masterfrom
Assem-Uber:feat/schedule-actions-modal

Conversation

@Assem-Uber

@Assem-Uber Assem-Uber commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds the schedule-actions modal shell with confirmation flow, mutation, snackbar feedback, and query invalidation.
  • Mirrors the workflow-actions modal pattern: form slot, optional banner, submit/cancel, and error banner on API failure.

Changes

  • schedule-actions-modal/ — modal wrapper (900px width, mounts modal content)
  • schedule-actions-modal-content/ — react-hook-form + TanStack mutation, banner slot, initialFormValues support
  • schedule-actions.types.ts — remove unused formData from ScheduleActionFormProps

Testing

  • npm run test:unit:browser -- schedule-actions-modal-content (4 tests)
  • npm run test:unit:browser -- schedule-actions-modal (2 tests)

Stack

@Assem-Uber Assem-Uber changed the title feat(schedule-actions): add confirmation modal and mutation flow (PR2) feat(schedule-actions): add confirmation modal and mutation flow Jul 1, 2026
@Assem-Uber Assem-Uber force-pushed the feat/schedule-actions-modal branch from 322a5de to 7bbc971 Compare July 1, 2026 10:39
Assem-Uber and others added 5 commits July 1, 2026 15:28
Add schedule-actions modal shell and modal content with config-driven
warning banners, POST submission, cache invalidation, snackbar, and
error handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Assem-Uber Assem-Uber force-pushed the feat/schedule-actions-modal branch from 7bbc971 to c85b0f8 Compare July 1, 2026 13:37
@gitar-bot

gitar-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Implements the schedule-actions modal and mutation flow, incorporating robust validation and dynamic feature flagging. The race condition allowing early action triggering has been resolved.

✅ 1 resolved
Edge Case: Actions clickable before schedule loads, skipping runnable check

📄 src/views/schedule-actions/schedule-actions-menu/schedule-actions-menu.tsx:18-23 📄 src/views/schedule-actions/schedule-actions-menu/helpers/get-action-disabled-reason.ts:20-22
In schedule-actions-menu.tsx, getActionDisabledReason is called with actionRunnableStatus: schedule ? action.getRunnableStatus(schedule) : undefined. When the schedule is still loading (schedule undefined) but the enabled-config is 'ENABLED', getActionDisabledReason returns undefined (see get-action-disabled-reason.ts lines 20-22: if (!actionRunnableStatus) return undefined). This means the button is rendered enabled and clickable before the schedule has loaded, so the runnable-status gate (e.g. 'already paused' / 'not paused') is bypassed. A user could trigger Pause/Resume against a schedule whose real state hasn't been resolved yet. Impact is limited since the backend still validates, but consider disabling the actions (or omitting the menu) until schedule is available.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@Assem-Uber Assem-Uber merged commit bdcdc7c into cadence-workflow:master Jul 2, 2026
4 checks passed
@Assem-Uber Assem-Uber deleted the feat/schedule-actions-modal branch July 2, 2026 11:05
Assem-Uber added a commit that referenced this pull request Jul 2, 2026
## Summary

Mounts the schedule-actions popover and confirmation modal on the
schedule page tab bar. Completes the stacked schedule-actions UI started
in #1419 and #1426.
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.

2 participants