-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
Several places in the codebase silently ignore errors, which can lead to confusing behavior for users when operations fail without any indication.
Evidence
1. internal/cli/list.go:79
projects, _ := history.ListProjects(cfg.ProjectsDir)
projectCount = len(projects)If ListProjects fails, projectCount becomes 0 with no indication of failure.
2. internal/cli/stats.go:62-72
conversations, err := scanner.ScanAll()
if err == nil {
for _, c := range conversations {
// ...
}
}Stats command shows partial or empty data if scanning fails, with no warning to the user.
3. internal/history/scanner.go:103-106
projectFiles, err := s.scanDir(projectDir)
if err != nil {
continue // Skip directories we can't read
}Permission errors or corrupted directories are silently skipped.
Impact
Users may see incorrect or incomplete data without knowing something went wrong. This makes debugging issues difficult.
Suggested Fix
Consider either:
- Return errors up the call stack so they can be handled appropriately
- Add warning logs when errors are encountered but recoverable
- Include a summary of any skipped items in the output (e.g., "Scanned 10 projects, 2 skipped due to permission errors")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels