Skip to content

fix: close the local terminal tab when its shell exits - #86

Merged
LukeGus merged 8 commits into
Termix-SSH:dev-1.4.1from
garanda21:fix/local-terminal-close-on-exit
Nov 16, 2026
Merged

LukeGus merged 8 commits into
Termix-SSH:dev-1.4.1from
garanda21:fix/local-terminal-close-on-exit

Conversation

@garanda21

@garanda21 garanda21 commented Nov 16, 2026 •

Copy link
Copy Markdown

Summary

When the local shell exits (e.g. typing exit), the Local terminal tab stayed open showing Process exited (0).

CleanShot 2026-11-16 at 12 46 15@2x

SSH sessions close their tab in the same situation.

This passes an onClose callback from LocalTerminalTab (via shell.closeTab) into LocalTerminal, which calls it on the backend exit frame. The callback is kept in a ref so a new identity doesn't restart the shell.

Testing

  • Built a standalone test plugin with only the local terminal tab and this change, installed it in the desktop app: exit closes the tab.
  • tsc reports no new errors.

@termix-triage-bot

termix-triage-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

AI review | Looks safe to merge

Adds an onClose callback to the local terminal component to automatically close the tab when the shell process exits. The implementation uses a ref to prevent unnecessary re-renders and introduces no security or stability risks.

Reviewed 94ff5ab. AI can be wrong, a maintainer still decides. Comment /termix review to run it again.

@LukeGus
LukeGus changed the base branch from main to dev-1.4.1 November 16, 2026 23:18

@LukeGus LukeGus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LukeGus
LukeGus merged commit dc125e3 into Termix-SSH:dev-1.4.1 Nov 16, 2026
4 checks 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.

2 participants