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

Provide Taskbar progress indicator in Terminal #869

Closed
denelon opened this issue Apr 15, 2021 · 6 comments · Fixed by #883
Closed

Provide Taskbar progress indicator in Terminal #869

denelon opened this issue Apr 15, 2021 · 6 comments · Fixed by #883
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@denelon
Copy link
Contributor

denelon commented Apr 15, 2021

Description of the new feature/enhancement

Provide OSC 9;4 sequence to provide status in Terminals for status.

Windows Terminal added support in microsoft/terminal#8055 for microsoft/terminal#3004 Taskbar progress indicator.

@denelon denelon added the Issue-Feature This is a feature request for the Windows Package Manager client. label Apr 15, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Apr 15, 2021
@denelon denelon removed the Needs-Triage Issue need to be triaged label Apr 15, 2021
@chausner
Copy link
Contributor

This seems like a fun little feature I could potentially contribute, provided that @JohnMcPMS hasn't already started working on this. Does this need a spec written first?

@denelon
Copy link
Contributor Author

denelon commented Apr 21, 2021

@chausner I see this as a small work item. I'd be open to a PR against this issue :)

We would love to have your support!

@JohnMcPMS
Copy link
Member

I have not, and I agree that it is both fun and should be a fairly small amount of work.

Watch out for how it handles cancellation with CTRL+C; a single signal should be able to end with the proper sequence but I don't know how the second one (where we just exit process) will be handled by Terminal. Hopefully they track the source of this and end the progress when that process terminates.

I think we did want to get this in over the next two weeks, so please let us know if you've started it.

@JohnMcPMS
Copy link
Member

And since neither of us explicitly answered the spec question; no, I don't see this as needing a spec.

@chausner
Copy link
Contributor

chausner commented Apr 21, 2021

Okay great, please assign me to this issue and I'll try to have a first implementation ready by next week.

Watch out for how it handles cancellation with CTRL+C; a single signal should be able to end with the proper sequence but I don't know how the second one (where we just exit process) will be handled by Terminal. Hopefully they track the source of this and end the progress when that process terminates.

I did a quick test with

> python
print("\x1b]9;4;2;40\x1b\\")
quit()

and neither Terminal nor ConEmu reset the progress on the task bar after the Python process exited. So when the winget process exits abnormally and if there is no event that would notify us before the process exit, there is probably no way to reset the progress. But normally, winget should not exit unexpectedly, right? And in the case of normal exit, we can always reset the progress.

@JohnMcPMS
Copy link
Member

The only "expected" exit would be the second CTRL+C, where we terminate the process because cooperative cancellation didn't happen fast enough for the user. We could probably even handle it in that case, but only of there is a clean "turn off progress" sequence. I think it is fine to leave that as future work since most places where we are in a progress state should also be the best at cancellation.

@denelon denelon linked a pull request Apr 22, 2021 that will close this issue
@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants