Skip to content

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

Merged
Kitenite merged 1 commit into
mainfrom
fix/terminal-history-loss
Dec 19, 2025
Merged

Kitenite merged 1 commit into
mainfrom
fix/terminal-history-loss

Conversation

@Kitenite

Copy link
Copy Markdown
Member

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

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](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@Kitenite has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 23 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7b82266 and 7d246cf.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/Terminal.tsx (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/terminal-history-loss

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite
Kitenite merged commit 4736d4a into main Dec 19, 2025
5 checks passed
@Kitenite
Kitenite deleted the fix/terminal-history-loss branch December 19, 2025 00:33
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

Service Status
Neon Database (Neon) ⚠️

Thank you for your contribution! 🎉


Preview resources have been processed for cleanup

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.

1 participant