Skip to content

Conversation

0x5bfa
Copy link
Member

@0x5bfa 0x5bfa commented Sep 7, 2025

Resolved / Related Issues

This PR only duplicates the Explorer's jump list and doesn't watch changes to it to sync while Files is running. It'll be implemented in the next PR.

Steps used to test these changes

  • Build the app
  • Cold-launch the app
  • See its jump list being the same as the Explorer's jump list
image image

@0x5bfa 0x5bfa force-pushed the 5bfa/CQ-JumpListManager branch from 71afbb3 to 9eb7ae9 Compare September 7, 2025 17:00
@0x5bfa 0x5bfa changed the title Code Quality: Sync the jump list with Explorer Code Quality: Sync the jump list with Explorer at the startup Sep 7, 2025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code used at all? If not, we can remove it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah used.

<Extension Category="windows.updateTask" EntryPoint="Files.App.BackgroundTasks.UpdateTask" />

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to put something in place to prevent stale jumplists after updating Files or Windows.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do the same as what we do at the startup, clear all and fetch items from Explorer.
Should we do it?

Copy link
Member

@yaira2 yaira2 Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the update task run even if Files is closed? In that case, I think we should do this.

Copy link
Member Author

@0x5bfa 0x5bfa Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make sure to reset our previous jump list too.

@@ -228,8 +227,6 @@ public async Task SetWorkingDirectoryAsync(string? value)

if (value == "Home" || value == "ReleaseNotes" || value == "Settings")
currentStorageFolder = null;
else
_ = Task.Run(() => jumpListService.AddFolderAsync(value));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a replaement from our end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, no.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if we don't manually add folders when opening them in Files, they won't get added to the frequent access list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, but do we really want to add a folder just because you browsed it? In Explorer one gets added only when you use one of some verbs (open, for example) on a file. If you just keep clicking recursively, then all of them get added, it may be excessive.

Copy link
Member

@yaira2 yaira2 Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, yes. It's more useful when recently opened folders are actually displayed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That case, to keep the synchronization, we should update Explorer's jump list, then the watcher (I will create in the next PR) would notice it and update Files' one too.
What you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. That said, I would prefer it if the watcher was included in this PR as well so that we don't have any gap in functionality.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I totally thought I should separate into smaller PRs for easier review. But it's just adding a watcher class so should be easy to review either way. I'll implement it in this PR today.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@0x5bfa 0x5bfa marked this pull request as draft September 9, 2025 19:04
@yaira2 yaira2 force-pushed the main branch 2 times, most recently from 97999e5 to 806f922 Compare September 9, 2025 21:12
@0x5bfa 0x5bfa force-pushed the 5bfa/CQ-JumpListManager branch from 9306256 to c773727 Compare September 10, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants