Skip to content

Fix a bug where the same file could open in two tabs at once. Clicking…#338

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 26, 2026
Merged

Fix a bug where the same file could open in two tabs at once. Clicking…#338
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Fix a bug where the same file could open in two tabs at once. Clicking a sidebar file that is already open in another tab now focuses that existing tab instead of opening a duplicate — including when a blank "New Tab" placeholder is the active tab (the active placeholder is consumed). The same focus-in-place behavior applies to folder and asset tabs. Tabs restored from a saved session that already contain two views of one file are left untouched.

…e (#2205)

* fix(open-knowledge): focus existing tab instead of opening a duplicate

Clicking a sidebar file already open in another tab now activates that
tab instead of opening a second tab for the same file. Previously, when
the active tab was a blank New Tab placeholder (or a different document),
opening an already-open file minted a duplicate tab.

openTab now scans the open tabs for an existing instance of the target
and focuses it; the blank-tab open path in DocumentContext routes through
openDocTab so the focus-in-place logic lives in one place. The duplicate
tab creation helpers are removed, while tab-instance parsing stays so any
duplicates already persisted in a session still load.

Implements FR3 from the 2026-05-16 tabs polish spec.

PRD-7192

* test(open-knowledge): cover append focus path, restore e2e wait notes

Add a unit test for openDocTab focus-in-place under behavior: 'append'
(reachable in production when the active tab is pinned), guarding against
a refactor that narrows the focus check to replace-active only.

Restore one-line rationale on the retained waitForActiveProviderSynced
calls in the .mdx tab test: they guard a Pierre-tree click/focus race
under worker contention, which the helper name alone does not convey.

Addresses non-blocking review feedback on PR #2205.

GitOrigin-RevId: 2a5395ce39c0fa964aa93ce5f9a7a584809881d2

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28268862985). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync inkeep-oss-sync Bot merged commit 8590c57 into main Jun 26, 2026
1 check passed
@inkeep-oss-sync inkeep-oss-sync Bot deleted the copybara/sync branch June 26, 2026 22:33
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