fix(desktop): preserve terminal history across re-renders

Merged
KI
1y ago
+3-4

When reattaching to an existing terminal session, the previous logic skipped applying scrollback history if there were pending events queued. This caused terminal history loss when using fast-outputting processes like Claude Code, since data would queue during component unmount/remount cycles.

The fix always applies the initial scrollback state first, then flushes pending events, ensuring no history is lost on reattach.

šŸ¤– Generated with Claude Code

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes