fix(spinner): replace indicatif with custom terminal-safe spinner implementation#3178
Merged
amitksingh1490 merged 4 commits intomainfrom Apr 27, 2026
Merged
fix(spinner): replace indicatif with custom terminal-safe spinner implementation#3178amitksingh1490 merged 4 commits intomainfrom
amitksingh1490 merged 4 commits intomainfrom
Conversation
79f2000 to
da9ca2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace indicatif with a custom spinner implementation and add proper OSC 133 semantic marker emission for ZLE-dispatched commands to fix scrollback artifacts in Ghostty and Warp Terminal.
Context
The indicatif spinner library uses ANSI escape sequences on stderr that leave artifacts in terminal scrollback buffers — especially noticeable in Ghostty during window resize/reflow. Additionally, ZLE-dispatched Forge commands (commit, suggest, edit) bypass the normal preexec/precmd hooks, so they were not emitting the OSC 133 markers that Ghostty relies on to distinguish prompts from command output.
This also adds
WarpTerminalto the list of terminals with known OSC 133 support.Changes
indicatifwith a purpose-builtSpinnerManagerthat uses direct ANSI control viaeprintlnandterminal_sizefor width-aware output. The custom implementation avoids the indicatif artifacts in scrollback and properly cleans up spinner lines._forge_osc133_emitcalls at the start ("B" + "C") and end ("D" + "A") of all ZLE-dispatched command paths indispatcher.zsh. Previously only theeditaction had markers; now every action (commit, suggest, clone, etc.) properly wraps its output.WarpTerminalto the OSC 133 support list incontext.zshalongside WezTerm, iTerm.app, and vscode.'staticlifetime bounds toConsoleWritergeneric parameters across streaming types for thread safety.Use Cases
Testing
Links
fixes #3144
fixes #2893