Init initializes the App.
()
| 367 | |
| 368 | // Init initializes the App. |
| 369 | func (a App) Init() tea.Cmd { |
| 370 | // Start the file watcher |
| 371 | if a.watcher != nil { |
| 372 | if err := a.watcher.Start(); err != nil { |
| 373 | // Log error but don't fail - watcher is not critical |
| 374 | a.lastActivity = "Warning: file watcher failed to start" |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | // Start the progress watcher |
| 379 | if a.progressWatcher != nil { |
| 380 | _ = a.progressWatcher.Start() |
| 381 | } |
| 382 | |
| 383 | return tea.Batch( |
| 384 | tea.EnterAltScreen, |
| 385 | a.listenForPRDChanges(), |
| 386 | a.listenForManagerEvents(), |
| 387 | a.listenForProgressChanges(), |
| 388 | ) |
| 389 | } |
| 390 | |
| 391 | // listenForManagerEvents listens for events from all managed loops. |
| 392 | func (a *App) listenForManagerEvents() tea.Cmd { |
nothing calls this directly
no test coverage detected