fix(chat): keep the outgoing conversation still until the next one replaces it
Switching sessions moved the conversation on screen before the swap: the composer and the status chip followed the live selection and re-shaped a commit ahead of the timeline, so the pinned outgoing chat jumped; and the reveal effect re-ran for the outgoing session when its waited flag flipped, hiding it a few frames before the next one mounted. The chat column now reads one deferred session, and the reveal runs once per opened session.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import React from 'react';
|
||||
|
||||
/**
|
||||
* The session the chat column is showing — the deferred selection the
|
||||
* timeline renders, not the live store value. The composer and everything
|
||||
* stacked with the timeline read it so the column changes as one: a session
|
||||
* click publishes the live selection first, and a composer that followed it
|
||||
* would change height (changed-files row, todos, queued chips) while the
|
||||
* outgoing timeline is still on screen, shoving that timeline before the swap.
|
||||
*/
|
||||
export type ChatColumnSession = {
|
||||
sessionId: string | null;
|
||||
directory: string | null;
|
||||
};
|
||||
|
||||
export const ChatColumnSessionContext = React.createContext<ChatColumnSession | null>(null);
|
||||
|
||||
export const useChatColumnSession = (): ChatColumnSession | null => React.useContext(ChatColumnSessionContext);
|
||||
Reference in New Issue
Block a user