fix(discover): encode '.' as '-' in project path slug#1472
fix(discover): encode '.' as '-' in project path slug#1472KuSh merged 3 commits intortk-ai:developfrom
Conversation
Claude Code replaces both '/' and '.' with '-' when deriving a projects-directory name from the working-directory path. rtk only replaced '/'. For users whose path contains a dot (e.g. /Users/first.last) the computed slug didn't match Claude's directory name, so rtk discover found zero sessions. Fixes rtk-ai#1457
📊 Automated PR Analysis
SummaryFixes project path encoding in the discover module to replace '.' characters with '-', matching Claude Code's directory naming convention. Without this fix, users with dots in their filesystem path (e.g., /Users/first.last) would get zero sessions from Review Checklist
Linked issues: #1457 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
…ath slug Per claude-code#24067, underscore is replaced with '-'. Per claude-code#40946, non-ASCII characters are each replaced with '-'. Windows backslashes follow the same rule. Refactored encode_project_path to use chars().map() instead of chained replace() calls for clarity. Closes rtk-ai#1457
|
Good catch — pushed a follow-up commit that extends the encoding to cover |
|
Done — extracted |
Claude Code replaces both
/and.with-when computing a project directory name from the working directory path.rtkonly replaced/, so for users with a dot in their path (e.g./Users/first.last) the computed slug didn't match Claude's directory name andrtk discoverreturned zero sessions.The fix is a one-character change in
encode_project_path: replace['/', '.']instead of just'/'.Two tests added to cover the dot case and multiple consecutive dots.
Closes #1457