From 2db23cec7ad18896d4b0180f5897b658d474a3dd Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 29 Apr 2026 13:14:17 -0400 Subject: [PATCH 1/5] refactor(events): turn EventSlideOver into a centered modal with auto-save MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User feedback: the right-edge slide-over panel pinned its action buttons to a thin floor band where the destructive ghost-style Delete button was functionally invisible against the dark surface. Save / Cancel / Delete all sat in the same floor strip, isolated from the form content. This refactor changes the surface and the commit model. ## Centered modal, not slide-over Backdrop dim covers the whole viewport; the panel sits centered with a 12px corner radius and a soft shadow. The form scrolls internally when content overflows the viewport (max-height: calc(100vh - 2.5rem)). File kept as `EventSlideOver.vue` to avoid touching the three consumers (CalendarView, HomeView, ToolCallCard). ## Action buttons removed; close = save - Save button: gone. Auto-save fires when the user closes via X, Esc, backdrop click, or pressing Enter inside a text field. - Cancel button: gone. Esc / X / backdrop click already cover dismiss; a labeled "Cancel" was redundant. - Delete button: moved to the header as a Trash2 icon (edit mode only). Click → header swaps to inline confirm "Delete this event? [Yes, delete] [No]" — same two-step flow, just relocated. Esc during the confirm cancels back to edit mode rather than closing the modal, giving the user a clear way out of the destructive prompt. ## Validity-aware close All exit paths funnel through `attemptClose`: - Form valid → save (POST or PATCH), then close. - Form invalid in EDIT mode → discard the in-memory change and close, with a toast naming the missing field ("Title required — change discarded"). Keeps the user from silently corrupting an event. - Form invalid in CREATE mode → close silently. Nothing was committed; calling that out adds noise. Emit signature unchanged (close / created / updated / deleted), so the three consumers continue to work without edits. Co-Authored-By: Claude Opus 4.7 --- frontend/src/components/EventSlideOver.vue | 361 ++++++++++++--------- 1 file changed, 207 insertions(+), 154 deletions(-) diff --git a/frontend/src/components/EventSlideOver.vue b/frontend/src/components/EventSlideOver.vue index 02bd149..4943a9e 100644 --- a/frontend/src/components/EventSlideOver.vue +++ b/frontend/src/components/EventSlideOver.vue @@ -1,5 +1,5 @@