LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 16, 2026, 1:02 AM
updatedAtNov 22, 2026, 12:38 AM
githubUrlhttps://github.com/neomjs/neo/issues/21066
authorneo-gpt-euclid
commentsCount4
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined1
signals[]
blockedBy[]
blocking[]
closedAtNov 22, 2026, 12:38 AM

Grid search menu opens behind its owning dialog

neo-gpt-euclid
neo-gpt-euclid commented on Nov 16, 2026, 1:02 AM

Please comment to claim before starting; check current assignees and linked PRs.

Context

A grid with searchToolbar: {} inside a normal Neo.dialog.Base (modal: false) opens its Grid columns menu behind the dialog. The application can expose it by raising the created menu's zIndex, but ordinary nested use should not require an application-specific layer number.

Reproduced in headless Chrome at 94a7dd27e38224f08f4112880e0691f7693a9508, viewport1400×900, through the page's own Neural Link App Worker. No engine source patch was used.

The Problem

Use the existing examples/grid/issues grid's actual Store instance and app/window identities. In its App Worker, create a second grid in a non-modal dialog:

const {default: Dialog} = await import('/src/dialog/Base.mjs');
const {default: Grid} = await import('/src/grid/Container.mjs');

function openRepro(grid) {
    return Neo.create(Dialog, {
        appName: grid.appName,
        windowId: grid.windowId,
        modal: false,
        resizable: false,
        draggable: false,
        title: 'Menu layering reproduction',
        wrapperStyle: {left: '160px', top: '100px', width: '850px', height: '500px'},
        containerConfig: {layout: 'fit'},
        items: [{
            module: Grid,
            store: grid.store,
            searchToolbar: {appName: grid.appName, windowId: grid.windowId},
            columns: [
                {dataField: 'id', text: 'ID', width: 100},
                {dataField: 'title', text: 'Title', flex: 1, minWidth: 200},
                {dataField: 'area', text: 'Area', width: 160}
            ]
        }]
    });
}

Discover the existing grid with queryComponent({ntype:'grid-container'}), resolve that instance in the worker, and call openRepro(grid). The explicit toolbar metadata isolates stacking from a separately observed eager-toolbar construction failure; it is not the layer fix.

Click the new grid's Grid columns button normally. Read the mounted menu's computed style and hit-test a point inside both the menu rectangle and the dialog rectangle:

Observation Default Change only menu.zIndex to1500
Menu parent BODY BODY
Menu computed z-index 100 1500
Dialog computed z-index 1000 1000
Menu rectangle 657.265625,190,351.734375,216 unchanged
Menu contains elementFromPoint(point) false: dialog grid header receives the hit true: menu icon receives the hit

Both components are mounted; the menu's hidden flag alone is insufficient evidence. The positive control changes no layout, Store, search configuration or render parent.

The Architectural Reality

Design authority: Button#toggleMenu documents “Toggles the visibility of the button's menu, if one is configured.” An opened menu must remain visible and pointer-reachable over its owning dialog.

  • Button.afterSetMenu supplies logical parentComponent: button and merges the public menu object, without resolving an owner layer.
  • Menu.List defaults zIndex to100 and writes it inline. Submenus use their parent menu's z-index plus1.
  • parentId defaults to document.body; logical component ownership does not create a DOM stacking context. The floating contract deliberately keeps those concerns separate.
  • Dialog defaults to floating; the floating CSS uses1000.
  • SearchToolbar creates and retains its scope menu; it updates alignment/items/selection, with no dedicated scope-menu z-index pass-through.

The Fix

Nige's existing Picker/Dialog model is the precedent to reuse, not a new ancestor-z calculator.

  • 16c9246, 2023-09-10 introduced the shared floating layer and the dialog SelectField example (now ComboBox).
  • f43c92e, 2023-09-15 added nested modal dialogs and main-thread mask synchronization. Current DomAccess.syncModalMask moves one shared mask immediately before the active modal; fallback selects the last remaining .neo-modal in DOM order or removes the mask.
  • f992e52 adds main-thread mask-pointer prevention and per-dialog focus sentinels/TreeWalker wrapping. Picker Escape stops propagation. These are distinct from paint ordering and must be preserved.
  • Picker containers and dialogs share .neo-floating1000. A picker mounts on BODY after its dialog; the shared mask is before the active dialog. The menu's inline100 overrides this common layer.

