GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — desktop: submenu closes when the pointer moves to its last item · Issue #59613 · anomalyco/opencode

desktop: submenu closes when the pointer moves to its last item #59613

New issue
Copy link
New issue
Copy link
Closed
#63739
Closed
desktop: submenu closes when the pointer moves to its last item#59613
#63739
Copy link
Labels
reproduced

Description

@chemarma28
chemarma28
opened on Oct 27, 2026
Issue body actions

Description

In the desktop app's titlebar menu, hovering a submenu and moving the pointer to its last item closes the submenu before the pointer reaches it.
This looks like a known submenu-hover/focus problem in similar menus in other apps as well. A fix could live in Kobalte, but doing it in OpenCode's menu wrapper avoids carrying a dependency patch.

Plugins

None

OpenCode version

2.1.4

Steps to reproduce

  1. Open OpenCode Desktop 2.1.4 on Windows.
  2. Open the titlebar menu and hover "File".
  3. Move the pointer down to "Close Window", the last item.

Expected: the "File" submenu stays open and "Close Window" highlights.
Actual: the submenu closes while the pointer crosses the other parent menu items.

Screenshot

submenu-close-grace-issue.mp4

Operating System

Windows 11

Terminal

No response

Activity

  1. opencode-agent commented on Oct 27, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 27, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for the clear report and the video. I was able to reproduce this.

    I couldn't run the desktop app on Windows, so I used the app's Windows titlebar-menu test page in Chromium. It renders the same menu component.

    1. Open the titlebar menu and hover File until its submenu opens.
    2. Move the pointer in a straight line from File to the submenu's last item.

    As the pointer passes over Edit and View, the File submenu closes and View's opens, so the last item is never reached. This happened with fast moves (~70 ms) as well as slow ones (~600 ms), so it isn't just the usual short hover delay running out. Moving toward an open submenu should keep it open.

    It happens on 2.1.4 and still on the latest dev (8697644). The recording below shows it, and the Playwright script below reproduces it.

    The closest related report is #56873, an open PR for a different menu hover/focus problem (hovering menu items takes focus away from search fields inside a menu). It doesn't cover this one.

    recording.mp4

    Screenshot

    Reproduction script (submenu-hover.spec.ts)
    import { expect, test } from "@playwright/test"
    import { SERVER } from "../utils/app"
    import { mockWorkspace } from "../utils/workspace"
    
    test.use({ video: "on", viewport: { width: 1000, height: 700 } })
    
    // #59613: moving diagonally from the "File" sub-trigger to the submenu's last item should keep File open.
    test("File submenu stays open while the pointer moves to its last item", async ({ page }) => {
      await mockWorkspace(page, { name: "WindowsMenu", sessions: [] })
      await page.goto(`/e2e/utils/windows-menu.html?${new URLSearchParams({ server: SERVER })}`)
      await page.getByRole("button", { name: "OpenCode menu", exact: true }).click()
      const file = page.getByRole("menuitem", { name: "File", exact: true })
      const fb = (await file.boundingBox())!
      await page.mouse.move(fb.x + fb.width / 2, fb.y + fb.height / 2, { steps: 5 })
      const sub = page.locator(".desktop-app-menu-sub").first()
      await expect(sub).toBeVisible()
      const items = sub.getByRole("menuitem")
      const names = await items.allInnerTexts()
      console.log("File items:", JSON.stringify(names))
      const last = items.last()
      const lb = (await last.boundingBox())!
      console.log("trigger", JSON.stringify(fb), "last", JSON.stringify(lb))
      await page.waitForTimeout(300)
      // Move like a person would: straight from the trigger to the target, ~16ms per step.
      const from = { x: fb.x + fb.width / 2, y: fb.y + fb.height / 2 }
      const to = { x: lb.x + 20, y: lb.y + lb.height / 2 }
      const steps = Number(process.env.STEPS ?? 25)
      const started = Date.now()
      for (let i = 1; i <= steps; i++) {
        const x = from.x + ((to.x - from.x) * i) / steps
        const y = from.y + ((to.y - from.y) * i) / steps
        await page.mouse.move(x, y)
        if (process.env.QUIET) { await page.waitForTimeout(Number(process.env.STEP_MS ?? 16)); continue }
        const hovered = await page.evaluate(([x, y]) => document.elementFromPoint(x, y)?.closest("[role=menuitem]")?.textContent, [x, y])
        const subs = await page.locator("[data-component=menu-v2-content], [role=menu]").evaluateAll((els) => els.map((e) => (e.textContent ?? "").slice(0, 12)))
        console.log(`step ${i} (${x.toFixed(0)},${y.toFixed(0)}) over=${hovered} menus=${JSON.stringify(subs)}`)
        await page.waitForTimeout(16)
      }
      console.log("move took", Date.now() - started, "ms")
      await page.waitForTimeout(500)
      await page.screenshot({ path: "/workspace/repro/after-move.png" })
      console.log("open submenus:", await page.locator(".desktop-app-menu-sub").evaluateAll((els) => els.map((e) => e.textContent?.slice(0, 40))))
      await expect(last).toBeVisible()
      await expect(last).toHaveAttribute("data-highlighted", "")
    })

    Run it: bun submenu-hover.spec.ts

  2. opencode-agent
    added
    reproduced
    on Oct 27, 2026
  3. neriousy
    closed this as completedin #63739on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    reproduced

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.