Goal
Make Windows/WSL support possible for community contributors who have access to a Windows machine and can test the edge cases directly.
This is intentionally up for grabs. I do not have a Windows machine available, so implementing and validating this well from my environment would be hard, especially for the path, terminal, and Git/runtime behavior that only fails in real Windows + WSL setups.
Current behavior
The app has native platform handling, but no explicit WSL mode:
- The npm launcher selects builds by
process.platform/process.arch.
- Native Windows gets the Windows build.
- Running from inside WSL looks like Linux and gets the Linux build.
- The embedded terminal is platform-native.
- Windows uses
COMSPEC/PowerShell/cmd style behavior.
- Linux/macOS use
$SHELL or /bin/bash.
- Project IDs, session paths, Git operations, attachments, and file stats assume the app runtime and project filesystem are on the same OS.
- There is no WSL detection, no
wsl.exe integration, and no wslpath conversion.
Relevant starting points:
packages/howcode/lib/howcode.js — platform-specific launcher/download target selection.
desktop/terminal/terminal-command.helpers.ts — terminal command resolution.
desktop/terminal/node-pty.cts and desktop/terminal/manager.cts — embedded PTY/session lifecycle.
desktop/pi-threads/composer-attachment-payload.ts — local path normalization/stat handling.
desktop/system-open-path.cts — platform-specific open-in-system behavior.
desktop/pi-threads/shell-state.cts and project/thread DB paths — project cwd/session assumptions.
Possible approaches
This issue does not prescribe one solution. A contributor with Windows/WSL access should validate the smallest useful path.
Possible minimal path:
- Document that WSL users should run
howcode from inside WSL/Linux so Pi, Git, shell, files, and paths all share one Linux environment.
- Add warnings or guardrails for unsupported native-Windows + WSL-project combinations.
Possible native Windows + WSL path:
- Add WSL detection and/or a setting like “Use WSL for this project”.
- Launch terminal sessions through
wsl.exe on Windows when that mode is enabled.
- Convert paths using
wslpath where needed.
- Decide whether Pi sessions should run as Windows
pi.cmd or Linux pi inside WSL per project/runtime.
- Route enough Git/file/open-path behavior through the same runtime so the feature does not only work in the terminal.
A more robust shape may be a project runtime concept, for example:
type ProjectRuntime = "host" | "wsl";
Then terminal, Pi, Git, file stats, path opening, attachments, and session paths can make consistent decisions per project.
Scope
- Investigate and propose/implement a coherent WSL support path for Windows users.
- Prefer the smallest shippable slice that can be tested on a real Windows + WSL machine.
- Include docs if the initial answer is “supported only when running howcode from inside WSL”.
- Add tests for path/command resolution helpers where practical.
Acceptance criteria
- The issue/PR clearly states which WSL usage mode is supported:
- running the Linux app from inside WSL, and/or
- native Windows app controlling WSL projects.
- The chosen mode is tested on a real Windows + WSL setup and notes the tested Windows version, WSL distro, and install/run path.
- Terminal launch behavior is predictable for WSL projects.
- Project paths/session paths do not silently mix Windows and WSL formats in a way that breaks Git, Pi, attachments, or open-path behavior.
- Unsupported combinations show useful documentation or UI/console guidance instead of failing mysteriously.
Notes
This is marked for community help because it needs real Windows + WSL validation. Maintainer review can help with architecture and repo fit, but the implementation needs someone who can reproduce the environment.
Goal
Make Windows/WSL support possible for community contributors who have access to a Windows machine and can test the edge cases directly.
This is intentionally up for grabs. I do not have a Windows machine available, so implementing and validating this well from my environment would be hard, especially for the path, terminal, and Git/runtime behavior that only fails in real Windows + WSL setups.
Current behavior
The app has native platform handling, but no explicit WSL mode:
process.platform/process.arch.COMSPEC/PowerShell/cmd style behavior.$SHELLor/bin/bash.wsl.exeintegration, and nowslpathconversion.Relevant starting points:
packages/howcode/lib/howcode.js— platform-specific launcher/download target selection.desktop/terminal/terminal-command.helpers.ts— terminal command resolution.desktop/terminal/node-pty.ctsanddesktop/terminal/manager.cts— embedded PTY/session lifecycle.desktop/pi-threads/composer-attachment-payload.ts— local path normalization/stat handling.desktop/system-open-path.cts— platform-specific open-in-system behavior.desktop/pi-threads/shell-state.ctsand project/thread DB paths — project cwd/session assumptions.Possible approaches
This issue does not prescribe one solution. A contributor with Windows/WSL access should validate the smallest useful path.
Possible minimal path:
howcodefrom inside WSL/Linux so Pi, Git, shell, files, and paths all share one Linux environment.Possible native Windows + WSL path:
wsl.exeon Windows when that mode is enabled.wslpathwhere needed.pi.cmdor Linuxpiinside WSL per project/runtime.A more robust shape may be a project runtime concept, for example:
Then terminal, Pi, Git, file stats, path opening, attachments, and session paths can make consistent decisions per project.
Scope
Acceptance criteria
Notes
This is marked for community help because it needs real Windows + WSL validation. Maintainer review can help with architecture and repo fit, but the implementation needs someone who can reproduce the environment.