-
Notifications
You must be signed in to change notification settings - Fork 5.1k
OSC 9;4 progress bar not cleared on SIGINT #37022
Copy link
Copy link
Closed
Labels
a:bugThis doesn't work as expectedThis doesn't work as expectedin:consoleoutput progress tty mintty cygwin clioutput progress tty mintty cygwin cli
Milestone
Description
Current Behavior
Using Gradle 9.4 with Ghostty 1.3, when a long-running operation is interrupted with SIGINT (via ctrl+C) the OSC 9;4 progress reporting to the terminal is not reset to 0 state (hidden). Ghostty will (thankfully) eventually hide the progress after a timeout, but I'm not sure that UX nicety will be present in every terminal emulator.
Expected Behavior
OSC 9;4;0 is sent to hide the progress
Context (optional)
No response
Self-contained Reproducer Project
Any project, run any task, and ctrl+c while the progress bar is being displayed.
Here's an Asciinema recording of an example:
{"version":3,"term":{"cols":90,"rows":28,"type":"xterm-ghostty","version":"ghostty 1.3.0-main+619e33a4f","theme":{"fg":"#ffffff","bg":"#282c34","palette":"#1d1f21:#cc6666:#b5bd68:#f0c674:#81a2be:#b294bb:#8abeb7:#c5c8c6:#666666:#d54e53:#b9ca4a:#e7c547:#7aa6da:#c397d8:#70c0b1:#eaeaea"}},"timestamp":1773152668,"env":{"SHELL":"/opt/homebrew/bin/fish"}}
[0.065, "o", "\u001b[?u\u001b[>0q\u001b]11;?\u001b\\\u001b[?1049h\u001bP+q696e646e\u001b\\\u001bP+q71756572792d6f732d6e616d65\u001b\\\u001b[?1049l\u001b[0c"]
[0.000, "o", "\r"]
[0.003, "o", "\u001b]7;file://JakesSklightMBP.localdomain/Users/jw/dev/sqldelight/sqldelight\u0007"]
[0.014, "o", "\u001b]0;~/d/s/sqldelight\u0007\u001b[m\u001b]11;?\u001b\\\u001b[6n\u001b[0c\u001b[?2004h\u001b[?2031h\u001b[=5u"]
[0.000, "o", "\u001b[K\u001b]133;A;click_events=1\u001b\\\u001b[J\r\n\u001b[K\u001b[1;36m~/d/s/sqldelight\u001b[0m on \u001b[1;35m renovate/kotlin-monorepo\u001b[0m \u001b[1;32m(3f53c2d)\u001b[0m \u001b[37m─────────\u001b[0m took \u001b[1;33m0ms\u001b[0m at \u001b[1;33m10:24:28 AM\u001b[0m\r\n\u001b[1;32m❯\u001b[0m \u001b]133;B\u0007\u001b[K\r\u001b[2C"]
[0.454, "o", "g\r\u001b[3C"]
[0.002, "o", "\u001b[90ma\u001b[m\r\u001b[3C\b\u001b[91mg\u001b[90ma\u001b[m\r\u001b[3C"]
[0.036, "o", "\u001b[91ma\u001b[m\r\u001b[4C\r\u001b[4C\u001b[2Dga\r\u001b[4C"]
[0.098, "o", "\u001b[?2004l\u001b[?2031l\u001b[=0u"]
[0.000, "o", "\r\u001b[4C\r\n\u001b[m\u001b]133;C;cmdline_url=ga\u0007"]
[0.002, "o", "\u001b]0;ga ~/d/s/sqldelight\u0007\u001b[m\r"]
[0.306, "o", "\r\n\r\n\u001b[2A\u001b[1m\u001b]9;4;1;0\u0007│\u001b[0;32;1m···············\u001b[0;39;1m│ 0% INITIALIZING [30ms]\u001b[m\u001b[50D\u001b[1B\u001b[1m> Evaluating settings > :buildLogic > Resolve dependencies of classpath\u001b[m\u001b[71D\u001b[1B"]
[0.093, "o", "\u001b[2AType-safe project accessors is an incubating feature.\r\n\u001b[1B\u001b[0K\r\n\u001b[2A\u001b[1m\u001b]9;4;1;0\u0007│\u001b[0;32;1m···············\u001b[0;39;1m│ 0% CONFIGURING [127ms]\u001b[m\u001b[0K\u001b[50D\u001b[1B\u001b[1m> root project\u001b[m\u001b[14D\u001b[1B"]
[0.102, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;12\u0007│\u001b[0;32;1m█▊·············\u001b[0;39;1m│ 12% CONFIGURING [230ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :runtime\u001b[m\u001b[0K\u001b[10D\u001b[1B"]
[0.099, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;14\u0007│\u001b[0;32;1m██▏············\u001b[0;39;1m│ 14% CONFIGURING [329ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :sqldelight-compiler\u001b[m\u001b[22D\u001b[1B"]
[0.101, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;26\u0007│\u001b[0;32;1m████···········\u001b[0;39;1m│ 26% CONFIGURING [430ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :adapters:primitive-adapters\u001b[m\u001b[30D\u001b[1B"]
[0.095, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;26\u0007│\u001b[0;32;1m████···········\u001b[0;39;1m│ 26% CONFIGURING [526ms]\u001b[m\u001b[52D\u001b[2B"]
[0.104, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;46\u0007│\u001b[0;32;1m██████▉········\u001b[0;39;1m│ 46% CONFIGURING [630ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :dialects:sqlite-3-30\u001b[m\u001b[0K\u001b[23D\u001b[1B"]
[0.101, "o", "\u001b[2A\u001b[0K\r\n\u001b[1m> Configure project :drivers:android-driver\u001b[m\r\nclass org.jetbrains.dokka.gradle.adapters.AndroidExtensionWrapper could not get Android Extension for project :drivers:android-driver\r\nclass org.jetbrains.dokka.gradle.adapters.AndroidExtensionWrapper could not get Android Extension for project :drivers:android-driver\r\n\u001b[0K\r\n\u001b[0K\r\n\u001b[2A\u001b[1m\u001b]9;4;1;58\u0007│\u001b[0;32;1m████████▊······\u001b[0;39;1m│ 58% CONFIGURING [730ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :drivers:driver-test\u001b[m\u001b[22D\u001b[1B"]
[0.095, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;63\u0007│\u001b[0;32;1m█████████▌·····\u001b[0;39;1m│ 63% CONFIGURING [825ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :drivers:native-driver\u001b[m\u001b[24D\u001b[1B"]
[0.102, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;68\u0007│\u001b[0;32;1m██████████▏····\u001b[0;39;1m│ 68% CONFIGURING [927ms]\u001b[m\u001b[52D\u001b[1B\u001b[1m> :drivers:sqlite-driver\u001b[m\u001b[24D\u001b[1B"]
[0.102, "o", "\u001b[2A\u001b[1m\u001b]9;4;1;73\u0007│\u001b[0;32;1m██████████▉····\u001b[0;39;1m│ 73% CONFIGURING [1s]\u001b[m\u001b[0K\u001b[49D\u001b[1B\u001b[1m> :extensions:androidx-paging3\u001b[m\u001b[30D\u001b[1B"]
[0.079, "o", "^C"]
[0.000, "o", "\u001b[0m\u001b[?12l\u001b[?25h"]
[0.066, "o", "\u001b]133;D;130\u0007"]
[0.000, "o", "\u001b[?25h"]
[0.000, "o", "\u001b[2m⏎\u001b[m \r⏎ \r"]
[0.000, "o", "\u001b]7;file://JakesSklightMBP.localdomain/Users/jw/dev/sqldelight/sqldelight\u0007"]
[0.014, "o", "\u001b]0;~/d/s/sqldelight\u0007\u001b[m\u001b]11;?\u001b\\\u001b[6n\u001b[0c\u001b[?2004h\u001b[?2031h\u001b[=5u"]
[0.000, "o", "\u001b[K\u001b]133;A;click_events=1\u0007\u001b[J\r\n\u001b[K\u001b[1;36m~/d/s/sqldelight\u001b[0m on \u001b[1;35m renovate/kotlin-monorepo\u001b[0m \u001b[1;32m(3f53c2d)\u001b[0m \u001b[37m─────\u001b[0m took \u001b[1;33m1s445ms\u001b[0m at \u001b[1;33m10:24:30 AM\u001b[0m\r\n\u001b[1;31m❌130\u001b[0m \u001b[1;31m❯\u001b[0m \u001b]133;B\u0007\u001b[K\r\u001b[8C"]
[2.531, "o", "\u001b[?2004l\u001b[?2031l\u001b[=0u\r\n\u001b[m\u001b[m"]
[0.002, "x", "0"]
You can see the OSC 9;4;1 updates to the value, but no OSC 9;4;0 once Gradle observes the SIGINT and begins resetting the terminal state.
Gradle version
9.4
Build scan URL (optional)
No response
Your Environment (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a:bugThis doesn't work as expectedThis doesn't work as expectedin:consoleoutput progress tty mintty cygwin clioutput progress tty mintty cygwin cli