From 5c86f7919283ea71d68142a8b74d54daac81e53b Mon Sep 17 00:00:00 2001 From: Nathan Panchout Date: Fri, 6 Feb 2026 16:30:37 +0100 Subject: [PATCH] Refactor EventModal into section components (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🙈(tools) remove OpenSpec skills and commands from Git tracking Remove .claude/skills/openspec-*/ and .claude/commands/opsx/ from Git tracking while keeping them locally. Extends the previous cleanup (d24eed9) that handled the openspec/ directory. Co-Authored-By: Claude Opus 4.6 * ✨(front) add EventModal section components and useEventForm hook Extract modal sections into dedicated components (DateTimeSection, RecurrenceSection, LocationSection, VideoConferenceSection, AttendeesSection, DescriptionSection, InvitationResponseSection, RemindersSection, StatusSection, AttachmentsSection) with shared SectionRow and SectionPill layout components. Add useEventForm hook to centralize form state management. Co-Authored-By: Claude Opus 4.6 * ♻️(front) refactor EventModal to use extracted sections Simplify EventModal by delegating to section components and useEventForm hook. Replace alert() with addToast() for error feedback, convert useCallback to useMemo for buildSummary in RecurrenceEditor, and add missing organizer dependency in useEventForm useEffect. Co-Authored-By: Claude Opus 4.6 * 💄(front) update scheduler styles for new modal design Rework SCSS for EventModal, AttendeesInput, RecurrenceEditor, and Scheduler. Move inline styles to CSS classes. Update globals and frontend dependencies. Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- .claude/commands/opsx/apply.md | 152 ---- .claude/commands/opsx/archive.md | 157 ----- .claude/commands/opsx/bulk-archive.md | 242 ------- .claude/commands/opsx/continue.md | 114 --- .claude/commands/opsx/explore.md | 174 ----- .claude/commands/opsx/ff.md | 94 --- .claude/commands/opsx/new.md | 69 -- .claude/commands/opsx/onboard.md | 525 -------------- .claude/commands/opsx/sync.md | 134 ---- .claude/commands/opsx/verify.md | 164 ----- .claude/skills/openspec-apply-change/SKILL.md | 156 ----- .../skills/openspec-archive-change/SKILL.md | 114 --- .../openspec-bulk-archive-change/SKILL.md | 246 ------- .../skills/openspec-continue-change/SKILL.md | 118 ---- .claude/skills/openspec-explore/SKILL.md | 290 -------- .claude/skills/openspec-ff-change/SKILL.md | 101 --- .claude/skills/openspec-new-change/SKILL.md | 74 -- .claude/skills/openspec-onboard/SKILL.md | 529 -------------- .claude/skills/openspec-sync-specs/SKILL.md | 138 ---- .../skills/openspec-verify-change/SKILL.md | 168 ----- .gitignore | 2 + src/frontend/apps/calendars/package.json | 4 +- .../components/scheduler/AttendeesInput.scss | 196 ++---- .../components/scheduler/AttendeesInput.tsx | 232 +++---- .../components/scheduler/EventModal.scss | 252 +++++-- .../components/scheduler/EventModal.tsx | 650 +++++------------- .../scheduler/RecurrenceEditor.scss | 142 ++-- .../components/scheduler/RecurrenceEditor.tsx | 469 +++++++------ .../components/scheduler/Scheduler.scss | 240 +++---- .../AttachmentsSection.tsx | 110 +++ .../event-modal-sections/AttendeesSection.tsx | 45 ++ .../event-modal-sections/DateTimeSection.tsx | 72 ++ .../DescriptionSection.tsx | 44 ++ .../InvitationResponseSection.scss | 36 + .../InvitationResponseSection.tsx | 81 +++ .../event-modal-sections/LocationSection.tsx | 42 ++ .../RecurrenceSection.tsx | 36 + .../event-modal-sections/RemindersSection.tsx | 118 ++++ .../event-modal-sections/SectionPill.scss | 46 ++ .../event-modal-sections/SectionPill.tsx | 25 + .../event-modal-sections/SectionPills.tsx | 34 + .../event-modal-sections/SectionRow.scss | 113 +++ .../event-modal-sections/SectionRow.tsx | 87 +++ .../event-modal-sections/StatusSection.tsx | 113 +++ .../VideoConferenceSection.tsx | 56 ++ .../scheduler/hooks/useEventForm.ts | 380 ++++++++++ .../calendar/components/scheduler/types.ts | 40 +- .../src/features/i18n/translations.json | 135 +++- .../apps/calendars/src/styles/globals.scss | 26 +- src/frontend/yarn.lock | 18 +- 50 files changed, 2644 insertions(+), 4959 deletions(-) delete mode 100644 .claude/commands/opsx/apply.md delete mode 100644 .claude/commands/opsx/archive.md delete mode 100644 .claude/commands/opsx/bulk-archive.md delete mode 100644 .claude/commands/opsx/continue.md delete mode 100644 .claude/commands/opsx/explore.md delete mode 100644 .claude/commands/opsx/ff.md delete mode 100644 .claude/commands/opsx/new.md delete mode 100644 .claude/commands/opsx/onboard.md delete mode 100644 .claude/commands/opsx/sync.md delete mode 100644 .claude/commands/opsx/verify.md delete mode 100644 .claude/skills/openspec-apply-change/SKILL.md delete mode 100644 .claude/skills/openspec-archive-change/SKILL.md delete mode 100644 .claude/skills/openspec-bulk-archive-change/SKILL.md delete mode 100644 .claude/skills/openspec-continue-change/SKILL.md delete mode 100644 .claude/skills/openspec-explore/SKILL.md delete mode 100644 .claude/skills/openspec-ff-change/SKILL.md delete mode 100644 .claude/skills/openspec-new-change/SKILL.md delete mode 100644 .claude/skills/openspec-onboard/SKILL.md delete mode 100644 .claude/skills/openspec-sync-specs/SKILL.md delete mode 100644 .claude/skills/openspec-verify-change/SKILL.md create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/AttachmentsSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/AttendeesSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/DateTimeSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/DescriptionSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/InvitationResponseSection.scss create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/InvitationResponseSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/LocationSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/RecurrenceSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/RemindersSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/SectionPill.scss create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/SectionPill.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/SectionPills.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/SectionRow.scss create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/SectionRow.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/StatusSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/event-modal-sections/VideoConferenceSection.tsx create mode 100644 src/frontend/apps/calendars/src/features/calendar/components/scheduler/hooks/useEventForm.ts diff --git a/.claude/commands/opsx/apply.md b/.claude/commands/opsx/apply.md deleted file mode 100644 index 645bbdb..0000000 --- a/.claude/commands/opsx/apply.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -name: "OPSX: Apply" -description: Implement tasks from an OpenSpec change (Experimental) -category: Workflow -tags: [workflow, artifacts, experimental] ---- - -Implement tasks from an OpenSpec change. - -**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. - -**Steps** - -1. **Select the change** - - If a name is provided, use it. Otherwise: - - Infer from conversation context if the user mentioned a change - - Auto-select if only one active change exists - - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select - - Always announce: "Using change: " and how to override (e.g., `/opsx:apply `). - -2. **Check status to understand the schema** - ```bash - openspec status --change "" --json - ``` - Parse the JSON to understand: - - `schemaName`: The workflow being used (e.g., "spec-driven") - - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) - -3. **Get apply instructions** - - ```bash - openspec instructions apply --change "" --json - ``` - - This returns: - - Context file paths (varies by schema) - - Progress (total, complete, remaining) - - Task list with status - - Dynamic instruction based on current state - - **Handle states:** - - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` - - If `state: "all_done"`: congratulate, suggest archive - - Otherwise: proceed to implementation - -4. **Read context files** - - Read the files listed in `contextFiles` from the apply instructions output. - The files depend on the schema being used: - - **spec-driven**: proposal, specs, design, tasks - - Other schemas: follow the contextFiles from CLI output - -5. **Show current progress** - - Display: - - Schema being used - - Progress: "N/M tasks complete" - - Remaining tasks overview - - Dynamic instruction from CLI - -6. **Implement tasks (loop until done or blocked)** - - For each pending task: - - Show which task is being worked on - - Make the code changes required - - Keep changes minimal and focused - - Mark task complete in the tasks file: `- [ ]` → `- [x]` - - Continue to next task - - **Pause if:** - - Task is unclear → ask for clarification - - Implementation reveals a design issue → suggest updating artifacts - - Error or blocker encountered → report and wait for guidance - - User interrupts - -7. **On completion or pause, show status** - - Display: - - Tasks completed this session - - Overall progress: "N/M tasks complete" - - If all done: suggest archive - - If paused: explain why and wait for guidance - -**Output During Implementation** - -``` -## Implementing: (schema: ) - -Working on task 3/7: -[...implementation happening...] -✓ Task complete - -Working on task 4/7: -[...implementation happening...] -✓ Task complete -``` - -**Output On Completion** - -``` -## Implementation Complete - -**Change:** -**Schema:** -**Progress:** 7/7 tasks complete ✓ - -### Completed This Session -- [x] Task 1 -- [x] Task 2 -... - -All tasks complete! Ready to archive this change. -``` - -**Output On Pause (Issue Encountered)** - -``` -## Implementation Paused - -**Change:** -**Schema:** -**Progress:** 4/7 tasks complete - -### Issue Encountered - - -**Options:** -1.