diff --git a/pkg/nodes/registry_server.go b/pkg/nodes/registry_server.go index 810d52e..56f567d 100644 --- a/pkg/nodes/registry_server.go +++ b/pkg/nodes/registry_server.go @@ -2613,15 +2613,18 @@ func (s *RegistryServer) handleWebUIOfficeState(w http.ResponseWriter, r *http.R mainState := "idle" mainZone := "breakroom" switch { - case stats["error"] > 0 || stats["blocked"] > 0: - mainState = "error" - mainZone = "bug" case stats["running"] > 0: mainState = "executing" mainZone = "work" + case stats["error"] > 0 || stats["blocked"] > 0: + mainState = "error" + mainZone = "bug" case stats["suppressed"] > 0: mainState = "syncing" mainZone = "server" + case stats["waiting"] > 0: + mainState = "idle" + mainZone = "breakroom" case stats["success"] > 0: mainState = "writing" mainZone = "work" @@ -2632,9 +2635,24 @@ func (s *RegistryServer) handleWebUIOfficeState(w http.ResponseWriter, r *http.R mainTaskID := "" mainDetail := "No active task" + isMainStatus := func(st string) bool { + st = strings.ToLower(strings.TrimSpace(st)) + switch mainState { + case "executing": + return st == "running" + case "error": + return st == "error" || st == "blocked" + case "syncing": + return st == "suppressed" + case "writing": + return st == "success" + default: + return st == "waiting" || st == "idle" + } + } for _, row := range items { st := strings.ToLower(strings.TrimSpace(fmt.Sprintf("%v", row["status"]))) - if st == "running" || st == "error" || st == "blocked" || st == "waiting" { + if isMainStatus(st) { mainTaskID = strings.TrimSpace(fmt.Sprintf("%v", row["task_id"])) mainDetail = strings.TrimSpace(fmt.Sprintf("%v", row["input_preview"])) if mainDetail == "" { diff --git a/webui/src/components/office/OfficeScene.tsx b/webui/src/components/office/OfficeScene.tsx index 73c920a..c86a65b 100644 --- a/webui/src/components/office/OfficeScene.tsx +++ b/webui/src/components/office/OfficeScene.tsx @@ -192,7 +192,7 @@ const OfficeScene: React.FC = ({ main, nodes }) => {
- clawgo + {main.name || main.id || 'main'}
diff --git a/webui/src/components/office/officeLayout.ts b/webui/src/components/office/officeLayout.ts index 60e66fc..717812d 100644 --- a/webui/src/components/office/officeLayout.ts +++ b/webui/src/components/office/officeLayout.ts @@ -6,44 +6,43 @@ export const OFFICE_CANVAS = { }; export const OFFICE_ZONE_POINT: Record = { - breakroom: { x: 1070, y: 610 }, - work: { x: 640, y: 470 }, - server: { x: 820, y: 220 }, - bug: { x: 230, y: 210 }, + breakroom: { x: 760, y: 325 }, + work: { x: 300, y: 365 }, + server: { x: 1010, y: 235 }, + bug: { x: 1125, y: 245 }, }; export const OFFICE_ZONE_SLOTS: Record> = { breakroom: [ - { x: 1020, y: 620 }, - { x: 1090, y: 620 }, - { x: 1150, y: 620 }, - { x: 1040, y: 670 }, - { x: 1110, y: 670 }, - { x: 1180, y: 670 }, + { x: 700, y: 360 }, + { x: 760, y: 355 }, + { x: 820, y: 350 }, + { x: 730, y: 420 }, + { x: 790, y: 420 }, + { x: 850, y: 410 }, ], work: [ - { x: 520, y: 470 }, - { x: 600, y: 470 }, - { x: 680, y: 470 }, - { x: 760, y: 470 }, - { x: 560, y: 530 }, - { x: 640, y: 530 }, - { x: 720, y: 530 }, - { x: 800, y: 530 }, + { x: 240, y: 350 }, + { x: 300, y: 345 }, + { x: 360, y: 350 }, + { x: 420, y: 360 }, + { x: 260, y: 420 }, + { x: 320, y: 425 }, + { x: 380, y: 425 }, + { x: 440, y: 430 }, ], server: [ - { x: 760, y: 240 }, - { x: 830, y: 240 }, - { x: 900, y: 240 }, - { x: 780, y: 290 }, - { x: 850, y: 290 }, + { x: 950, y: 225 }, + { x: 1000, y: 220 }, + { x: 1055, y: 220 }, + { x: 930, y: 285 }, + { x: 990, y: 285 }, ], bug: [ - { x: 180, y: 230 }, - { x: 240, y: 230 }, - { x: 300, y: 230 }, - { x: 210, y: 280 }, - { x: 270, y: 280 }, + { x: 1100, y: 230 }, + { x: 1160, y: 230 }, + { x: 1210, y: 235 }, + { x: 1085, y: 290 }, + { x: 1145, y: 295 }, ], }; -