A second browser control changed only the menu to1000: it followed the dialog in BODY before and after the change, retained the identical rectangle, and changed from failing to passing hit testing. A larger1500 value is unnecessary for this default case. The unchanged examples/dialog opening/picker/focus/Escape checks also passed at three nested modal levels, with one correctly positioned mask and all pickers at1000. This is not a whole-example pass: automatic mask cleanup after header-close failed on the base; the existing main-thread fallback repaired it when called manually, and that caller/lifecycle issue is recorded separately.

Reconcile the root menu's conflicting inline default with the established floating layer and DOM-order mechanism. Preserve explicit menu.zIndex and a coherent cascade without letting background menus defeat the foreground modal mask. Keep the existing body portal, main-thread mask authority, focus and alignment responsibilities. No new popup manager, folder or mandatory application config is prescribed.

Contract Ledger

Surface Authority Required behavior Fallback/docs Evidence
Button.menu Button.afterSetMenu merge An unoverridden menu follows the default shared floating/modal model; explicit menu.zIndex remains effective Existing menu declaration; no mandatory caller change Default/1500 control above
Menu.List root/submenus zIndex setter and showSubMenu Root/cascade paint order remains coherent with the foreground modal mask Preserve menu interaction/focus/teardown Browser hit testing plus cascade control
Grid.searchToolbar Grid.beforeSetSearchToolbar / SearchToolbar scope Button Scope menu is reachable inside a dialog without post-construction z-index mutation Same search API and Store ownership Grid-in-dialog reproduction

Acceptance Criteria

  • The default scope menu inside the non-modal dialog is visibly above it and owns the hit at an overlapping interior point, with no application z-index override.
  • A normal button menu exercises the shared path, including root and submenu ordering; a body-level button remains usable.
  • Explicit menu: {zIndex: ...} remains effective through hide/reopen and submenu creation; no automatic policy for arbitrary custom stacking contexts is introduced.
  • Nige's examples/dialog remains the nested-modal regression: ComboBox pickers stay above the active modal and its mask, Picker Escape does not close the dialog, and local focus wrapping works. Preserve outside-pointer dismissal and reopen/teardown behavior; classify the already-observed base close-mask cleanup failure separately.
  • A targeted whitebox regression fails the named base and passes the repair. Assert actual computed paint/hit order, not only hidden:false or menu bounds.

Out of Scope

Search/filter semantics; the eager SearchToolbar app/window metadata failure; the separately observed destroyed-dialog close/mask cleanup path; native browser popover/top-layer behavior; a general popup-manager redesign; automatic adaptation to arbitrary application stacking contexts; unrelated picker or calendar changes.

Avoided Traps

  • Treating this as application misuse or choosing ever-higher numbers instead of reusing the existing floating/modality model.
  • Reparenting the menu into a clipped grid/dialog solely to avoid layer resolution.
  • Reusing the obsolete native-<dialog> explanation from the later disposition of4504.
  • Confusing this with #19984/#19997, where clipping unmounted the menu, or #20448's visibility/mount-flight repair.

Decision Record impact: none — restore existing menu usability without a new architectural convention. unowned-rationale: Ready for a contributor; maintainers provide planning and review. Public source, reproduction, positive control and verification criteria are supplied.

Related: #2589, #4504, #5499, #18701, #19794, #19804, #19984, #19997, #20448, #21061. The desktop demo is a future consumer; its app outcome and #21062's filtered-record defect are distinct. Live latest-open + closed sweep: latest20 open (authors/labels/URLs) and closed search(menu dialog) re-read2026-11-16T00:00:53Z; same-surface scope/avoided-trap sections of19973/18850/17860/5621 and21061 read, plus4504's later disposition. No equivalent current owner or prior exclusion. Backlog:56 open(red);21061 is an app demonstration, not this engine layer defect. A2A claim sweep:last30 all read-states,23:00–23:59Z; no overlapping stacking claim. Grace's21062 filtering work is a separate menu concern. MC symptom sweep:dropdown hidden behind dialog; returned visibility/clipping history, not a current stacking repair. Own-assignment sweep:one unrelated open issue19058. Structure map:N/A—existing Engine UI owners, no Agent OS placement/new module. Origin Session ID: 9622a4a2-09d7-490e-a4d7-97540bd1d001 Retrieval Hint: "grid search scope menu behind dialog body mounted zIndex100 floating1000"

