fix: propagate dynamic session context into SplitPaneRouter#16
Merged
ibastawisi merged 2 commits intotabs-updatesfrom Mar 8, 2026
Merged
fix: propagate dynamic session context into SplitPaneRouter#16ibastawisi merged 2 commits intotabs-updatesfrom
ibastawisi merged 2 commits intotabs-updatesfrom
Conversation
Merged
The router was created once with session baked in at creation time, so session/isLoading changes never propagated into split-pane routes. Mirror the App.tsx pattern: initialize the router with placeholder session values, then pass the live session and all other context via the `context` prop on <RouterProvider> so every render picks up the latest values. Co-authored-by: ibastawisi <13211445+ibastawisi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on split view pull request
fix: propagate dynamic session context into SplitPaneRouter
Mar 8, 2026
ibastawisi
added a commit
that referenced
this pull request
Mar 8, 2026
* update editor package * feat: implement split pane layout with tab management * refactor: centralize URL detection logic for drag-and-drop functionality - Introduced `hasUrlInDataTransfer` utility function to streamline URL detection across `PaneContent`, `useUrlDropOnPaneContent`, and `useUrlDropOnTabBar` components. - Updated drag event handlers to utilize the new utility for improved readability and maintainability. * fix: propagate dynamic session context into SplitPaneRouter (#16) * Initial plan * fix: pass dynamic context to SplitPaneRouter's RouterProvider The router was created once with session baked in at creation time, so session/isLoading changes never propagated into split-pane routes. Mirror the App.tsx pattern: initialize the router with placeholder session values, then pass the live session and all other context via the `context` prop on <RouterProvider> so every render picks up the latest values. Co-authored-by: ibastawisi <13211445+ibastawisi@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ibastawisi <13211445+ibastawisi@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: ibastawisi <13211445+ibastawisi@users.noreply.github.com>
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.
SplitPaneRouterbakedsessioninto the router context at creation time viauseState, so session changes (login, logout, refresh) never propagated into split-pane routes, breaking auth-gated behaviour.Changes
SplitPaneRouter.tsx: Initialize the router with a placeholder session ({ data: null, isLoading: true }), then pass all dynamic values —store,queryClient,session,isSplitPane,splitPaneType— via thecontextprop on<RouterProvider>, matching the pattern already used inApp.tsx.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.