You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
batches: Introduce ui package and implement task execution UI in TUI and JSONLines (#571)
This is part of https://github.com/sourcegraph/sourcegraph/issues/22766 and adds the missing task execution status updates in the `-text-only` output.
It does so by defining the `executor.TaskExecutionUI` that the `Coordinator` and the `executor` use to let the UI know about the current state of the task execution.
In order to make this happen I moved all of the UI-related things out of the `main` package and into a new, separate `batches/ui` package that contains the `ui.JSONLines` UI and the old TUI under a new name, `ui.TUI`.
Both UIs can return a `TaskExecutionUI`: a `taskExecutionJSONLines` or `taskExecTUI`. The latter was formerly known as `batchProgressPrinter` and a mess of spaghetti code.
Since the UIs are essentially event-driven it's much easier to implement a stateful UI such as `taskExecTUI`. It also feels quicker.
0 commit comments