Skip to content

VS Code's taskbar jump list ignores getJumpListSettings().minItems and is hardcoded to 7 entries on Windows #318116

Closed

Description

Summary

VS Code's Windows taskbar jump list is hardcoded to at most 7 entries in its "Recent Folders & Workspaces" custom category, regardless of the slot count Explorer requests through the Windows Shell jump list API.

This is a bug, not a missing feature:

  • It violates the Windows Shell jump list contract (ICustomDestinationList::BeginList / Electron's app.getJumpListSettings().minItems).
  • It ignores the user's Windows configuration (Start_JumpListItems), which Explorer surfaces to apps precisely so they can respect it.
  • The machinery to read it is already in place. VS Code calls app.getJumpListSettings() and reads removedItems from the result, but discards minItems from the same call.
  • The same jump list is internally inconsistent: VS Code's "Recent" files section (built-in 'recent' category, OS-managed) already honors minItems. Only the "Recent Folders & Workspaces" custom category, added later, does not. Two adjacent sections in the same jump list behave differently for no documented reason.

Repro

  1. Make Explorer request more than 7 jump list slots. The simplest way is to set HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_JumpListItems to a value larger than 7 (e.g. 30), then restart Explorer or sign out and back in.
  2. Open more than 7 distinct folders/workspaces in VS Code.
  3. Right-click the VS Code taskbar icon.

Expected

The "Recent Folders & Workspaces" category shows up to the slot count Explorer requested, matching the behavior of the "Recent" files section in the same jump list.

Actual

Only 7 entries appear, regardless of what Explorer requested.

Root cause

In src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts:

  • Line 308 defines MAX_WINDOWS_JUMP_LIST_ENTRIES = 7.
  • updateWindowsJumpList() calls app.getJumpListSettings() and reads .removedItems from the result. .minItems on the same return value, the slot count Explorer is asking the app to display, is discarded.
  • The recents list is then sliced with the hardcoded 7 before being handed to app.setJumpList(...).
// Existing code (paraphrased):
for (const item of app.getJumpListSettings().removedItems) { /* ... */ }
// ...
.slice(0, WorkspacesHistoryMainService.MAX_WINDOWS_JUMP_LIST_ENTRIES)

The Shell API is already being called. Only half of its return value is being used.

References

Proposed fix

Pass jumpListSettings.minItems to the slice call instead of the hardcoded 7, and delete the now-unused constant. The same getJumpListSettings() call already feeds removedItems a few lines above; only minItems needs to be picked up from it.

Environment

  • VS Code main as of 2026-05-23
  • Windows 11 Pro 24H2 (26200)

Activity

  1. added
    bug
    workbench-history
    windows
    workbench-os-integration
    and removed
    workbench-history
    on Jun 4, 2026
  2. added this to the 1.131.0 milestone on Jul 23, 2026
  3. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jul 23, 2026
  4. locked and limited conversation to collaborators on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedverifiedwindowsworkbench-os-integration

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions