fix(monitor): use full workspace path as dedup key
filepath.Base gave just "main" — every branch-based workspace collided in seenCompleted map. Now uses relative path like "core/go/main" for unique deduplication. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
a3ca68e2bd
commit
c04d3442dd
1 changed files with 12 additions and 2 deletions
|
|
@ -324,7 +324,12 @@ func (m *Subsystem) checkCompletions() string {
|
|||
continue
|
||||
}
|
||||
|
||||
wsName := filepath.Base(filepath.Dir(entry))
|
||||
// Use full relative path as dedup key — "core/go/main" not just "main"
|
||||
wsDir := filepath.Dir(entry)
|
||||
wsName := wsDir
|
||||
if len(wsDir) > len(wsRoot)+1 {
|
||||
wsName = wsDir[len(wsRoot)+1:]
|
||||
}
|
||||
|
||||
switch st.Status {
|
||||
case "completed":
|
||||
|
|
@ -548,8 +553,13 @@ func (m *Subsystem) agentStatusResource(ctx context.Context, req *mcp.ReadResour
|
|||
if json.Unmarshal([]byte(entryData), &st) != nil {
|
||||
continue
|
||||
}
|
||||
entryDir := filepath.Dir(entry)
|
||||
entryName := entryDir
|
||||
if len(entryDir) > len(wsRoot)+1 {
|
||||
entryName = entryDir[len(wsRoot)+1:]
|
||||
}
|
||||
workspaces = append(workspaces, wsInfo{
|
||||
Name: filepath.Base(filepath.Dir(entry)),
|
||||
Name: entryName,
|
||||
Status: st.Status,
|
||||
Repo: st.Repo,
|
||||
Agent: st.Agent,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue