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

Terminal tab progress reporting using OSC 9;4; ANSI sequence #13072

Open
bluetech opened this issue Dec 17, 2024 · 3 comments
Open

Terminal tab progress reporting using OSC 9;4; ANSI sequence #13072

bluetech opened this issue Dec 17, 2024 · 3 comments
Labels
good first issue easy issue that is friendly to new contributor topic: reporting related to terminal output and user-facing messages and errors type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature

Comments

@bluetech
Copy link
Member

What's the problem this feature will solve?

I've learned about a new feature that some terminal emulators are starting to add, which shows progress of a process on the terminal tab. I've learned about it from here. Screenshot of how it will look in Gnome (Linux) from here. Seems like a good fit for pytest, allowing a user start a pytest run, do something in another tab and see at a glance the pytest progress.

image

Describe the solution you'd like

The sequence is documented here.

It should be implemented in the terminal plugin, in TerminalReporter, probably in pytest_runtest_logreport.

My only concern is that it's a global effect on the terminal tab, which pytest doesn't have until now as far as I remember. But it's probably fine and if someone complains we can make it optional.

@bluetech bluetech added type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature topic: reporting related to terminal output and user-facing messages and errors good first issue easy issue that is friendly to new contributor labels Dec 17, 2024
@marcelotrevisani
Copy link
Contributor

I think that is nice, but shouldn't it start as plugin first? Just to validate it and polish the idea better? 😃

@The-Compiler
Copy link
Member

Not sure if it's worth the trouble — the TerminalReporter already has access to all the information needed, the output might need coordination with existing terminal output, and we also have all the logic to calculate the progress available there as well.

@The-Compiler
Copy link
Member

Oh, also note that Linux support at best seems to be spotty for this, with some speaking out against it:

From what I understand, the only terminal emulators supporting this are Ptyxis and Gnome VTE (though the latter is probably used by various frontends, not sure which ones of those actually display it then).

Apparently OSC 9 is also used for notifcations commonly, causing notification spam for terminals which support that:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor topic: reporting related to terminal output and user-facing messages and errors type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature
Projects
None yet
Development

No branches or pull requests

3 participants