feat: tangent - keep track of open tabs while switching sessions inside project - #2729
Open
Conversation
This was referenced Sep 17, 2026
🎩 PreviewA preview build has been created at: |
This was referenced Sep 17, 2026
Collaborator
Author
This was referenced Sep 17, 2026
maxy-shpfy
force-pushed
the
09-16-feat_tangent_-_keep_track_of_open_tabs_while_switching_sessions_inside_project
branch
2 times, most recently
from
September 18, 2026 19:13
f6fa66c to
f7cfa0b
Compare
maxy-shpfy
force-pushed
the
09-16-feat_tangent_-_keep_track_of_open_tabs_while_switching_sessions_inside_project
branch
from
September 18, 2026 19:18
f7cfa0b to
be4b27c
Compare
maxy-shpfy
force-pushed
the
09-16-feat_tangent_-_keep_track_of_open_tabs_while_switching_sessions_inside_project
branch
from
September 18, 2026 19:28
be4b27c to
b799a06
Compare
maxy-shpfy
marked this pull request as ready for review
September 18, 2026 19:35
This was referenced Sep 18, 2026
Mbeaulne
added this pull request to stack #2782
September 22, 2026 14:59
This was referenced Sep 22, 2026
camielvs
approved these changes
Sep 23, 2026
camielvs
force-pushed
the
09-16-feat_tangent_-_keep_track_of_open_tabs_while_switching_sessions_inside_project
branch
from
September 23, 2026 22:22
b799a06 to
f02add5
Compare
camielvs
force-pushed
the
09-16-feat_tangent_-_keep_track_of_open_tabs_while_switching_sessions_inside_project
branch
from
September 23, 2026 22:35
f02add5 to
e75392b
Compare
camielvs
force-pushed
the
09-16-feat_tangent_-_keep_track_of_open_tabs_while_switching_sessions_inside_project
branch
from
September 23, 2026 23:37
e75392b to
69346a0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Workarea tabs and session tabs are now scoped per-session rather than being reset on every session switch. When the active session changes, the previously open tabs for that session are restored instead of cleared. Backgrounded sessions' tabs unmount naturally, cleaning up their environment/bridge/store registrations without any explicit teardown.
Key changes:
useTangentSessionTabsnow accepts asessionIdand stores tab state in abySessionmap keyed by session ID. Switching sessions automatically restores the correct tab state.resetTabsis replaced bydropSession, which removes a specific session's entry from the map.TangentProjectContextintroducesworkareaTabsBySessionRefandworkareaActiveBySessionRefas the per-session source of truth for workarea tabs. The existingworkareaTabsstate and refs mirror only the active session. On session switch, the incoming session's tabs are restored from these maps rather than wiping everything.setSessionTabsandsetSessionActiveTabIdhelpers ensure all tab mutations are written to both the per-session maps and the active-session mirror atomically.activeSessionIdis derived beforeuseTangentSessionTabsis called so the hook always receives the correct session ID.syncActiveTabRefsextracts the ref-sync logic shared between the session-switch restore path and theuseEffectthat tracks active tab changes. It also improves thelastEditorTabIdReffallback: if the last known editor tab is still open it is kept; otherwise the newest pipeline tab is used.dropSessionis called to clean up the tab hook's state.Screen Recording 2026-09-18 at 12.34.48 PM.mov (uploaded via Graphite)
Test Instructions