You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A late New chat tab takes the selection from a tab opened meanwhile #497
The "New chat in " button on a project row creates the session first, a round trip to main through session.create, and opens the new chat's tab, selected, only when that call returns. A tab the person opens in the meantime (the library, an artifact, another session) is selected first, and then loses the selection to the late chat tab. On a loaded machine the round trip can take about a second, which is long enough for a second click.
Found while fixing a hosted e2e flake (PR #495, e2e/support/sidebar.tsnewChatIn). Its red snapshot showed tabs Artifacts, then New chat selected, with the composer focused. Under a busy loop per core, master's helper returned before its tab in 18 of 22 calls (run 42155530599). The e2e helper now waits for the tab; the product still steals the selection.
Expected
A late New chat tab opens without taking the selection from a tab the person opened after pressing +, the way a browser opens a new tab in the background once focus has moved. If nothing else was opened in between, it opens selected as today.
Where
The renderer path behind the project row's New chat button, where the new session's tab is opened after session.create resolves. The fix is a check at that point: was the selected tab changed since the click? If so, add the tab unselected.
Proof
A renderer test (happy-dom) that holds session.create's answer, selects another tab, then releases it, and asserts that the other tab stays selected and the chat tab is added. The newChatIn e2e helper keeps working unchanged.
Deferred UX work (the owner, earlier: register UX items as tickets to pick up when UX work resumes).
Activity
U13a M3: New chat is one entry (newChat): an empty chat reused, the o…