GeezerVison is showing github.com — Terminal tab progress reporting using `OSC 9;4;` ANSI sequence · Issue #13072 · pytest-dev/pytest
Terminal tab progress reporting using OSC 9;4; ANSI sequence #13072Labels good first issueeasy issue that is friendly to new contributortopic: reportingrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature DescriptionWhat'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.

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. Reacted by Bruno Oliveira, Suraj and Sebastian Kreft Activitymarcelotrevisani commented on Dec 20, 2024 I think that is nice, but shouldn't it start as plugin first? Just to validate it and polish the idea better? 😃 The-Compiler commented on Dec 20, 2024 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 commented on Dec 20, 2024 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:
added 2 commits that reference this issue on Apr 25, 2025This issue will close once commit 31489b7 is merged into the 'main' branch.31489b7 This issue will close once commit 96b871f is merged into the 'main' branch.96b871f added a commit that references this issue on Sep 14, 2025This issue will close once commit c99e5ed is merged into the 'main' branch.c99e5ed bluetech commented on Sep 14, 2025 @The-Compiler From my testing it's supported by Kitty now (tested). This issue also indicates support in Windows Terminal (untested). And ConEmu originated the sequence so presumably supports it.
I need to check about the desktop notification issue. It was fixed in foot and ghostty, I need to check on macos. The-Compiler commented on Sep 15, 2025 bluetech commented on Sep 16, 2025 I tested on the default macOS terminal and iTerm2 and both just ignored it, no desktop notifications, so AFAIU it should be fine on them.
Also read yesterday that Ghostty added support. I tested it, they show the progress in a blue strip at the top (changes to red if there's a failure), but they don't show it on the tab when you're on another tab, so it's kind of pointless (maybe they missed the point?), but anyway from pytest's perspective it does work. added a commit that references this issue on Sep 16, 2025This issue will close once commit f1b1c0a is merged into the 'main' branch.f1b1c0a added 2 commits that reference this issue on Oct 1, 2025This issue will close once commit a090c83 is merged into the 'main' branch.a090c83 This issue will close once commit 99cd7a2 is merged into the 'main' branch.99cd7a2
MetadataMetadatagood first issueeasy issue that is friendly to new contributortopic: reportingrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature DevelopmentNo branches or pull requestsIssue actions
|