fix: address the three alpha3 field reports - #36
Merged
Conversation
Local testing of v1.3.0-alpha3 reported three issues. 1. Opening a PowerShell tab raised an antivirus alert on every launch. Bisection against a local engine that reproduces the field report shows each function of Compatibility.ps1 loads clean in isolation, but touch combined with any sibling function was flagged: the raw [System.IO.File]::Open(OpenOrCreate, Write) call plus the "& $native.Source" dispatch blocks in the same file read as a write-then-execute dropper shape. File creation now goes through New-Item, reachable only when the file does not exist, so behavior is unchanged: create if missing, update the timestamp without truncating otherwise. After the change the full module imports with zero failed components and all eleven exports in both Windows PowerShell 5.1 and PowerShell 7 on the engine that previously flagged it. 2. Every completed command displayed as "? Unknown". The supported flow documents that the Enter keypress heuristic supplies the command-executed transition, but the heuristic only set buffer marks and never notified the shell-integration lifecycle. The Timeline therefore never observed the executed stage: the per-mark capability chain never read Full and the presentation downgraded every trusted exit code to Unknown. The Enter path now reports CommandExecuted when the current mark was established by the shell and the input line is non-empty. A heuristic-only mark (no shell integration, for example cmd.exe) still reports nothing, and an empty input line starts no command. This also restores the Running status while a command executes, since entries materialize at execution rather than at completion. A new end-to-end test drives a live core with 133;A/B on the wire, a real Enter keypress, and 133;D, asserting Running, then Succeeded, capability Full, and that an empty-prompt Enter adds no entry. 3. A long command was unreadable in the Timeline. Every row now carries a tooltip with the full command text, wrapped, with no marquee animation; the text is already on screen in that pane, so the tooltip introduces no new exposure. The Unknown status also explains itself on hover through the new CommandTimelineStatusUnknownDetail resource, and test-command-timeline.ps1 asserts the resource exists. No persistent history, no output cache, no heuristic prompt detection for unsupported shells, no telemetry. Workspace schema, docking model, shell protocol, theme schema, update manifest schema, package identity, and signing policy are unchanged.
Owner
Author
|
Compiled-test verification completed as promised: fresh x64 Release build of Control.UnitTests exits 0, and the CommandTimelineTests suite — including the new end-to-end |
12 tasks
HelloThisWorld
added a commit
that referenced
this pull request
Aug 4, 2026
Promotes the three alpha3 field-report fixes, already on main through pull request #36, to a fourth installable alpha. This commit only moves the release metadata. - Set application version 1.3.0-alpha4, PowerShell module prerelease suffix alpha4, and tag v1.3.0-alpha4. The channel stays alpha, and the module version stays 1.3.0. - Advance the package/file version to 1.3.0.3 across the MSIX manifest and the three Win32 resource scripts; the display ProductVersion strings carry 1.3.0-alpha4. - 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-alpha4 release notes with a Changes-since-alpha3 section, including the antivirus-verdict-cache 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.
12 tasks
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 three issues reported from local v1.3.0-alpha3 testing.
touchcreated files through a raw[System.IO.File]::Open(OpenOrCreate, Write)call; combined with the& $native.Sourcedispatch blocks in the same script, the file read as a write-then-execute dropper shape to antivirus heuristics, flagging the whole module at loadNew-Item, reachable only when the file does not exist — behavior identical, heuristic shape gone? UnknownFull, and_effectiveResultdowngraded every trusted exit code to UnknownCommandExecutedwhen the current mark was established by the shell (OSC 133 A/B) and the input line is non-empty. Heuristic-only marks (cmd.exe) still report nothing; an empty input line starts no commandUnknownstatus also explains itself on hover via the newCommandTimelineStatusUnknownDetailresourceFix 2 also restores the Running status during execution: entries now
materialize when the command executes rather than only at completion, which
alpha3's
133;B-no-entry change had made the only creation point in the liveflow.
Root-cause detail for #1 (bisected, not guessed)
On a local engine that reproduces the field report, every function of
Compatibility.ps1loads clean in isolation, and every combination oftouch+ any sibling function is flagged (14 of 14 such combinations; all 21others clean). Replacing the raw
File::Openwrite withNew-Itemclearsevery combination and the full file. After the change, the complete module
imports with zero failed components and all eleven exports in both
Windows PowerShell 5.1 and PowerShell 7 on that engine.
touchbehaviorverified: creates a missing file, advances the timestamp of an existing file,
never truncates content.
Root-cause detail for #2
Synthetic tests always fed
133;Cexplicitly on the wire, so they passedwhile the live path was broken: PowerShell's integration emits A/B/D but the
executed transition is supplied by the terminal-side Enter heuristic
(Terminal.cpp autoMarkPrompts
block), which called
TextBuffer::StartOutput()and raised only a scrollbarnotification. Without a lifecycle
OutputStart,_observeLifecycleCapabilitynever saw
P|B|C,CommandFinishedrefused theDbit, capability stayedbelow
Full, and the navigation model's_effectiveResultrendered everySucceeded/Failed as Unknown — exactly the field screenshots.
The new
EnterKeypressSuppliesExecutedTransitiontest drives a live corethrough the real flow:
133;A/133;Bon the wire, echoed input, a realSendCharEvent(L'\r'), then output and133;D;0— asserting no entry beforeEnter, Running with the typed text after Enter, Succeeded with exit 0 and
capability
Fullafter D, and that an Enter on an empty integrated promptadds no entry.
Validation performed
Environment: Windows 11 Pro 26100, MSVC 14.44.35207, Windows SDK 10.0.26100.0.
Module verification — ran, passed: bisect matrix as above; full-module
import clean in both shells;
touchcreate/timestamp/no-truncate behaviorverified.
Repository gates — ran, passed:
test-command-timeline.ps1(now assertsthe new resource),
test-visual-progress.ps1,test-privacy.ps1,verify-version.ps1,test-release-workflow.ps1,test-ci-classification.ps1,test.ps1 -Suite Smoke.Static —
git diff --checkclean.Compiled tests — running at PR creation: the x64 Release build of
Control.UnitTests(which compiles the Terminal.cpp, TermControl.cpp, andnew-test changes) was still building when this PR was opened; I will post the
CommandTimelineTestsresult (expected 44 with the new test) as a PR commentthe moment it lands, before any merge.
test-shell-integration.ps1 -Shell Allcannot run fully on this machine (its antivirus blocked the old file;post-fix the compatibility commands now load locally, and the suite runs in
the release workflow's gates).
No screenshot was needed or created.
winterm-siteis untouched. Versionmetadata is unchanged; the next prerelease bump follows separately.
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
2ecd3bc890e05eBoundary
No persistent history, no output cache, no heuristic prompt detection for
unsupported shells (the Enter notification fires only for shell-established
marks), 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. No
winterm-sitechange.Next step after this merges: prepare and publish the next alpha for local
re-testing.