fix: memory files tab empty on Windows #140

Merged
naomi merged 2 commits from fix/memory-files-windows into main 2026-02-08 13:51:10 -08:00

2 Commits

Author SHA1 Message Date
hikari 6f7544c8b3 fix: use backend command to read memory files for WSL compatibility
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m23s
CI / Lint & Test (pull_request) Successful in 20m3s
CI / Build Linux (pull_request) Successful in 24m6s
CI / Build Windows (cross-compile) (pull_request) Successful in 34m8s
The frontend was using Tauri's `readTextFile` plugin which enforces
scope restrictions and doesn't work with WSL paths on Windows.

Changed to use our `read_file_content` backend command which:
- Already handles WSL paths correctly on Windows
- Works with absolute paths on all platforms
- Bypasses Tauri's filesystem scope restrictions
- Matches the pattern used throughout the app for file operations

This fixes the "forbidden path" error when trying to read memory
files on Windows whilst maintaining functionality on Linux/Mac.

 This fix was created by Hikari~ 🌸
2026-02-08 12:50:18 -08:00
hikari bd5d7685d8 fix: list memory files from WSL home directory on Windows
The memory files tab was empty on Windows production builds because
`list_memory_files()` was using `dirs::home_dir()` which returns the
Windows home directory (C:\Users\...), but Claude Code stores memory
files in the WSL home directory (~/.claude/projects/.../memory/).

Solution:
- Split into platform-specific implementations
- Windows: Use WSL command to find and list memory files in WSL home
- Linux/Mac: Continue using native filesystem access
- Use `bash -l` to ensure proper PATH and home directory resolution

This matches the pattern used for other file operations throughout
the codebase (read_file, write_file, list_directory, etc.).

Fixes empty memory files tab on Windows whilst maintaining full
functionality on Linux/Mac.

 This fix was created by Hikari~ 🌸
2026-02-08 12:45:10 -08:00