fix: address the five alpha2 field reports - #34
Merged
Conversation
Local testing of v1.3.0-alpha2 reported five issues. Four share one root area: the first real-terminal run of the shell integration module. 1. Stray backslashes before every prompt. Write-WinTermOsc terminated each sequence with ([char]27 + '\\'); in PowerShell single quotes '\\' is a literal two-character string, so every emission was ESC ] payload ESC backslash backslash. The terminal consumed the well-formed sequence and printed the leftover backslash: three before the first prompt (A, cwd, B) and four after a command (D as well). The terminator is now '\', one character, built in Get-WinTermOscSequence. 2. The Timeline recorded the whole prompt line and Load inserted the prompt path into the input. The marks were written as console side effects while the prompt function ran, and the console host writes a prompt function's console output before its returned text, so 133;B landed before the visible prompt and the command region began at the prompt text. Invoke-WinTermPrompt now returns one string with the marks embedded in FinalTerm order: D (from the second prompt on), A, the cwd report, the original prompt text, then B. 3. The Visual Progress bar animated forever on an idle shell-integrated prompt, even without typing. ProgressStateMachine mapped CommandStart (133;B, the user composing input) to a visible indeterminate bar. B now hides the shell snapshot; only CommandExecuted (133;C) starts the running bar, and CommandFinished and the next prompt behave as before. 4. A phantom "Command text unavailable / Running" entry appeared for the active prompt. The lifecycle model created an entry at CommandStart. A 133;B-only mark is the user composing input, not a command, so B is now bookkeeping only: it closes out a previous command that never reported completion, and the entry materializes at OutputStart or CommandFinished. The capability bit recorded at B still lets the entry read Running rather than Unknown. 5. Timeline rows jumped when moving the selection with the arrow keys or hovering. _renderCommandTimeline rebuilt every ListView row on each selection change. A per-row content signature now detects selection-only updates and moves SelectedIndex without rebuilding. Additionally, a module component blocked by antivirus at parse time (observed for Compatibility.ps1 under some engines, printing a parse error at session start) is now skipped silently and recorded in diagnostics. Only functions that actually loaded are exported, so a blocked component degrades that one capability and nothing else. Tests updated for the new semantics: an executed command with empty text still refuses text actions, the no-output CopyOutput refusal now uses a bootstrapped mid-execution mark, idle 133;B asserts no bar and no entry, and the split-reset rehydration uses CommandExecuted. Verified against a live PowerShell session: the returned prompt is byte-exact FinalTerm order with single-character terminators. No persistent history, no output cache, no heuristic prompt detection, no telemetry. Workspace schema, docking model, shell protocol, theme schema, update manifest schema, package identity, and signing policy are unchanged.
12 tasks
HelloThisWorld
added a commit
that referenced
this pull request
Aug 4, 2026
Promotes the five alpha2 field-report fixes, already on main through pull request #34, to a third installable alpha. This commit only moves the release metadata. - Set application version 1.3.0-alpha3, PowerShell module prerelease suffix alpha3, and tag v1.3.0-alpha3. The channel stays alpha, and the module version stays 1.3.0. - Advance the package/file version to 1.3.0.2 across the MSIX manifest and the three Win32 resource scripts; the display ProductVersion strings carry 1.3.0-alpha3. - Update the version literals pinned by verify-version.ps1, verify-branding.ps1, test-visual-progress.ps1, test.ps1, and package-shell-assets.ps1. - Add the 1.3.0-alpha3 release notes with a "Changes since alpha2" section covering the five fixes and the antivirus resilience note, and retitle the changelog's unreleased section. The release workflow marks any non-stable channel with --prerelease and --latest=false, so /releases/latest keeps resolving to v1.2.0, the alpha is not listed on the winTerm website, and the WinGet workflow skips it. Workspace schema, docking model, shell protocol, theme schema, update manifest schema, package identity, and signing policy are unchanged.
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
Fixes the five issues reported from local v1.3.0-alpha2 testing. Four trace
back to the same area: alpha2 was the first release where the shell
integration module ran in a real terminal, and its emission had two defects
that cascaded into the Timeline and the progress bar.
\\\before every prompt (\\\\after a command)'\\'— in PowerShell single quotes that is a literal two-character string, so every sequence endedESC \ \and the terminal printed the leftover backslash (3 = A, cwd, B; 4 = + D)Get-WinTermOscSequencebuilds the terminator as'\', one characterprompt; the host writes those before the returned text, so133;Blanded before the visible prompt and the command region began at the prompt textInvoke-WinTermPromptreturns one string with the marks embedded in FinalTerm order: D (2nd prompt on), A, cwd, prompt text, BProgressStateMachinemappedCommandStart(133;B = composing input) to a visible indeterminate bar133;Bhides the shell snapshot; only133;C(command executed) starts the running barCommand text unavailable / Runningrow133;B_renderCommandTimelinerebuilt every ListView row on each selection changeSelectedIndexwithout rebuildingAdditionally, a module component blocked by antivirus at parse time (observed
for
Compatibility.ps1under some engines — including on the alpha2 testmachine, which showed a red parse error at session start) is now skipped
silently and recorded in diagnostics. Only functions that actually loaded are
exported, so a blocked component degrades that one capability and nothing
else; shell integration needs only the
Privatecomponents.Emission verified against a live session
The wrapped prompt now returns byte-exact FinalTerm order (captured from a
real import, ESC rendered):
No stray characters, B after the prompt text, single-character terminators.
Test updates forced by the new semantics
LifecycleUpdatesAreIncrementalAndIdempotent:133;Balone asserts noentry (still idempotent); the entry materializes at OutputStart as
Running.
ActionLoadRejectsMissingCommandText: the entry-without-text scenario nowuses an executed command with empty captured text.
CopyOutputrefusal now uses a bootstrapped mid-executionmark, since a B-only prompt no longer produces an entry.
CommandCompletionClearsAtNextPrompt: asserts133;Bshows no bar (idleprompt quiet),
133;Cshows Indeterminate, D→Success, prompt→hidden, andthe next idle
133;Bstays hidden.SplitOrDetachResetClearsReusableState: rehydration usesCommandExecuted.Validation performed
Environment: Windows 11 Pro 26100, MSVC 14.44.35207, Windows SDK 10.0.26100.0.
Compiled tests — ran on fresh builds, passed
Total=44, Passed=44, Failed=0CommandTimelineTests(Control)Total=43, Passed=43, Failed=0Builds — ran, clean:
SettingsModel.UnitTestsandControl.UnitTestsx64 Release both exit 0 (the latter includes
Microsoft.Terminal.Control.Libwith the TermControl change).
Live module check — ran: import on this machine (whose antivirus blocks
Compatibility.ps1) produces no console output, exports all six integrationfunctions, records the skipped component in diagnostics, and the prompt
emission is byte-exact as shown above.
Repository gates — ran, passed:
verify-version.ps1,verify-branding.ps1,test-release-workflow.ps1,test-ci-classification.ps1,test-command-timeline.ps1,test-visual-progress.ps1,test-privacy.ps1,test.ps1 -Suite Smoke.Static —
git diff --checkclean; clang-format clean over changed ranges(TermControl differences verified EOL-representation only).
Not run, with reason —
test-shell-integration.ps1 -Shell All: thismachine's antivirus blocks
Compatibility.ps1, so the compatibility-commandassertions cannot run locally (they now fail cleanly on the missing command
rather than a parse spill). The suite runs in the release workflow's gates on
clean runners, where alpha1 and alpha2 both passed it.
No screenshot was needed or created.
winterm-siteis untouched.Checklist
CHANGELOG.md.Development-Changes.mdledger has been pushed with the final source SHA, link, summary, and checkpoint/release.winterm-siteasset, or no screenshot was added.winterm.exe, and Microsoft Terminal coexistence remain isolated.Source ↔ Wiki mapping
09bd1b5214dfcaBoundary
No persistent history, no output cache, no output search, no heuristic prompt
detection, no telemetry. Workspace schema (2), docking model (1), shell
protocol (1), theme schema (1), update manifest schema (1), package identity,
and signing policy are unchanged. Version metadata is unchanged. No
winterm-sitechange.Next step after this merges: prepare and publish
v1.3.0-alpha3for localre-testing.