Skip to content

Move h5inspect_post execution inside the app loop#12

Merged
HalFrgrd merged 5 commits into
masterfrom
copilot/move-h5inspect-post-inside-app
Mar 15, 2026
Merged

Move h5inspect_post execution inside the app loop#12
HalFrgrd merged 5 commits into
masterfrom
copilot/move-h5inspect-post-inside-app

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

Previously, pressing i exited the TUI, ran the post command, then restarted the app from scratch. The post command now runs inline without losing app state.

Changes

  • New KeyPressResult enumhandle_keypress (and its sub-handlers) now return Redraw | DontRedraw | RunPostCommand(Option<String>, String) instead of ()
  • RunPostCommand handled in run() loop — when i is pressed, the loop pauses the TUI (disable raw mode + leave alternate screen), runs the post command, then restores the TUI (re-enter alternate screen + enable raw mode + terminal.clear()); terminal errors are logged via log::warn!
  • Removed AppFinishingState::ShouldRunCommand — no longer needed; AppFinishingState is now just Continue | Quit
  • Simplified main.rs — outer loop and post-command dispatch logic removed; run() is called once
Original prompt

This section details on the original issue you should resolve

<issue_title>move h5inspect post inside app</issue_title>
<issue_description>Instead of the having to exit to run h5inspect post, it should run it during the main app loop.
The on key press function should return an enum of three values, Redraw, DontRedraw, RunPostCommand.
The main app loop should then reset terminal, run the command, then set the terminal back up it can continue listening to events.
</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: HalFrgrd <4559349+HalFrgrd@users.noreply.github.com>
Copilot AI changed the title [WIP] Move h5inspect post to run during main app loop Move h5inspect_post execution inside the app loop Feb 27, 2026
@HalFrgrd HalFrgrd marked this pull request as ready for review March 15, 2026 20:00
@HalFrgrd HalFrgrd merged commit fd570b3 into master Mar 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

move h5inspect post inside app

2 participants