Skip to content

IJPL-249905 macOS: make project tab synchronization idempotent - #3569

Open
wyl0706 wants to merge 1 commit into
JetBrains:masterfrom
wyl0706:codex/IJPL-249905-macos-window-tabs
Open

IJPL-249905 macOS: make project tab synchronization idempotent#3569
wyl0706 wants to merge 1 commit into
JetBrains:masterfrom
wyl0706:codex/IJPL-249905-macos-window-tabs

Conversation

@wyl0706

@wyl0706 wyl0706 commented Jul 10, 2026

Copy link
Copy Markdown

Issue

IJPL-249905

Root cause

JetBrains Client can queue multiple project-frame initialization updates while macOS has already merged the frames into one native tab group. The first update creates the complete Swing tab model, while a later update recreates the current frame's tab component and tries to insert the same IdeFrameImpl again. This can leave the native window tab group and the IDE tab model out of sync, causing duplicate tabs, failed switching, or stuck tabs.

Fix

  • Create tab components only for frames that do not already have one.
  • Make incremental frame insertion idempotent by ignoring an IdeFrameImpl already present in the tab model.
  • Ignore incomplete native tab-group snapshots until all native windows can be matched to IDE frames.

Tests

  • Added WindowTabsComponentTest covering duplicate insertion of the same frame.
  • ./tests.cmd --module intellij.platform.tests --test com.intellij.ui.mac.WindowTabsComponentTest
  • Result: 1 test 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