Skip to content

fix(windows): include WebView2 memory in status bar - #176

Merged
1lck merged 2 commits into
1lck:preview/0.3.0from
soarhill:codex/issue-131-windows-memory
Aug 19, 2026
Merged

1lck merged 2 commits into
1lck:preview/0.3.0from
soarhill:codex/issue-131-windows-memory

Conversation

@soarhill

@soarhill soarhill commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #131

Summary

  • replace the Windows footer's WebView JavaScript heap estimate with native process memory sampling
  • report the Lithe host private working set and the total private working set of the host plus its owned WebView2 process tree
  • keep terminal, LSP, user-launched processes, and unrelated WebView2 instances out of the application total
  • poll off the UI thread every two seconds and retain the last successful sample across transient failures

Root cause

The footer previously read performance.memory, which only describes the V8 heap in one WebView2 renderer. It did not include the Tauri host or the WebView2 manager, renderer-native, GPU, network, storage, and crash-reporting processes, so the displayed values did not represent the application's Windows memory usage.

Implementation

The Tauri host now identifies direct msedgewebview2.exe children as owned WebView2 roots, follows only their WebView2 descendants, and sums PrivateWorkingSetSize to match the Task Manager Memory column. Sampling runs through spawn_blocking; the host logs at most one sampling failure per application lifetime while the frontend keeps the last good value.

Validation

  • cargo test --manifest-path windows/tauri/src-tauri/Cargo.toml — 69 passed
  • bun test — 181 passed
  • bun run typecheck
  • Windows frontend boundary check
  • Release frontend build and isolated x86_64 MSVC Release link

Manual verification

On Windows, the Release footer reported Total 306.2 MB · Lithe 9.4 MB, using the same private-working-set metric as Task Manager.

Windows memory status

@soarhill
soarhill requested a review from 1lck as a code owner August 19, 2026 05:23
@1lck
1lck merged commit 091c0ca into 1lck:preview/0.3.0 Aug 19, 2026
7 checks passed
xiaoyumuxi added a commit that referenced this pull request Nov 23, 2026
…#2331)

#2321 合入时固定的 33e6b60 不在 Core main 上,分支删除后可能被回收。4880022 的源码与它相同,
只多了 #176 的插件文档和 #177 合入时的协议更新记录。
@xiaoyumuxi xiaoyumuxi mentioned this pull request Nov 23, 2026
8 of 11 tasks
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