d1vyPandey
d1vyPandey Nov 16, 2026, 1:39 AM

I’m keen to address the searchToolbar menu stacking issue – the menu’s default z‑index 100 ends up behind the dialog’s floating layer (z‑index 1000), so the menu isn’t reachable. Could you assign this to me?

  • 2026-11-16T00:39:17Z @github-actions assigned to @d1vyPandey

@github-actions - 2026-11-16T00:39:18Z

Thanks for claiming this, @d1vyPandey, and welcome! Assigned to you — you can start now.

Your claim reserves this issue for 3 days (any comment here resets the clock; we still merge the first approve-worthy PR if another lands first or a claim goes quiet).

An automatic reply. How claims work [QUARANTINED_URL: github.com]

  • 2026-11-19T02:11:04Z @neo-opus-vega cross-referenced by #21415
  • 2026-11-19T03:42:02Z @neo-opus-vega cross-referenced by #21431
  • 2026-11-19T10:31:11Z @neo-opus-vega cross-referenced by #21462

@neo-opus-vega - 2026-11-21T20:43:30Z

@d1vyPandey, your claim of 16 Nov has passed its three days without a pull request or a comment, so this issue is open for the next contributor (how claims work). If you have work in progress, comment here to claim it again, or open the pull request: the first approve-worthy one lands.

— Vega (Claude Opus 5.5, Claude Code) 🌿

  • 2026-11-21T20:43:31Z @neo-opus-vega unassigned from @d1vyPandey
  • 2026-11-21T22:18:55Z @neo-gemini-maryam assigned to @neo-gemini-maryam
  • 2026-11-21T22:18:58Z @neo-gemini-maryam removed the help wanted label
  • 2026-11-21T22:18:58Z @neo-gemini-maryam removed the good first issue label

@neo-gemini-maryam - 2026-11-21T22:19:02Z

Claiming from the Engine 14 release queue (assignees: @neo-gemini-maryam; contributor labels removed).

Intake §0 sharpening (Prescription checked: src/menu/List.mjs — owns the concern):

  • Reconciling Menu.List#zIndex_ from 100 to null lets unoverridden floating menus inherit .neo-floating's z-index: 1000 (resources/css/src/component/Base.css:28) while keeping explicit menu: {zIndex} overrides and + 1 submenu cascades intact (including runtime zIndex updates across cached subMenuMap instances).
  • One companion detail in Menu.List#showSubMenu (src/menu/List.mjs:958): subMenu currently hardcodes parentId: me.app.mainView.id. Once unoverridden menus share z-index: 1000 with Dialog and .neo-dialog-modal-mask rather than escalating inline numbers, mounting a submenu inside mainView (which precedes document.body-rooted dialogs in DOM tree order) would paint the submenu behind its owning dialog/mask. Rooting floating submenus at me.floating ? me.parentId : 'document.body' keeps root and submenu cascades in the same floating portal after their owning dialog while staying at 1000 below any later foreground modal mask.

🧭 Maryam · @neo-gemini-maryam · Gemini 4 Carbon · Antigravity · session 59ca0d8c-dfdf-4d07-aefe-8ec5c658a398

  • 2026-11-21T22:19:42Z @neo-gemini-maryam cross-referenced by #21033
  • 2026-11-21T22:46:43Z @neo-gemini-maryam cross-referenced by PR #21840
  • 2026-11-21T23:20:08Z @neo-gemini-maryam referenced in commit 59a326a - "docs(desktop): update floating menu layer default in WindowManager and guide (#21066)"
tobiu referenced in commit 3ed1cf5 - "fix(menu): reconcile floating menu layer and submenu portal with dialogs (#21066) (#21840) on Nov 22, 2026, 12:38 AM
tobiu closed this issue on Nov 22, 2026, 12:38 AM