diff_criteria.md

  1. Field Renaming and Semantic Clarification: The hold field in Options, TerminalOptions, and PtyOptions has been renamed to drain_on_exit across the codebase. This improves semantic clarity by distinguishing between two distinct behaviors: draining output before exit versus holding the terminal open after exit.
  2. Behavioral Shift in Exit Logic: The logic previously controlled by hold now uses drain_on_exit, ensuring the child process’s output is drained upon termination, but the window may still close unless explicitly held open via external means. Exit handling in event_loop.rs has been updated to reflect this behavioral distinction.
  3. Config and Struct Updates: All related structs (UiConfig, Window, WindowContext, EventLoop) have been updated to reflect the new drain_on_exit naming. This ensures consistent naming and avoids legacy confusion.
  4. UI Window Behavior: A new hold field has been added to the Window struct to manage whether the terminal window should remain open on exit, separating UI behavior from terminal process behavior.
  5. Exit Control Improvements: When a user closes a window manually (CloseRequested event), hold is explicitly set to false to allow proper shutdown, ensuring manual control supersedes configuration-based persistence.
  6. Documentation and Changelog Updates: The CHANGELOG entry for version 0.25.0-dev documents the replacement of hold with drain_on_exit, providing visibility into this breaking change and its rationale (terminal holding should now be handled externally).