Bug report
When a user opens a Week View Grid Event form and uses the Duplicate Event action, two related affordances break: the Duplicate Event menu item's Cmd+D tooltip renders behind the Event Form, and pressing Cmd+D duplicates the Event but also lets the underlying D view shortcut navigate back to Day View. This affects users editing existing Grid Events from Week View, especially on macOS where Cmd+D is the documented duplicate shortcut.
Where it happened
Route/screen: /week, Week View Timed Grid, existing Grid Event form opened from a clicked event.
Environment/account state: reported from Chrome on macOS against backend.compasscalendar.app/week; screenshot shows an authenticated Google-connected account.
Workflow
- In Week View, click an existing Grid Event so the Event Form opens.
- Open the form actions menu.
- Hover the
Duplicate Event menu item.
- Observe the Cmd+D tooltip.
- With the Event Form open from the Grid Event, press Cmd+D on macOS.
- The Event is duplicated, but the
D view shortcut also fires and redirects the user to Day View.
Expected outcome
The Duplicate Event tooltip should render above the Event Form/action menu stack so the shortcut hint is readable.
Cmd+D should only run the Event Form duplicate action while the form is open. It should not also trigger the global/view D shortcut or navigate away from Week View.
Screenshot
Diagnosis
Reproduction status: not re-run locally against the staging account, but the attached screenshot directly shows the tooltip layering failure, and static inspection found a likely propagation path for the shortcut failure.
Evidence:
docs/Acceptance/events.md Scenario 11 documents Cmd+D/Ctrl+D as the Event Form duplicate shortcut.
docs/Acceptance/shortcuts.md says shortcuts are context-aware and should not fire while the user is typing in a form field, with Cmd+K as the exception.
- The Duplicate Event menu item is rendered by
packages/web/src/views/Forms/EventForm/DuplicateMenuButton.tsx through packages/web/src/views/Forms/ActionsMenu/MenuItem.tsx.
MenuItem wraps action items in the shared tooltip system. TooltipContent computes zIndex as useGridMaxZIndex() + ZIndex.LAYER_3, but the Event Form stack uses Z_INDEX_FLOATING_FORM = ZIndex.MAX + ZIndex.LAYER_1 and the actions menu uses Z_INDEX_FLOATING_MENU = Z_INDEX_FLOATING_FORM + 1. A tooltip at roughly grid max + 3 can therefore sit below the floating form/menu layer, matching the screenshot.
packages/web/src/views/Forms/EventForm/EventForm.tsx registers useAppHotkey("Mod+D", ...) with EVENT_FORM_PLAIN_HOTKEY_OPTIONS and calls preventDefault() but does not call stopPropagation().
- The Someday form shortcut helper already uses a
stopPropagationWrapper for Mod+D in packages/web/src/views/Forms/SomedayEventForm/useSomedayFormShortcuts.ts, which is a nearby pattern for preventing parent/global shortcut handling.
packages/web/src/common/constants/shortcuts.constants.ts maps the Day view shortcut to d, so a hotkey library or global listener that treats Mod+D as also satisfying d could explain why duplication succeeds and then Day navigation fires.
Confidence: medium-high. The screenshot confirms the layering issue; the shortcut diagnosis is based on code inspection plus the reporter's observed behavior.
Related issue: possibly related to #1610 (Duplicate event doesn't work), but this appears distinct because duplication now succeeds and the remaining failure is shortcut propagation/navigation plus tooltip layering.
Likely fix
Start in the Event Form action menu/tooltip stack and the Event Form shortcut handler.
- For the tooltip, ensure action-menu tooltip content is layered above the floating Event Form and floating menu. Options include allowing
TooltipContent to accept an explicit z-index/layer for floating-form contexts, or making menu-item tooltips use a z-index above Z_INDEX_FLOATING_MENU.
- For Cmd+D, update the Event Form
Mod+D handler to stop propagation in addition to preventing default, following the Someday form's stopPropagationWrapper behavior. Preserve Cmd+D duplication behavior and do not suppress unrelated form shortcuts such as Mod+Enter or Delete.
- Add regression coverage around an existing Week Grid Event form: firing Cmd+D should call duplicate once and should not invoke view navigation to
/day.
Verification
- Start the frontend with
bun dev:web.
- In Week View, open an existing Grid Event form from the Timed Grid.
- Open the actions menu and hover
Duplicate Event; the Cmd+D tooltip should be fully visible above the form/menu.
- Press Cmd+D/Ctrl+D with the form open; the Event duplicates and the app remains on
/week.
- Run the focused web tests for the touched components/hooks, then
bun test:web or the relevant narrower package tests if the fix stays localized.
Bug report
When a user opens a Week View Grid Event form and uses the Duplicate Event action, two related affordances break: the Duplicate Event menu item's Cmd+D tooltip renders behind the Event Form, and pressing Cmd+D duplicates the Event but also lets the underlying
Dview shortcut navigate back to Day View. This affects users editing existing Grid Events from Week View, especially on macOS where Cmd+D is the documented duplicate shortcut.Where it happened
Route/screen:
/week, Week View Timed Grid, existing Grid Event form opened from a clicked event.Environment/account state: reported from Chrome on macOS against
backend.compasscalendar.app/week; screenshot shows an authenticated Google-connected account.Workflow
Duplicate Eventmenu item.Dview shortcut also fires and redirects the user to Day View.Expected outcome
The Duplicate Event tooltip should render above the Event Form/action menu stack so the shortcut hint is readable.
Cmd+D should only run the Event Form duplicate action while the form is open. It should not also trigger the global/view
Dshortcut or navigate away from Week View.Screenshot
Diagnosis
Reproduction status: not re-run locally against the staging account, but the attached screenshot directly shows the tooltip layering failure, and static inspection found a likely propagation path for the shortcut failure.
Evidence:
docs/Acceptance/events.mdScenario 11 documents Cmd+D/Ctrl+D as the Event Form duplicate shortcut.docs/Acceptance/shortcuts.mdsays shortcuts are context-aware and should not fire while the user is typing in a form field, with Cmd+K as the exception.packages/web/src/views/Forms/EventForm/DuplicateMenuButton.tsxthroughpackages/web/src/views/Forms/ActionsMenu/MenuItem.tsx.MenuItemwraps action items in the shared tooltip system.TooltipContentcomputeszIndexasuseGridMaxZIndex() + ZIndex.LAYER_3, but the Event Form stack usesZ_INDEX_FLOATING_FORM = ZIndex.MAX + ZIndex.LAYER_1and the actions menu usesZ_INDEX_FLOATING_MENU = Z_INDEX_FLOATING_FORM + 1. A tooltip at roughly grid max + 3 can therefore sit below the floating form/menu layer, matching the screenshot.packages/web/src/views/Forms/EventForm/EventForm.tsxregistersuseAppHotkey("Mod+D", ...)withEVENT_FORM_PLAIN_HOTKEY_OPTIONSand callspreventDefault()but does not callstopPropagation().stopPropagationWrapperforMod+Dinpackages/web/src/views/Forms/SomedayEventForm/useSomedayFormShortcuts.ts, which is a nearby pattern for preventing parent/global shortcut handling.packages/web/src/common/constants/shortcuts.constants.tsmaps the Day view shortcut tod, so a hotkey library or global listener that treats Mod+D as also satisfyingdcould explain why duplication succeeds and then Day navigation fires.Confidence: medium-high. The screenshot confirms the layering issue; the shortcut diagnosis is based on code inspection plus the reporter's observed behavior.
Related issue: possibly related to #1610 (
Duplicate event doesn't work), but this appears distinct because duplication now succeeds and the remaining failure is shortcut propagation/navigation plus tooltip layering.Likely fix
Start in the Event Form action menu/tooltip stack and the Event Form shortcut handler.
TooltipContentto accept an explicit z-index/layer for floating-form contexts, or making menu-item tooltips use a z-index aboveZ_INDEX_FLOATING_MENU.Mod+Dhandler to stop propagation in addition to preventing default, following the Someday form'sstopPropagationWrapperbehavior. Preserve Cmd+D duplication behavior and do not suppress unrelated form shortcuts such as Mod+Enter or Delete./day.Verification
bun dev:web.Duplicate Event; the Cmd+D tooltip should be fully visible above the form/menu./week.bun test:webor the relevant narrower package tests if the fix stays localized.