Skip to content

worktree cleanup: strange hover on workspace column #348517

Open

Description

  • open the worktree clean up dialog and move the mouse over the workspace column entries:
Screen.Recording.2026-11-16.at.11.42.39.mov
  • Repository should not start with '/'
  • hover is far away from mouse pointer
  • No clue where that comes from: 'Repository Coding/Adding Hello World Snippet for Go Language'. There is a very old session with that title, but ts not related to all these worktrees
  • some entries show no hover

Activity

  1. aeschli commented on Nov 16, 2026

    @aeschli
    ContributorAuthor

    Investigated the live Insiders Agents window with dbgjs. All four symptoms are reproducible, with distinct causes:

    1. Leading / in the repository label

    The workspace-column renderer passes workspace.uri to labelService.getUriLabel(...). For a GitHub repository URI such as https://github.com/microsoft/vscode, the result is /microsoft/vscode: the generic URI label preserves the leading path separator rather than formatting an owner/repo repository label.

    2. Unrelated old session title in the repository hover

    This is global path-label pollution, not an actual association between the worktrees and the old session.

    In the inspected runtime, three old quick chats report the real repository directory as their scratch folder. BaseAgentHostSessionsProvider.getResourceLabelHomes() includes those directories, and updateResourceLabelHomeFormatters() registers a session-title-based formatter for them. The labels are keyed by the same directory, so the last registration wins.

    Consequently, getUriLabel(repositoryUri) returns an unrelated session title for every cleanup row using that repository. In this run the label was Copilot/hello…, even including summary text present in that old session's title. This explains the same category of unexpected title shown in the recording; the exact title in the recording was not reproduced in this run.

    Verified without changing application state: calling getUriLabel(repositoryUri, { noPrefix: true }) returns the correct filesystem path instead. The same issue also affects checkout-path labels, which use the undecorated getUriLabel(...) call too.

    3. Hover positioning does not follow the pointer

    setupDelayedHoverAtMouse() uses resolveMouseStyleHoverTarget(), which captures only the initial x + 10. It supplies no Y coordinate and does not track subsequent mouse movement. Vertical positioning therefore falls back to the bounds of the entire 60px-high table cell.

    Measured reproduction: enter a cell at X=601, then move within it to X=724 before the hover appears. The hover's left edge remains at X=611. With the pointer at Y=617, the hover's bottom edge is at the cell's top, Y=567, leaving a 50px vertical gap. The unexpectedly large old-session content further exaggerates the apparent distance.

    4. Moving between equal-text cells can leave the next cell without a hover

    HoverService.showDelayedHover() defaults the hover ID to its content text. The identity check ignores the target cell.

    Reproduction:

    1. Hover a workspace cell until its hover appears.
    2. Move directly to the adjacent workspace cell with identical hover text.
    3. The identity check returns the previous cell's existing hover instead of creating/re-anchoring one.
    4. Mouse-out from the previous cell then disposes that hover. The new cell remains hoverless until it is left and re-entered.

    This reproduced repeatedly, including after waiting 1900ms, beyond the configured 1500ms hover delay. Entering those same cells from outside the table did show their hovers, so the missing-hover symptom is not simply missing listeners/data or insufficient delay.

    Fix directions

    • Format repository URLs explicitly rather than using a generic path label.
    • Use undecorated filesystem labels for repository/checkout paths (noPrefix: true); separately investigate why ordinary repository directories are advertised as scratch homes.
    • Make hover identity target-aware, or give each cleanup cell a distinct hover ID.
    • Anchor mouse-style hovers to the current pointer position rather than a stale X coordinate and the full cell's vertical bounds.

    Relevant code:

    No source files or cleanup selections were changed during the investigation.

  2. added
    bug
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agents-windowbug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions