Skip to content

fix(devin): probe %APPDATA%\devin so Windows sessions are indexed by default - #53

Open
yougeqiu wants to merge 1 commit into
iAmCorey:mainfrom
yougeqiu:fix/devin-windows-appdata-root
Open

yougeqiu wants to merge 1 commit into
iAmCorey:mainfrom
yougeqiu:fix/devin-windows-appdata-root

Conversation

@yougeqiu

Copy link
Copy Markdown

Problem

DevinAdapter::new() probes three roots for cli/sessions.db:

  • /devin (env override)
  • ~/.local/share/devin (XDG default; also what macOS uses in practice)
  • ~/Library/Application Support/devin (macOS desktop Electron profile, historical candidate)

None of these exist on Windows. Devin Desktop on Windows keeps its sessions at %APPDATA%\devin\cli\sessions.db, so the default instance finds no library and Devin sessions never appear — the only workaround is adding a custom location by hand.

Fix

Add %APPDATA%\devin (i.e. home/AppData/Roaming/devin, derived from home_dir()) as a fourth candidate in the probe chain, after app_support.

Design notes:

  • Derived from home_dir() instead of dirs::config_dir(), same convention as cursor_ide::default_db_path — otherwise the WAKE_HOME redirection would not apply on Windows (SHGetKnownFolderPath ignores it).
  • Probed unconditionally (like the macOS app_support candidate) rather than behind cfg!(windows): the directory simply doesn't exist on macOS/Linux, and keeping it unconditional lets the contract test below exercise the resolution on every platform.
  • Candidate order is unchanged for existing platforms; the new root only wins when nothing earlier has a library file, which is exactly the fresh-Windows-install case.

Test

New crates/wake-core/tests/devin_default_root.rs (own file per the env-isolation convention used by mcp_stdio/remote_sync, since WAKE_HOME/XDG_DATA_HOME are process-global):

  1. Home with only the AppData layout → default resolution must hit it and list the full session set (this is the Windows-machine shape).
  2. Both XDG and AppData layouts present → XDG form still wins (cross-platform regression guard).

Verified on a real Windows machine with Devin Desktop installed (%APPDATA%\devin\cli\sessions.db, ~1.1 GB, 99 sessions): after removing the manually-added custom location, a freshly built wake-cli refresh with this patch indexes Devin via the default path — 10 agents instead of 9, Devin sessions listed and searchable.

Full suite: cargo test -p wake-core — 311 passed, 0 failed. cargo fmt --all --check clean.

…default

DevinAdapter::new() only probed XDG (~/.local/share/devin), the XDG env
override and macOS' ~/Library/Application Support/devin. Devin Desktop on
Windows keeps its sessions.db at %APPDATA%\devin\cli\sessions.db, so the
default instance found no library and Devin sessions never showed up —
only a manually added custom location worked around it.

Add the AppData/Roaming candidate (derived from home_dir(), same
convention as cursor_ide so WAKE_HOME redirection keeps working). The
candidate is probed unconditionally like app_support, which keeps the
XDG form first in the order and makes the resolution testable on every
platform.
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.

1 participant