refactor: tangent - migrate tangetproectcontext onto mobx - #2730
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-refactor_tangent_-_migrate_tangetproectcontext_onto_mobx
branch
from
September 18, 2026 18:52
ca8eb50 to
f760f32
Compare
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-refactor_tangent_-_migrate_tangetproectcontext_onto_mobx
branch
from
September 18, 2026 19:13
f760f32 to
f9b1020
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-refactor_tangent_-_migrate_tangetproectcontext_onto_mobx
branch
from
September 18, 2026 19:18
f9b1020 to
daf14be
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
force-pushed
the
09-16-refactor_tangent_-_migrate_tangetproectcontext_onto_mobx
branch
from
September 18, 2026 19:28
daf14be to
17587d6
Compare
maxy-shpfy
marked this pull request as ready for review
September 18, 2026 19:35
This was referenced Sep 18, 2026
This was referenced Sep 18, 2026
Draft
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
Extracts the Tangent project shell's UI state out of
TangentProjectContextand into a new MobX-basedTangentProjectStoreclass. Previously, all session, chat tab, and workarea tab logic lived as a large collection of React state, refs, and functions inside the context provider. The store now owns this state as observable properties, making it the single source of truth for which session is active and each session's chat and workarea tabs.Key changes:
TangentProjectStorereplaces the inline context value, exposing observable computed properties (activeSessionId,workareaTabs,chatTabs, etc.) and actions (selectSession,openAgent,closeChatTab,openResolvedView,closeWorkareaTab, etc.)useTangentProject()now access the store directly and are wrapped with MobXobserverso they re-render reactivelyResourcesWindowContent,ProjectHeader,SessionsWindowContent)AttachResourceInput,ProjectResourceKind, andProjectResourceItemtypes are relocated to the files where they are used rather than being exported from the contextuseTangentSessionTabshook and its test file are deleted; the equivalent logic now lives inTangentProjectStoreTangentProjectAgentProviderno longer maintains adepsRefand agetActiveTabBridgeRef; instead it reads directly from the store instance, which MobX keeps currentonErrorcallbacks in components are replaced with direct calls touseToastNotificationTangentProjectStoreis added covering chat tabs, workarea tabs, bridge resolution, and environment waitingScreenshots (if applicable)
Test Instructions
TangentProjectStore.test.tssuite to confirm all unit tests pass.Additional Comments
Server-fetched data (project, resources, sessions) intentionally remains in TanStack Query and is not moved into the store. The store owns only UI state that multiple parts of the shell and the out-of-render agent tools need to share.