fix(windows): remove writer that broke the completion dropdown; welcome commit hash#1179
Merged
Conversation
added 2 commits
July 12, 2026 20:22
…letion dropdown The wrap-aware ConsoleWriter shipped in the previous release corrupted the whole terminal as soon as the completion dropdown rendered. Root cause, provable from the go-prompt source: every suggestion row is written up to the exact right edge of the terminal, and the renderer then repositions with negative cursor-move arguments, which the VT writer converts to the opposite direction. The wrapper only tracked positive movements, so its column model drifted on the first row and it injected newlines at wrong positions on every subsequent row — ten scrolled lines per keystroke. The compensation layer is removed and both prompts return to the standard writer. This reopens the known prompt-climb issue with large wrapped input on VT consoles; any new attempt at it must be validated on a real Windows console before shipping, since unit tests against a modeled terminal already failed to catch this interaction once.
…uilds The welcome screen printed the raw build info, so builds installed via go install showed an unknown commit even though the version command displayed it after enriching from the GitHub release. The welcome screen cannot pay for a network round-trip at boot, so the release metadata fetched by any report is now persisted to a small on-disk cache under the chatcli home directory, written atomically and expiring daily. The welcome screen reads an offline report that applies the same pure enrichment from that cache, and boot kicks a background refresh bounded by its own deadline when the cache is stale. The update opt-out variable disables the refresh as well.
Contributor
Quality GateResult: ✅ all floors passed
Config: .github/quality-gate.yml. Workflow: |
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.
Regression fix — highest priority
Release 1.160.1 shipped a wrap-compensation ConsoleWriter for Windows that corrupted the entire terminal the moment the completion dropdown rendered (typing a slash). This PR removes it.
Root cause, provable from the go-prompt v0.2.6 source: renderCompletion writes every suggestion row up to the exact right edge of the terminal (the x+width guard aligns rows to end at the last column), then repositions using negative cursor-move arguments that the VT writer converts to the opposite direction. The wrapper tracked only positive movements, so its column model drifted on the first suggestion row and every row after that received a newline injection at the wrong position — the screen scrolled and tore on every keystroke.
Both prompts (main REPL and coder inter-turn input) are back on the standard writer. Everything else from the previous fix stays: the stdin reader fixes, path validation, JSON args repair, AltGr sanitation and the palette ghost-line erase.
Honest consequence: the pre-existing prompt-climb issue with large wrapped input on VT consoles is reopened. A renderer-level fix requires validation on a real Windows console before shipping — modeled unit tests already failed to catch this interaction once. Tracked for a future attempt, likely alongside the TUI migration.
Welcome screen commit hash
The welcome screen printed raw build info, so go install builds showed an unknown commit while /version displayed it fine after enriching from the GitHub release. The welcome screen cannot block boot on the network, so:
First boot after install shows the hash as unknown (nothing cached yet); every boot after that shows it. ldflags builds are unaffected — stamped data always wins.
Testing