[PR #635] [MERGED] fix: sync snippet selected terminals count when tabs are closed #429

Closed
opened 2026-05-06 12:38:45 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/Termix-SSH/Termix/pull/635
Author: @ZacharyZcR
Created: 3/26/2026
Status: Merged
Merged: 3/29/2026
Merged by: @LukeGus

Base: dev-2.1.0Head: fix/snippet-terminal-count


📝 Commits (1)

  • 4c30747 fix: sync snippet selected terminals count when tabs are closed

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 src/ui/desktop/apps/tools/SSHToolsSidebar.tsx (+6 -0)

📄 Description

Summary

  • Fixed stale terminal count in the snippet "Select Terminals" section
  • When terminal tabs were closed, selectedSnippetTabIds was not cleaned up, so the count still showed the old number of selected terminals
  • Added a useEffect that filters out closed tab IDs whenever the terminal tabs list changes

Closes Termix-SSH/Support#534

Test plan

  • Open multiple terminal sessions (e.g. 8 hosts)
  • Open snippet dialog → select all terminals → count shows 8
  • Close some terminal tabs (e.g. close 6)
  • Snippet dialog should now show 2 selected terminals instead of 8

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Termix-SSH/Termix/pull/635 **Author:** [@ZacharyZcR](https://github.com/ZacharyZcR) **Created:** 3/26/2026 **Status:** ✅ Merged **Merged:** 3/29/2026 **Merged by:** [@LukeGus](https://github.com/LukeGus) **Base:** `dev-2.1.0` ← **Head:** `fix/snippet-terminal-count` --- ### 📝 Commits (1) - [`4c30747`](https://github.com/Termix-SSH/Termix/commit/4c3074775fc5ff1ff80c6d295713a722380aaa80) fix: sync snippet selected terminals count when tabs are closed ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/ui/desktop/apps/tools/SSHToolsSidebar.tsx` (+6 -0) </details> ### 📄 Description ## Summary - Fixed stale terminal count in the snippet "Select Terminals" section - When terminal tabs were closed, `selectedSnippetTabIds` was not cleaned up, so the count still showed the old number of selected terminals - Added a `useEffect` that filters out closed tab IDs whenever the terminal tabs list changes ## Related Issue Closes Termix-SSH/Support#534 ## Test plan - [ ] Open multiple terminal sessions (e.g. 8 hosts) - [ ] Open snippet dialog → select all terminals → count shows 8 - [ ] Close some terminal tabs (e.g. close 6) - [ ] Snippet dialog should now show 2 selected terminals instead of 8 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:38:45 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Termix#429
No description provided.