You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-show progress in task bar based on contents of last line of buffer #8449
Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.
Some thoughts: if every single line needs to be read to determine whether it's an progress indicator line like 42% (42/100), would it cause measurably impact on performance? I highly suspect that it would, no matter how fast regex is. Just imagine how much output bcz produces. We definitely do not want to throw all the CPU away after all the hard work trying to save as many as CPU cycles as possible.
So here's my two cents. The progress indicator line ususally just sticks right at the bottom, right? We should detect this scenerio instead of filtering every single line that's feed to us.
progressstate
It worked fine with the old cmd has api's for reporting progress, warning and error states... The BuildXL build engine uses this with this TaskBarInterop.cs code.
There is also some existing art for AzureDevops where special markers in the text stream can show percentage completed of a task.
It would be great if these could be unified. (maybe get agreement on some metadata markers for this) I.e. if the shell could standardize on a pattern that then other systems like github actions, azure devops could consume as is.
It would be great if these would work in the tabs (and perhaps translate the 'latest' or 'in focus' tab to the windows taskbar.
Danny van Velzen (@dannyvv), letting ITaskbarList3::SetProgressState set progress on the window returned by GetConsoleWindow and making Windows Terminal proxy that to its own window looks difficult to me:
ITaskbarList3 has no GetProgressState method with which Windows Terminal could read the changes made by the application.
Even if there were such a method, I don't think there is a notification about progress changes, so Windows Terminal would have to poll.
Perhaps Windows Terminal could instead use ITaskbarList3::RegisterTab to show all panes (not just tabs) in the task bar, and let the task bar combine the progress info… but I guess this would require the registered windows to be visible.
Anyway, it seems the implementation would be complex and almost separate from what was previously requested in this issue.
Making BuildXL output the OSC 9;4 sequence might be much easier.
Indeed. We talked about this way back when we were first doing ConPTY stuff, and it's capital-H hard. It only works in BXL (and razzle!) because we made the mistake of allowing applications DIRECT unfettered access to the console window handle, which we just can't do any longer. Switching to OSC 9;4 makes it compatible with more terminal emulators on Windows, and even has the benefit of working over a remote connection (say you're remoting to a build machine to fix a build break.)
Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.
Activity
zadjii-msft commentedon Dec 1, 2020
IIRC, this is something that ConEmu does, so we could add a setting to enable this too. I'll link it up with the others at #6700, thanks!
[-]Loading indicator in task bar[/-][+]Auto-show progress in task bar based on contents of last line of buffer[/+]skyline75489 commentedon Dec 16, 2020
Some thoughts: if every single line needs to be read to determine whether it's an progress indicator line like
42% (42/100), would it cause measurably impact on performance? I highly suspect that it would, no matter how fast regex is. Just imagine how much outputbczproduces. We definitely do not want to throw all the CPU away after all the hard work trying to save as many as CPU cycles as possible.So here's my two cents. The progress indicator line ususally just sticks right at the bottom, right? We should detect this scenerio instead of filtering every single line that's feed to us.
zadjii-msft commentedon Dec 16, 2020
I believe that's how ConEmu and mintty implemented this as well - it's only detection on the very last line.
DHowett commentedon Dec 17, 2020
Backlog approved!
dannyvv commentedon Jan 14, 2021
Dustin L. Howett (@DHowett) When considering, please also consider supporting the existing api's for windows' taskbar:
It worked fine with the old cmd has api's for reporting progress, warning and error states... The BuildXL build engine uses this with this TaskBarInterop.cs code.
There is also some existing art for AzureDevops where special markers in the text stream can show percentage completed of a task.
It would be great if these could be unified. (maybe get agreement on some metadata markers for this) I.e. if the shell could standardize on a pattern that then other systems like github actions, azure devops could consume as is.
It would be great if these would work in the tabs (and perhaps translate the 'latest' or 'in focus' tab to the windows taskbar.
KalleOlaviNiemitalo commentedon Jan 15, 2021
Danny van Velzen (@dannyvv), letting ITaskbarList3::SetProgressState set progress on the window returned by GetConsoleWindow and making Windows Terminal proxy that to its own window looks difficult to me:
Perhaps Windows Terminal could instead use ITaskbarList3::RegisterTab to show all panes (not just tabs) in the task bar, and let the task bar combine the progress info… but I guess this would require the registered windows to be visible.
Anyway, it seems the implementation would be complex and almost separate from what was previously requested in this issue.
Making BuildXL output the OSC 9;4 sequence might be much easier.
DHowett commentedon Jan 20, 2021
Indeed. We talked about this way back when we were first doing ConPTY stuff, and it's capital-H hard. It only works in BXL (and razzle!) because we made the mistake of allowing applications DIRECT unfettered access to the console window handle, which we just can't do any longer. Switching to OSC 9;4 makes it compatible with more terminal emulators on Windows, and even has the benefit of working over a remote connection (say you're remoting to a build machine to fix a build break.)