Skip to content

fix: address the three alpha3 field reports - #36

Merged
HelloThisWorld merged 1 commit into
mainfrom
fix/alpha3-feedback
Aug 4, 2026
Merged

fix: address the three alpha3 field reports#36
HelloThisWorld merged 1 commit into
mainfrom
fix/alpha3-feedback

Conversation

@HelloThisWorld

Copy link
Copy Markdown
Owner

Summary

Fixes the three issues reported from local v1.3.0-alpha3 testing.

# Report Root cause Fix
1 Antivirus alert on every new PowerShell tab touch created files through a raw [System.IO.File]::Open(OpenOrCreate, Write) call; combined with the & $native.Source dispatch blocks in the same script, the file read as a write-then-execute dropper shape to antivirus heuristics, flagging the whole module at load File creation goes through New-Item, reachable only when the file does not exist — behavior identical, heuristic shape gone
2 Every completed command shows ? Unknown The documented supported flow relies on the Enter keypress heuristic for the command-executed transition, but that heuristic only set buffer marks and never notified the shell-integration lifecycle. The Timeline never observed the executed stage, the per-mark capability chain never read Full, and _effectiveResult downgraded every trusted exit code to Unknown The Enter path now reports CommandExecuted when 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 command
3 Long commands unreadable, no tooltip Rows show one trimmed line with no way to read the rest Every row now carries a tooltip with the full wrapped command text (no marquee animation); the Unknown status also explains itself on hover via the new CommandTimelineStatusUnknownDetail resource

Fix 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 live
flow.

Root-cause detail for #1 (bisected, not guessed)

On a local engine that reproduces the field report, every function of
Compatibility.ps1 loads clean in isolation, and every combination of
touch + any sibling function is flagged (14 of 14 such combinations; all 21
others clean). Replacing the raw File::Open write with New-Item clears
every 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. touch behavior
verified: creates a missing file, advances the timestamp of an existing file,
never truncates content.

Root-cause detail for #2

Synthetic tests always fed 133;C explicitly on the wire, so they passed
while 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 scrollbar
notification. Without a lifecycle OutputStart, _observeLifecycleCapability
never saw P|B|C, CommandFinished refused the D bit, capability stayed
below Full, and the navigation model's _effectiveResult rendered every
Succeeded/Failed as Unknown — exactly the field screenshots.

The new EnterKeypressSuppliesExecutedTransition test drives a live core
through the real flow: 133;A/133;B on the wire, echoed input, a real
SendCharEvent(L'\r'), then output and 133;D;0 — asserting no entry before
Enter, Running with the typed text after Enter, Succeeded with exit 0 and
capability Full after D, and that an Enter on an empty integrated prompt
adds 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; touch create/timestamp/no-truncate behavior
verified.

Repository gates — ran, passed: test-command-timeline.ps1 (now asserts
the new resource), test-visual-progress.ps1, test-privacy.ps1,
verify-version.ps1, test-release-workflow.ps1,
test-ci-classification.ps1, test.ps1 -Suite Smoke.

Staticgit diff --check clean.

Compiled tests — running at PR creation: the x64 Release build of
Control.UnitTests (which compiles the Terminal.cpp, TermControl.cpp, and
new-test changes) was still building when this PR was opened; I will post the
CommandTimelineTests result (expected 44 with the new test) as a PR comment
the moment it lands, before any merge. test-shell-integration.ps1 -Shell All cannot 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-site is untouched. Version
metadata is unchanged; the next prerelease bump follows separately.

Checklist

  • The change is focused and does not include unrelated formatting.
  • Tests were added or updated where appropriate.
  • All tests claimed above actually ran and passed; the one still running is labeled as such.
  • User-facing behavior and limitations are documented in this repository.
  • This source/docs commit updates the root CHANGELOG.md.
  • The Wiki Development-Changes.md ledger has been pushed with the final source SHA, link, summary, and checkpoint/release.
  • Documentation screenshots reuse a suitable existing sanitized winterm-site asset, or no screenshot was added.
  • Version or schema changes include compatibility and migration notes.
  • Package identity, winterm.exe, and Microsoft Terminal coexistence remain isolated.
  • No command text, terminal output, clipboard content, credentials, or private paths are logged.
  • New source and script files contain the appropriate MIT license header.
  • I did not include generated build output, secrets, certificates, or local absolute paths.

Source ↔ Wiki mapping

Source commit Wiki commit Wiki pages
2ecd3bc 890e05e Development-Changes

Boundary

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-site change.

Next step after this merges: prepare and publish the next alpha for local
re-testing.

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.
@HelloThisWorld

Copy link
Copy Markdown
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 EnterKeypressSuppliesExecutedTransition — reports Total=44, Passed=44, Failed=0. All validation claimed in the PR body is now complete.

@HelloThisWorld
HelloThisWorld merged commit 49ee5eb into main Aug 4, 2026
5 checks passed
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.
@HelloThisWorld
HelloThisWorld deleted the fix/alpha3-feedback branch August 5, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant