Add warning for multiple databases in directory hierarchy (bd-75)

- Implement FindAllDatabases() to scan hierarchy for all .beads directories
- Add DatabaseInfo struct with path, beads dir, and issue count
- Add warnMultipleDatabases() with formatted warning display
- Show active database with ▶ marker and issue counts
- Add comprehensive tests for multi-database detection
- Document warning and solutions in TROUBLESHOOTING.md
- Prevent confusion and database pollution from accidental duplicates

Amp-Thread-ID: https://ampcode.com/threads/T-4941975f-2686-40d0-bc12-aabf38a05890
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-24 15:28:23 -07:00
parent b2d7dc0dd5
commit 3d979b7d9e
6 changed files with 357 additions and 27 deletions

View File

@@ -394,6 +394,9 @@ var rootCmd = &cobra.Command{
storeActive = true
storeMutex.Unlock()
// Warn if multiple databases detected in directory hierarchy
warnMultipleDatabases(dbPath)
// Check for version mismatch (warn if binary is older than DB)
checkVersionMismatch()