Repository navigation
fix(discover,learn): encode Windows drive colon in project path slug - #2368
Closed
ALCHEMISTK wants to merge 1 commit into
Closed
ALCHEMISTK wants to merge 1 commit into
ALCHEMISTK wants to merge 1 commit into
Conversation
Claude Code encodes 'C:\Users\foo' as projects/C--Users-foo, but
encode_project_path() kept the drive colon ('C:-Users-foo'), so the
default cwd-derived project filter could never substring-match the
real directory name. Result: 'rtk discover' and 'rtk learn' scanned
0 sessions on every native-Windows machine unless --all/--project
was passed.
Add ':' to SANITIZED_CHARS, correct the doc-comment example, fix the
test that pinned the wrong expectation, and add a drive-colon
regression test.
Fixes rtk-ai#2367
Author
|
done |
5 tasks
Collaborator
|
Thanks for tracking this down. The drive-letter colon is now sanitized on develop: #2952 (merged 2026-08-13) added ':' to SANITIZED_CHARS in encode_project_path, fixed the doc-comment example to C--Users-foo-bar, and updated test_encode_project_path_windows to the same expectation, so the cwd-derived project filter matches Claude Code's real folder name on Windows. The only piece here that is not on develop is a second assertion of the same code path with a different drive letter. Closing as already fixed, but please comment or reopen if something in your setup is still not covered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2367 — on native Windows,
rtk discoverandrtk learnalways scanned 0 sessions without--all/--project, becauseencode_project_path()kept the drive colon (C:\Users\foo→C:-Users-foo) while Claude Code's project slug encodes it to a dash (C--Users-foo). The cwd-derived default filter could therefore never substring-match the real~/.claude/projects/directory name.Changes
':'toSANITIZED_CHARSinencode_project_path()(same treatment fix(provider): sanatize more chars when encoding claude code project pathes #2172 gave spaces/brackets/non-ASCII)C:\Users\foo\bar→C--Users-foo-bar)test_encode_project_path_windows, which pinned the wrong expectationtest_encode_project_path_windows_drive_colonregression testBoth
discoverandlearnbuild their default filter from this function, hence the dual scope.Verification
cargo test: 2149 passed, 8 ignored (full suite, Windows 11)rtk discover→Scanned: 0 sessions (last 30 days), 0 Bash commands--projectsubstring):Scanned: 504 sessions (last 30 days), 3382 Bash commandsNotes
:are legal but Claude Code encodes them to-there too, so the change strictly improves parity on all platforms.--all): that PR masks the no-flag symptom; this one fixes the encoder so cwd-scoped filtering actually works on Windows.🤖 Generated with Claude Code