Skip to content

fix(adopt): client paths and manual steps that read right on Windows - #147

Merged
fylorn merged 2 commits into
mainfrom
fix/windows-client-paths
Sep 23, 2026
Merged

fylorn merged 2 commits into
mainfrom
fix/windows-client-paths

Conversation

@fylorn

@fylorn fylorn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Three things found on a real Windows install of ThinkWatch Lite 2026.9.10 (clients page):

  1. Mixed separators: paths displayed as C:\Users\admin\.claude/settings.json. The relative paths are written with / and were joined in one piece. New paths::under(base, rel) joins one component at a time; used for client config/shadow/marker paths, MCP targets, the project-level check in detect.rs, and all of tw-scan's sources.
  2. Zed on Windows keeps its settings in %APPDATA%\Zed\settings.json, not ~/.config/zed. paths::zed_settings() / paths::ZED_DIR per platform (client, MCP target, scan source).
  3. Manual steps: ~/… and "export … in the shell configuration" are wrong on Windows.
    • adopt.manual.file: same code and args, the file arg is now %USERPROFILE%\… on Windows (paths::shown).
    • New Windows-only codes: adopt.manual.continue.open_windows, adopt.manual.gemini_cli.setx, adopt.manual.gemini_cli.caveat_windows. The caveat suffix is now per entry so a platform can have its own.
    • macOS codes, args and text are unchanged.

Verification

  • macOS: cargo fmt --check, cargo clippy --all-targets -D warnings, cargo clippy -p tw-adopt -p tw-scan --lib -D warnings, cargo test --workspace.
  • paths.rs (std only) compiled and linted for x86_64-pc-windows-msvc and aarch64-pc-windows-msvc; the rest is covered by the Windows CI job.

🤖 Generated with Claude Code

fylorn and others added 2 commits September 24, 2026 01:03
Found on a real Windows install:

- Client paths showed as C:\Users\x\.claude/settings.json. Relative
  paths are written with `/` in the source and were joined in one piece;
  Windows finds the file either way, but the UI showed mixed separators.
  `paths::under` joins them one component at a time, and every such join
  in tw-adopt and tw-scan goes through it.
- Zed keeps its settings under %APPDATA%\Zed on Windows, not ~/.config/zed.
- The manual steps said `~/…` and "export in the shell configuration".
  On Windows the file step shows %USERPROFILE%\…, Continue's step says
  where its file is there, and Gemini CLI's steps use setx. Those
  Windows sentences get their own codes (continue.open_windows,
  gemini_cli.setx, gemini_cli.caveat_windows); the macOS ones are
  unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two tests still expected `~/…`, which is now %USERPROFILE%\… on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 3379db8 into main Sep 23, 2026
2 checks passed
@fylorn
fylorn deleted the fix/windows-client-paths branch September 23, 2026 17:20
@fylorn fylorn mentioned this pull request Sep 23, 2026
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