Skip to content

test(z-order): comprehensive stacking gate across every overlay + page - #92

Merged
mvalancy merged 2 commits into
devfrom
test/z-order-coverage
Jun 17, 2026
Merged

test(z-order): comprehensive stacking gate across every overlay + page#92
mvalancy merged 2 commits into
devfrom
test/z-order-coverage

Conversation

@mvalancy

Copy link
Copy Markdown
Member

What

A new z-order / stacking test category — the gap the user named: "simple z ordering of drop downs, modals, and alerts." It opens every floating overlay in the app and asserts (via document.elementFromPoint) that the overlay is genuinely the topmost element across its own area — catching the symptom where a dropdown/modal/alert renders behind the nav, a panel, or each other.

Coverage (desktop 1440 + phone 390)

  • Global chrome: graph-selector dropdown, user-menu dropdown
  • Workspace: all four filter dropdowns (Type/Status/Priority/Contributors)
  • Modals: work-item details, create-work-item, create-graph
  • Dropdowns nested inside a modal: the details modal's Type + Status dropdowns (highest-risk class — z-[99999] inside a backdrop-blur modal)
  • Graph canvas: node expand peek, node context menu (right-click)
  • Other pages: Ontology type-detail modal, Settings visual-quality dropdown, Admin create-user modal
  • Alerts: a toast firing over an open modal
  • Mobile: the More sheet above the bottom nav

Real bugs this found + fixes

  • Filter dropdowns trapped: ViewManager's filter bar backdrop-blur created a stacking context that pinned the dropdowns' z-50 behind the content. Fixed with an explicit relative z-50 on the bar.
  • Toast behind modal: raised the toast stack above modals so alerts are never hidden behind an open dialog.

Supporting changes

  • Stable data-testids on overlay panels that lacked them (graph-selector dropdown, user-menu dropdown, CustomDropdown menu, details Type/Status badges + dropdowns, Ontology/Admin modals, node context menu).
  • A harmless window.__notify hook to fire a toast on demand from tests.

Verification

  • tests/e2e/z-order.spec.ts — 18 pass / 2 skip (phone user-menu is off-canvas; desktop has no create FAB), 0 fail, on local dev.
  • npm run typecheck (web) — clean.
  • THE GATE: TEST_URL=http://localhost:3127 npm run test:smoke — 5/5.

🤖 Generated with Claude Code

mvalancy and others added 2 commits June 17, 2026 00:17
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) <noreply@anthropic.com>
The develop→dev rename left ci.yml and comprehensive-tests.yml triggering on a
branch that no longer exists, so no workflow ran on dev or its PRs. Update the
push/pull_request branch filters to [main, dev].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mvalancy
mvalancy merged commit 5bafeef into dev Jun 17, 2026
11 checks passed
@mvalancy
mvalancy deleted the test/z-order-coverage branch June 17, 2026 07:21
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

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.

1 participant