Skip to content

feat: discover WSL agent homes on Windows#150

Open
dum3r wants to merge 2 commits intovakovalskii:mainfrom
dum3r:pub/wsl-windows-support
Open

feat: discover WSL agent homes on Windows#150
dum3r wants to merge 2 commits intovakovalskii:mainfrom
dum3r:pub/wsl-windows-support

Conversation

@dum3r
Copy link
Copy Markdown

@dum3r dum3r commented Apr 9, 2026

Summary

When CodeDash runs on Windows, discover agent session homes that live inside WSL and ingest those sessions into normal history/stats.

This PR is intentionally narrow:

  • WSL home discovery on Windows
  • history/session ingestion only
  • no Running/runtime/focus behavior changes

Related to #149
Related to #124
Related to #127

Scope

Included:

  • detect WSL-side homes that contain supported agent data
  • add those homes to the normal session discovery flow on Windows
  • keep behavior safe when WSL is unavailable
  • avoid probing stopped distros

Not included:

  • Running/live session detection for WSL
  • Focus behavior for WSL runtime cards
  • broader Windows runtime/process grouping changes

Why this is split

The original WSL branch mixed ingestion and runtime behavior.
This revision keeps only the ingestion/history slice so the change stays easier to review and safer to reason about.

Verification

  • node -c src/data.js
  • node --test
  • node ./bin/cli.js stats

Test coverage added

  • UTF-16LE + BOM parsing for wsl.exe output
  • safe fallback when WSL is unavailable
  • running-distro filtering
  • UNC path building / path shortening
  • non-Windows safe behavior

@dum3r
Copy link
Copy Markdown
Author

dum3r commented Apr 9, 2026

Local validation on the branch passed before opening this PR:

  • node -c src/data.js
  • node -c src/frontend/app.js
  • npm test
  • node ./bin/cli.js stats

One small operational note: the current CI run for this PR is showing action_required with no jobs started, which looks more like a fork/external-contributor approval gate than an actual red test failure.

If it helps during review, this PR is intentionally narrow:

  • one code commit for Windows+WSL ingestion/runtime support
  • one test commit for focused WSL coverage
  • no Codex archive/token-cost changes mixed in

@dum3r dum3r force-pushed the pub/wsl-windows-support branch from 88a7f84 to cfa48f3 Compare April 9, 2026 16:18
@dum3r
Copy link
Copy Markdown
Author

dum3r commented Apr 9, 2026

Rebased this PR branch onto the current main / v6.15.14 so it stays aligned with the latest runtime-detection fixes from #124 and #127.

The delta remains intentionally narrow after the rebase:

  • package.json
  • src/data.js
  • src/frontend/app.js
  • test/wsl-windows.test.js

Re-validated on the rebased branch:

  • node -c src/data.js
  • node -c src/frontend/app.js
  • npm test
  • node ./bin/cli.js stats

So this PR should now represent the WSL-on-Windows slice on top of the latest upstream runtime work, not in parallel to an older base.

@vakovalskii
Copy link
Copy Markdown
Owner

Good feature request. 694 lines is substantial — please rebase on latest main (app.js was split into modules in v6.15.5). Also verify it doesn't break on non-WSL systems.

@dum3r dum3r force-pushed the pub/wsl-windows-support branch from cfa48f3 to 603da02 Compare April 12, 2026 10:51
@dum3r dum3r changed the title feat: support WSL agent sessions on Windows feat: discover WSL agent homes on Windows Apr 12, 2026
@dum3r
Copy link
Copy Markdown
Author

dum3r commented Apr 12, 2026

Thanks for the feedback.

I took your note literally and rebuilt this as a much narrower WSL-on-Windows slice on top of the latest main.

What changed in the revised version:

  • dropped the Running/runtime/focus part entirely
  • kept only WSL home discovery + session history ingestion on Windows
  • limited the change to src/data.js plus focused WSL tests
  • added safe behavior when WSL is unavailable / not running
  • avoided probing stopped distros

So the revised scope is:

  • discover WSL-side agent homes from Windows
  • ingest those sessions into normal history/stats
  • no runtime UI behavior changes in this PR

Local verification on the narrowed branch:

  • node -c src/data.js
  • node --test
  • node ./bin/cli.js stats

For non-WSL safety, the focused tests now cover:

  • WSL unavailable
  • non-Windows no-op behavior
  • running-distro filtering
  • path normalization / UNC conversion

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