From f1e3ad251ce3b0480b4b5834601f9924366a4cea Mon Sep 17 00:00:00 2001 From: Matthew Valancy Date: Wed, 17 Jun 2026 00:17:46 -0700 Subject: [PATCH 1/2] test(z-order): comprehensive stacking gate across every overlay + page Adds tests/e2e/z-order.spec.ts (@zorder) + tests/helpers/zorder.ts: an elementFromPoint-based auditor that opens every floating overlay and asserts it is genuinely the topmost element across its area. Covers, on desktop and phone: the graph-selector + user-menu dropdowns, all four workspace filter dropdowns, the work-item details / create-work-item / create-graph modals, the Type/Status dropdowns nested INSIDE the details modal, the on-canvas node expand peek, the node context menu, the Ontology type-detail modal, the Settings visual-quality dropdown, the Admin create-user modal, toasts firing over an open modal, and the mobile More sheet. Real stacking bugs this class found and fixes: - ViewManager filter bar: backdrop-blur created a stacking context that trapped the filter dropdowns' z-50 behind the content; lift with explicit relative z-50 on the bar. - Toasts (NotificationContext): raised above modals so an alert is never hidden behind an open dialog. Adds stable data-testids to overlay panels that lacked them (graph-selector dropdown, user-menu dropdown, CustomDropdown menu, details Type/Status badges+dropdowns, Ontology/Admin modals, node context menu) plus a harmless window.__notify test hook to fire a toast on demand. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/components/AdminUserManagement.tsx | 2 +- .../web/src/components/CustomDropdown.tsx | 2 +- packages/web/src/components/GraphSelector.tsx | 1 + .../InteractiveGraphVisualization.tsx | 1 + packages/web/src/components/UserSelector.tsx | 2 +- packages/web/src/components/ViewManager.tsx | 5 +- .../src/components/WorkItemDetailsModal.tsx | 6 +- .../web/src/contexts/NotificationContext.tsx | 14 +- packages/web/src/pages/Ontology.tsx | 2 +- packages/web/src/pages/Settings.tsx | 24 +- tests/e2e/z-order.spec.ts | 289 ++++++++++++++++++ tests/helpers/zorder.ts | 92 ++++++ 12 files changed, 420 insertions(+), 20 deletions(-) create mode 100644 tests/e2e/z-order.spec.ts create mode 100644 tests/helpers/zorder.ts diff --git a/packages/web/src/components/AdminUserManagement.tsx b/packages/web/src/components/AdminUserManagement.tsx index cb5e93ef..31752e08 100644 --- a/packages/web/src/components/AdminUserManagement.tsx +++ b/packages/web/src/components/AdminUserManagement.tsx @@ -661,7 +661,7 @@ export function AdminUserManagement() { {/* Create User Modal */} {showCreateUser && (
-
+

Create New User

diff --git a/packages/web/src/components/CustomDropdown.tsx b/packages/web/src/components/CustomDropdown.tsx index c787163e..a13982d5 100644 --- a/packages/web/src/components/CustomDropdown.tsx +++ b/packages/web/src/components/CustomDropdown.tsx @@ -78,7 +78,7 @@ export function CustomDropdown({ {/* Dropdown Menu */} {isOpen && ( -
+
{options.map((option) => (