-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add --claude-dir flag to target specific Claude instances #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,12 +11,16 @@ pub struct FoundSession { | |||||||
| pub project_name: String, | ||||||||
| } | ||||||||
|
|
||||||||
| pub fn find_sessions(days: u32, project_dir: Option<&str>) -> Vec<FoundSession> { | ||||||||
| pub fn find_sessions(days: u32, project_dir: Option<&str>, claude_base: Option<&Path>) -> Vec<FoundSession> { | ||||||||
| let today = Local::now().date_naive(); | ||||||||
| let since = today - chrono::Duration::days(days as i64 - 1); | ||||||||
|
||||||||
| let since = today - chrono::Duration::days(days as i64 - 1); | |
| let effective_days = days.max(1) as i64; | |
| let since = today - chrono::Duration::days(effective_days - 1); |
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test uses a fixed temp directory name under std::env::temp_dir(), which can cause flakiness if tests run in parallel or a previous run left the directory behind (and could also pick up unrelated files). Prefer using a unique temp dir (e.g., via tempfile::tempdir() or by appending a random/UUID suffix).
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test manually calls remove_dir_all(&tmp).unwrap() mid-test; if an assertion panics before cleanup (or if removal fails), it can leave behind temp state and create follow-on failures. Using an RAII tempdir (or a scoped cleanup guard) would ensure cleanup happens reliably even on panic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
--claude-diris provided but points to a non-existent instance (or missingprojects/),find_sessionsreturns empty and the CLI prints "No conversations found for today", which is misleading for a bad path. Consider validating the providedclaude_dir(and itsprojectssubdir) up front and emitting a specific error message when it’s invalid/unreadable.