TUI: Stay open on error to allow reviewing logs#2421
Draft
domenkozar wants to merge 3 commits into
Draft
Conversation
Deploying devenv with
|
| Latest commit: |
f3fd256
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://845b25fc.devenv.pages.dev |
| Branch Preview URL: | https://tui-stay-open-on-error.devenv.pages.dev |
Add `parent: Option<u64>` to InternalLog::Msg to forward the parent activity ID from Nix's structured log format. Add `message_with_parent()` to the activity stack so the nix log bridge can pass an explicit parent instead of relying on the task-local stack. This enables the TUI to associate error messages with the specific build that produced them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Track activities that received error messages and override their success status on completion, so failed builds are visually marked. - Extract derivation paths from Nix error messages to associate errors with the specific build activity. - Filter Error/Warn messages from the activity tree (they still appear in the message log and final error summary). - Keep failed activities always visible in get_children(), regardless of linger duration limits. - Add ViewMode::ErrorPaused variant for the upcoming --tui-open-on-error flag. - Add has_errors() method to check if any errors occurred during session. - Update test snapshots for filtered error/warning message activities. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add opt-in --tui-open-on-error flag (also DEVENV_TUI_OPEN_ON_ERROR env) that keeps the TUI open when errors occur, allowing users to navigate and review errors interactively. Users can press q/Enter/Esc to exit. When errors occur without the flag (the default), the TUI exits normally and prints a tip suggesting the flag for future use. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0d04069 to
f3fd256
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a build fails, the TUI now stays open instead of immediately exiting. This allows users to:
Technical details
ViewMode::ErrorPausedstate that pauses the TUI after errorsTest plan
devenv shellwith a failing build and verify TUI stays open🤖 Generated with Claude Code