( filePath: string, key: string, previousValue: string | undefined, timeoutMs: number, previousMtimeMs?: number )
| 459 | sessionName, |
| 460 | currentPane.windowIndex, |
| 461 | envArgs ? `env ${envArgs} ${cmd}` : cmd, |
| 462 | currentPane.paneIndex |
| 463 | ); |
| 464 | try { |
| 465 | ensureServiceLogPipe(sessionName, serviceName); |
| 466 | } catch { |
| 467 | // Restart succeeded; a dead pipe is recoverable on the next poll. |
| 468 | } |
| 469 | settle('relaunched'); |
| 470 | } catch { |
| 471 | // The dashboard may have moved or closed the pane after we resolved it. |
| 472 | // Keep the TUI alive; the next explicit restart/view action can retry. |
| 473 | settle('gave-up'); |
| 474 | } |
| 475 | }, POLL_MS); |
| 476 | }); |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * Build `docker compose down` argv with `--profile` flags for every known |
| 481 | * infra profile so profile-gated services (e.g. grafana) are torn down |
| 482 | * alongside the default set. Compose v2's `down` behaviour with |
| 483 | * profile-gated services has varied across versions; passing the flags |
| 484 | * explicitly makes the teardown symmetric with startInfra and avoids |
no test coverage detected