Compare commits

...

2 Commits

Author SHA1 Message Date
6e2b817887 0.0.47 2026-03-25 10:26:45 -07:00
f50d8eb90e Deduplicate repos in loadAll to prevent repeated sessions
Symlinks or multiple entries can resolve to the same repoRoot,
causing duplicate sessions in the returned list.
2026-03-25 10:26:35 -07:00
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@because/sandlot",
"version": "0.0.46",
"version": "0.0.47",
"description": "Sandboxed, branch-based development with Claude",
"type": "module",
"bin": {

View File

@ -61,6 +61,7 @@ export interface GlobalSession extends Session {
export async function loadAll(): Promise<GlobalSession[]> {
const sandlotDir = join(homedir(), ".sandlot")
const all: GlobalSession[] = []
const seen = new Set<string>()
let repoDirs
try {
@ -89,7 +90,8 @@ export async function loadAll(): Promise<GlobalSession[]> {
}
}
if (repoRoot) {
if (repoRoot && !seen.has(repoRoot)) {
seen.add(repoRoot)
try {
const st = await load(repoRoot)
for (const session of Object.values(st.sessions)) {