Skip to content

perf(desktop): accelerate Windows status checks and acknowledge lifecycle actions - #1437

Merged
yyjeqhc merged 5 commits into
mainfrom
style/desktop-redundant-copy-20261123
Nov 23, 2026
Merged

yyjeqhc merged 5 commits into
mainfrom
style/desktop-redundant-copy-20261123

Conversation

@swjnxyf

@swjnxyf swjnxyf commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Remove duplicate Desktop brand subtitle and redundant dashboard WebCodex · Running status line, while preserving the sidebar runtime status.
  • Speed up full local Environment observation on Windows user-scope services: share a single verified Server owner/PID observation across embedded Tunnel profiles, combine service/PID lookups, and process independent service probes with a bounded 3-worker fan-out. Preserve exact Task Scheduler identity checks and fail-closed diagnostics.
  • Show immediate Stopping / Restarting progress when a user clicks Tunnel Stop/Restart or Server Restart/Start; wait for real backend completion before reporting the final state.
  • Update dashboard status expectations and add locale-aware pending-action and native probe-order regression tests.

MSI local evidence

  • Read-only webcodex environment status --json, two alternating same-machine comparisons: installed 0.5.0 binary 15.439 s / 14.526 s, new dogfood 0.5.1 build 5.056 s / 5.425 s. ~65% lower average duration for the full CLI status path, not a measured Server restart or Tunnel shutdown duration.
  • Root environment crate: cargo check --locked -p webcodex-environment passed; focused local_status::tests (2/2) passed; cargo clippy --locked -p webcodex-environment --lib -- -D clippy::correctness passed. -D warnings separately encounters pre-existing lints in webcodex-core.
  • Desktop: npm run typecheck passed; npm test 829/829 passed, including CSS contract checks; cargo fmt --all and git diff --check passed.

Safety / scope

  • No running Server, Tunnel, or Runner was stopped/restarted or replaced. The benchmark ran a separately built CLI only.
  • Windows service stop confirmation, exact PID ownership verification, failure diagnostics, and timeout semantics remain intact.
  • No release, installer publication, or runtime deployment. This remains a Draft PR pending cross-platform CI and review.

Commits

  • 897f9da0 — Windows status query performance.
  • bf41b97e — immediate lifecycle progress feedback and tests.

@swjnxyf swjnxyf changed the title style(desktop): simplify duplicate shell labels perf(desktop): accelerate Windows status checks and acknowledge lifecycle actions Nov 23, 2026
@yyjeqhc
yyjeqhc marked this pull request as ready for review November 23, 2026 08:30

@yyjeqhc yyjeqhc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Code review of PR #1437 at c46fadfa7408e59773ae6f2b6049388875fcd570 (MSI main checkout, style/desktop-redundant-copy-20261123).

Reviewed all 9 changed files. The Windows user-service status optimization retains the existing exact Task Scheduler owner/action-PID checks, shares one verified Server observation for embedded Tunnel profiles, preserves ordered fail-closed diagnostics, and bounds independent PowerShell probes to 3. The connection UI correctly reports Stop/Restart as pending until the native request completes, without marking an action successful early. The copy simplification removes duplicate labels without removing runtime status from the sidebar.

Found and fixed one blocking Contract CI test race: App.test.tsx assumed the initial ChatGPT observation was still not checked, although the asynchronous observation may already be checking when the assertion runs. Pushed follow-up c46fadfa to make the assertion verify the actual invariant (unmanaged Tunnel is not presented as disconnected) across valid observation phases.

MSI validation after the fix: Desktop Vitest 829/829, TypeScript typecheck, frontend production build, cargo fmt --check, and Git diff checks passed; new Windows local_status::tests 2/2. A broader MSI webcodex-environment --lib run had 256 passing, 5 failing, 2 ignored tests: failures were in untouched Windows-specific inventory/migration path expectations and Tunnel recovery unsupported paths. These do not establish a regression in this PR; they should be treated as a separate Windows test-portability issue, not falsely reported as an all-green run.

APPROVE applies to the reviewed code, not to completion of CI or real Windows operational acceptance. The new GitHub workflow run for this head is still executing; wait for required checks and perform read-only Windows status and real Stop/Restart UX smoke testing before merging. No runtime services were stopped, started, or deployed as part of this review.

@yyjeqhc
yyjeqhc merged commit 026413d into main Nov 23, 2026
19 checks passed
@yyjeqhc
yyjeqhc deleted the style/desktop-redundant-copy-20261123 branch November 23, 2026 09:15
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.

2 participants