What happened
The statusline never abbreviates home-relative paths on Windows: shortenCwd (packages/cli/src/pi-transcript.ts:1520-1525) is POSIX-only:
if (home && cwd.startsWith(home + '/')) return `~${cwd.slice(home.length)}`;
On win32, os.homedir() returns C:\Users\<name> and process.cwd() uses backslashes, so cwd.startsWith(home + '/') is false for every subdirectory of the profile directory — only the exact-home case matches. The statusline shows the full absolute path (C:\Users\<name>\Videos\...) instead of ~/Videos/..., silently no-oping the documented feature (/Users/alice/workspace/project → ~/workspace/project) on Windows rather than degrading explicitly.
How to reproduce
- On Windows, run
maka (TUI) from any directory under %USERPROFILE%
- The statusline's last segment shows the full absolute path instead of a
~/-relative form
Suggested fix
Normalize separators before comparing (e.g. compare separator-normalized forms of cwd and home, or use path.relative(home, cwd) and reject results starting with ..), then emit ~/<rest> with native separators.
What happened
The statusline never abbreviates home-relative paths on Windows:
shortenCwd(packages/cli/src/pi-transcript.ts:1520-1525) is POSIX-only:On win32,
os.homedir()returnsC:\Users\<name>andprocess.cwd()uses backslashes, socwd.startsWith(home + '/')is false for every subdirectory of the profile directory — only the exact-home case matches. The statusline shows the full absolute path (C:\Users\<name>\Videos\...) instead of~/Videos/..., silently no-oping the documented feature (/Users/alice/workspace/project→~/workspace/project) on Windows rather than degrading explicitly.How to reproduce
maka(TUI) from any directory under%USERPROFILE%~/-relative formSuggested fix
Normalize separators before comparing (e.g. compare separator-normalized forms of
cwdandhome, or usepath.relative(home, cwd)and reject results starting with..), then emit~/<rest>with native separators.