Skip to content

fix(desktop): allow creating multiple terminal tabs per workspace#452

Merged
Kitenite merged 1 commit intomainfrom
fix/desktop-new-terminal-button
Dec 21, 2025
Merged

fix(desktop): allow creating multiple terminal tabs per workspace#452
Kitenite merged 1 commit intomainfrom
fix/desktop-new-terminal-button

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 21, 2025

Summary

  • Remove the idempotency check in addTab that prevented creating new terminal tabs
  • This was a regression introduced in b2ecbc3 ("main terminal vs worktrees terminal")
  • The "New Terminal" button now creates new tabs again instead of just activating existing ones

Test plan

  • Open a workspace that already has a terminal tab
  • Click the "New Terminal" button
  • Verify a new tab is created (not just activating the existing one)
  • Verify multiple tabs can be created per workspace

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Modified tab creation behavior: new tabs are now always created separately rather than reusing or restoring focus for existing workspace tabs.

✏️ Tip: You can customize this high-level summary in your review settings.

Remove the idempotency check in addTab that was preventing users from
creating new terminal tabs when one already existed for the workspace.
This was introduced in b2ecbc3 and caused the "New Terminal" button
to only activate existing tabs instead of creating new ones.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

coderabbitai Bot commented Dec 21, 2025

Walkthrough

The addTab method in the tabs store was modified to remove idempotent behavior. Previously, if a tab already existed for a workspace, it would activate that tab and update focus. Now addTab always creates a new tab without checking for existing ones.

Changes

Cohort / File(s) Summary
Tab store idempotent logic removal
apps/desktop/src/renderer/stores/tabs/store.ts
Removed conditional logic that reused existing tabs for a workspace; addTab now consistently creates a new tab via createTabWithPane without early return paths or focus updates for pre-existing tabs

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the removal of idempotent behavior is intentional and aligns with desired tab management semantics
  • Confirm no dependent code relied on the early-return or focus-update side effects
  • Check for any UI or workflow implications of always creating duplicate tabs per workspace

Possibly related PRs

  • superset-sh/superset#284: Directly modifies the same addTab and createTabWithPane logic in the tabs store that this PR changes.
  • superset-sh/superset#381: Modifies the tab/pane creation flow with changes to addPane signature and the decision logic between addPane vs addTab.

Poem

🐰 A tab store simplified, hooray!

No longer checking "exists" the old way,

Always create anew, fresh and bright,

Idempotence gone—let tabs take flight! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing idempotent behavior to allow creating multiple terminal tabs per workspace.
Description check ✅ Passed The description provides a clear summary of changes, references the regression commit, and includes a detailed test plan, though it doesn't strictly follow all template sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/desktop-new-terminal-button

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59bb157 and 5d52fff.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/stores/tabs/store.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/desktop/src/renderer/stores/tabs/store.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build

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 8ef05b6 into main Dec 21, 2025
5 checks passed
@Kitenite Kitenite deleted the fix/desktop-new-terminal-button branch December 21, 2025 03:30
@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