Repository navigation
Conversation
The new option --exit-when-done closes the terminal interface as soon as rendering stops, for success and for failure. Without it the interface stays open until the user presses Enter. The render summary still goes to the terminal after the interface closes, so the user sees the outcome. Headless rendering is not affected, because it always ends by itself.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
| message to the app thread by itself. | ||
| """ | ||
| if self.exit_when_done: | ||
| self.exit() |
There was a problem hiding this comment.
Calling exit() like this can cause race conditions - app can exit before the last log lines are drawn in TUI. Tested locally I sometimes got an ugly MountError traceback (running --exit-when-done with --force-render on the hello world example in a loop -- try it yourself)
Instead let's queue the exit after the pending log drawing with self.call_later(self.exit)
The renderer can now close its terminal interface by itself when rendering stops.
What the user does
The user adds
--exit-when-doneto the render command. When rendering stops, the terminal interface closes at once and the user is back in the shell. This happens for a render that succeeded and for a render that failed.Without the option nothing changes: the interface stays open until the user presses Enter.
The result is still visible
The render summary is printed to the terminal after the interface closes, as it is today. It says if the render succeeded, failed or was canceled, and it shows the render id, the input file, the folder with the generated code, and the credits used. An error message is printed below it.
Headless rendering
Headless rendering always ends by itself, so the option changes nothing there.
Where the option can be set
On the command line, or in
config.yamlasexit-when-done: true. The command line wins.No database changes. No other pull request or release is needed.