Skip to content

Update Terminal.Gui and simplify awaitable UI dispatch - #48

Merged
harder merged 3 commits into
mainfrom
codex/critical-library-updates
Oct 15, 2026
Merged

harder merged 3 commits into
mainfrom
codex/critical-library-updates

Conversation

@harder

@harder harder commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

The dependency monitor proposed Terminal.Gui 2.6.0-develop.61, whose packaged source is 46 commits older than Scout's existing .44 build. Update to the actual newer develop build, 2.5.1-develop.81, and select future develop candidates by NuGet publication date rather than version ordering. Publication order identifies candidates; source ancestry still needs review before adoption.

Adopt Terminal.Gui's awaitable InvokeAsync for guarded UI updates. Remove Scout's completion-source plumbing, unused boolean result, and redundant per-dispatch cancellation linking; callers already provide lifetime-linked tokens. Preserve stale-result checks, progress coalescing, and background-task ownership. Add regression coverage for modal dispatch, action failures during shutdown, cancellation token identity, and shutdown without another UI pump.

Review of WinGet stable and preview changes found no required COM API adaptation. Keep both COM packages at stable 1.29.380: that version was already installed, and the latest preview engine/projection versions do not form a matching pair. Reject failed COM package-query statuses with their status and HRESULT before reading matches, while allowing successful empty inventories. Add a read-only --comsmoke diagnostic without backend fallback that requires a nonempty version list, make activation failures produce nonzero --comdiag exit codes, and document those commands. No dependency-review document is retained.

Fixes #31
Fixes #32
Fixes #33

Type

  • Bug fix
  • Terminal.Gui version bump or compatibility fix

Verification

  • Full application suite: 373 passed, zero failed/skipped.
  • Dependency-monitor tests: 4 passed, including paginated registration and the misleading higher-version case; live NuGet selection checked with GitHub writes stubbed.
  • Current revision: locked portable Native AOT publishes for Windows ARM64 and x64; graceful mock startup/shutdown passes with empty stderr and required COM companions verified.
  • Identity ARM64/x64 AOT publishes, mock smoke, and winmd contents passed at 51bc33a; these were not repeated for the review follow-up commits.
  • Final portable ARM64 and emulated x64 --comdiag and --comsmoke pass against the real stable COM engine, including inventory, search, details, versions, and installer preview.
  • Installed CLI v1.30.140-preview: complete list/upgrade/search output parsed successfully.
  • git diff --check.

Limits

Validation host is Windows ARM64; x64 execution used emulation. No package installation, upgrade, uninstall, repair, or download was performed, so the previously observed native ARM64 COM mutation crash remains unresolved. Identity mock smoke verifies packaging/UI startup, not activation inside an installed MSIX. Separate native x64, Linux/macOS, and interactive Windows Terminal/conhost resize checks were not repeated.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 03:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Update detection, smoke validation, and callback error propagation retain correctness issues.

3 open findings
What changed in this PR

Updates Terminal.Gui and simplifies Scout’s UI dispatch, while improving dependency monitoring and read-only COM diagnostics.

Changes:

  • Adopt awaitable UI dispatch with lifecycle regression tests.
  • Select develop builds by publication date and refresh dependency locks.
  • Add --comsmoke, failing activation exit codes, and diagnostic documentation.
File Description
WinGetScout.csproj Updates Terminal.Gui.
tests/​packages.lock.json Refreshes test dependency lock.
tests/​ListNavigationTests.cs Tests dispatch, cancellation, failures, and shutdown.
src/​App.cs Adopts guarded InvokeAsync dispatch.
Program.cs Adds COM smoke checks and failure exit codes.
packages.lock.json Refreshes application dependency locks.
packages.identity.lock.json Refreshes Identity dependency locks.
docs/​architecture.md Documents dispatch and COM diagnostics.
CONTRIBUTING.md Adds COM smoke validation guidance.
.github/​scripts/​critical-dependencies.test.js Tests publication ordering and pagination.
.github/​scripts/​critical-dependencies.js Selects develop candidates by publication date.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/scripts/critical-dependencies.js Outdated
Comment thread Program.cs
Comment thread src/App.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

COM smoke checks can miss inventory failures, and dispatch can suppress unrelated cancellation exceptions during shutdown.

0 open findings

3 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Propagate failed package query statuses in inventory checks

Program.cs:155

These inventory checks can fail while --comsmoke still reports success. ComBackend.ListLocalAsync reads FindPackagesResult.Matches without checking Status, so a failed query returning empty matches becomes a zero count. If the later remote checks succeed, the diagnostic exits zero. Check and propagate non-OK query statuses and their error codes in the backend, or expose a strict diagnostic read path. Add a regression case for a failed status; valid empty inventories and upgrade lists must still pass.

Medium severity Do not suppress unrelated cancellation after shutdown begins

src/​App.cs:502

If an action starts shutdown and then throws an OperationCanceledException with an unrelated or default token, the lifetime-linked request is now canceled and this filter suppresses the action failure. For a started action, suppress cancellation only when the exception carries the canceled request token. Extend the unrelated-cancellation regression test to cover an action that calls BeginShutdown before throwing.

🧠 Review effort: Balanced

@harder
harder requested a balanced review from Copilot October 15, 2026 04:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Terminal.Gui prerelease update changes dispatch and shutdown behavior, and interactive rendering and resize checks remain outstanding.

0 open findings

🧠 Review effort: Balanced

@harder
harder merged commit b4f1ba8 into main Oct 15, 2026
11 checks passed
@harder
harder deleted the codex/critical-library-updates branch October 15, 2026 04:20
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.

WinGet preview release: v1.30.140-preview WinGet stable release: v1.29.380 Terminal.Gui develop update: 2.6.0-develop.61

2 participants