Honor Explorer's minItems for the Windows taskbar jump list#318117
Open
SixFive7 wants to merge 2 commits into
Open
Honor Explorer's minItems for the Windows taskbar jump list#318117SixFive7 wants to merge 2 commits into
minItems for the Windows taskbar jump list#318117SixFive7 wants to merge 2 commits into
Conversation
updateWindowsJumpList() already calls app.getJumpListSettings() to read removedItems, but discards minItems on the same return value and slices the recents list with a hardcoded 7. Pass minItems to slice instead and drop the now-unused MAX_WINDOWS_JUMP_LIST_ENTRIES constant. This brings the custom "Recent Folders & Workspaces" category in line with the sibling 'recent' (files) category in the same jump list, which has always honored minItems from Explorer.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Windows Jump List population to honor the slot count reported by Electron/Explorer, and reduces redundant API calls.
Changes:
- Cache
app.getJumpListSettings()and reuse it for removed-items processing and sizing. - Replace the fixed Windows Jump List entry cap with
jumpListSettings.minItems. - Update the inline comment to explain the new sizing behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #318116.
What's broken
The Windows taskbar jump list's "Recent Folders & Workspaces" category is hardcoded to at most 7 entries, regardless of what Explorer requests via the Windows Shell jump list API. This violates the contract (
ICustomDestinationList::BeginList'spcMinSlots, surfaced in Electron asapp.getJumpListSettings().minItems) and ignores the user'sStart_JumpListItemsconfiguration that Windows passes to applications precisely so they can honor it.The machinery to read the right value is already in place.
updateWindowsJumpList()callsapp.getJumpListSettings()and usesremovedItemsfrom the result, but discardsminItemson the same return value.The same jump list contains a sibling category (
type: 'recent', OS-managed, populated automatically with recent files) that has always honoredminItemsfrom Explorer. So today users see two adjacent sections in the same jump list behaving differently for no documented reason.Fix
Pass
jumpListSettings.minItemsto theslicecall instead of the hardcoded constant. Delete the now-unusedMAX_WINDOWS_JUMP_LIST_ENTRIES. Hoistapp.getJumpListSettings()to a local so the same call feeds bothremovedItemsandminItems.Net diff: 4 insertions, 5 deletions.
Behavior
Brings the custom "Recent Folders & Workspaces" category into the same behavior as the sibling "Recent" (files) category that already honors
minItems.Verification
Built locally on Windows 11 (Node 22.22.1, MSVC v143 + Spectre, Python 3.12) and ran the source build. With
Start_JumpListItems = 30:history.recentlyOpenedPathsListcontained 10 entries after opening 10 distinct folders.Type-checks pass (
npm run compilefinishes with 0 errors).Notes for reviewers
isWindows).