Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension pollutes recently opened files #94

Closed
gsaslis opened this issue Oct 26, 2023 · 13 comments · Fixed by #123
Closed

Extension pollutes recently opened files #94

gsaslis opened this issue Oct 26, 2023 · 13 comments · Fixed by #123
Assignees
Labels
bug Something isn't working enhancement New feature extending the app's current capabilities

Comments

@gsaslis
Copy link
Collaborator

gsaslis commented Oct 26, 2023

User input:

After a time all the files that I open during review are left in the recently opened files under some application path /var/folders/...
So I'm thinking would it be possible for a vscode extension to clean up after itself those files?

It's possible to clean up manually, just thinking it would be nice if the extension could do it by itself

@gsaslis gsaslis converted this from a draft issue Oct 26, 2023
@gsaslis gsaslis added the enhancement New feature extending the app's current capabilities label Oct 26, 2023
@sebastinez
Copy link

Here a picture for reference

image

@gsaslis gsaslis added the needs refinement Needs additional work to define details and subtasks label Oct 26, 2023
@gsaslis
Copy link
Collaborator Author

gsaslis commented Oct 27, 2023

Relevant discussion on zulip: https://radicle.zulipchat.com/#narrow/stream/380896-ide-plugins/topic/extension.20pollutes.20recently.20opened.20files/near/398686609

Workaround exists!

Ok was able to assign a hotkey to remove all recently opened files which makes it easier.
And it seems vscode is working on being able to exclude paths from recently opened files
microsoft/vscode#157395

@maninak maninak self-assigned this Nov 26, 2023
@maninak maninak added bug Something isn't working enhancement New feature extending the app's current capabilities and removed enhancement New feature extending the app's current capabilities needs refinement Needs additional work to define details and subtasks labels Nov 26, 2023
@maninak maninak moved this from 🆕 Backlog to 📋 Up Next in Radicle VS Code Extension Nov 26, 2023
@gsaslis gsaslis moved this from 📋 Up Next to 🆕 Backlog in Radicle VS Code Extension Nov 28, 2023
@maninak maninak moved this from 🆕 Backlog to 📋 Up Next in Radicle VS Code Extension Jan 9, 2024
@maninak maninak moved this from 📋 Up Next to 🏗 In Progress in Radicle VS Code Extension Apr 24, 2024
@maninak
Copy link
Collaborator

maninak commented Apr 24, 2024

It seems that none of the workarounds are effective. We likely need to figure out how to do the "in-memory" diffing which requires tricky reverse engineering from other extensions, but it will be worth it in the end if we crack it.

@maninak
Copy link
Collaborator

maninak commented Apr 26, 2024

Oh wow, this came up and looks promising!!

microsoft/vscode#157395 (comment)

@maninak
Copy link
Collaborator

maninak commented Apr 27, 2024

:sadface:

I implemented a new config radicle.hideTempFiles in the extension's settings with default true, which updates the user's vscode config search.exclude with a new entry to ignore all files under e.g. for Linux /tmp/radicle/**.

It seems that this feature which was until now missing, is now kinda there but still buggy and I reported it as such to an issue assigned to a maintainer.

I'll wrap up my hopefully forwards-compatible implementation and ship it in our next release. The feature will start working if/when this bug is patched in a new VS Code version. Until then it is inert.

I urge anyone reading this to also please go upvote this related issue which needs to meet a minimum amount of upvotes until a deadline to be considered.

@maninak
Copy link
Collaborator

maninak commented Apr 28, 2024

Good news, an MS staff engineer has accepted the bug report, added it to the May backlog and is assigned to it.

microsoft/vscode#157395 (comment)

@maninak
Copy link
Collaborator

maninak commented Apr 29, 2024

After our (laborious) intervention the VS Code bug is fixed and should be published with their upcoming release beginning of May.

@sebastinez
Copy link

nice work @maninak kudos! 👏

lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 29, 2024
This reverts most of cytechmobile#123 and
instead takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
@lorenzleutgeb
Copy link
Contributor

lorenzleutgeb commented Apr 29, 2024

If there are no temporary files, then they won't appear in the history, and we also won't need to hack around hiding them. See #128 for an implementation proposal.

lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 30, 2024
This reverts most of cytechmobile#123 and
instead takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
@maninak
Copy link
Collaborator

maninak commented Apr 30, 2024

Yup, that's been planned to be tackled next. Thank you for already taking a stab at it, Lorenz! 🙌

lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 30, 2024
This reverts most of cytechmobile#123 and
instead takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 30, 2024
This takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
@lorenzleutgeb
Copy link
Contributor

I just think that implementing all the hackery of hiding temporary files was more complicated than actually not creating temporary files and using Git instead, which is the cleaner solution.

lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 30, 2024
This takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 30, 2024
This takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue Apr 30, 2024
This takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
@maninak
Copy link
Collaborator

maninak commented Apr 30, 2024

Results:

🚀 Enhancements

  • settings: add config to toggle excluding temporary files created by the extension, e.g. those used to produce the diff of a patch's changed files, from the list of recently opened files. This is enabled by default. This currently works only partly, but should automatically be fully working when the underlying VS Code bug is fixed and released (ETA beginning of May).

lorenzleutgeb added a commit to lorenzleutgeb/radicle-vscode-extension that referenced this issue May 9, 2024
This takes a different approach to resolving
cytechmobile#94

Use the Git integration for Visual Studio Code (an extension that is
bundled with VSCode and neither be disabled or uninstalled, thus can be
effectively considered part of VSCode) to read files directly off of
Git.

Signed-off-by: Lorenz Leutgeb <[email protected]>
@maninak
Copy link
Collaborator

maninak commented Jun 10, 2024

As of the published stable version of VS Code 1.90 this solution is in effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature extending the app's current capabilities
Projects
Archived in project
4 participants