fix(tabs): keep the transcript when a tab drag reparents its view - #726
Open
Adam-Dalloul wants to merge 1 commit into
Open
fix(tabs): keep the transcript when a tab drag reparents its view#726Adam-Dalloul wants to merge 1 commit into
Adam-Dalloul wants to merge 1 commit into
Conversation
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.
Dragging a conversation tab empties its message list. The composer, the header and the tab title all stay right, and the messages only come back after the tab is closed and reopened.
A drag that carries the tab into another group reparents its view, and that unmount removed the conversation's runtime session even though the connection is deliberately carried across it. The remounted view then re-registers its live-message sink on the connection it kept, which recreates the session with live data and no detail, and
fetchDetailskips a session that already has live data, so nothing refetches and the list stays empty.The unmount now asks
isReparentUnmountfirst, the same classifier the connection teardown already uses, and leaves the session alone when the tab is only changing groups.reorderTabsis fixed alongside it.Reorder.Groupemits the order of the items it has measured since its own last render, filtered by reference against its currentvalues, so mid-drag it can hand back a list that is short, repeats an id, or carries a tab object from an earlier derive. The unsplit strip adopted that list as the whole tab set, so a drag could close whichever tab was missing from it, leaveactiveTabIdpointing at nothing, or write a stale copy of a tab back over the current one (a draft that bound to a conversation mid-drag went back to being an unbound draft). It now resolves every entry to the live tab by id and refuses anything that is not a permutation, which is what its split-group sibling already did. Both go through one helper.Six new tests. Three of the four reorder tests fail on main, and so does the reparent wiring; the remaining two pin the behaviour that must not move, including why an emptied list cannot refill itself.