fix(ui-conversation): keep hero visible while a blank session opens
A summary-proven blank session can only land back on the hero, so the settling phase (visibility:hidden composer seat) blanked the center column for the whole history round-trip during startup auto-selection. Exempt such sessions from settling and treat them as hero while loading.
This commit is contained in:
@@ -22,6 +22,7 @@ export function ConversationRoot({
|
|||||||
const session = useSession(s => s)
|
const session = useSession(s => s)
|
||||||
const inputState = useInput(s => s)
|
const inputState = useInput(s => s)
|
||||||
const cwd = useSessions(s => sessionId === undefined ? undefined : s.byId[sessionId]?.cwd)
|
const cwd = useSessions(s => sessionId === undefined ? undefined : s.byId[sessionId]?.cwd)
|
||||||
|
const summaryBlank = useSessions(s => sessionId === undefined ? undefined : s.byId[sessionId]?.blank)
|
||||||
const workspaces = useWorkspaces(s => s)
|
const workspaces = useWorkspaces(s => s)
|
||||||
|
|
||||||
const [pickerOpen, setPickerOpen] = useState(false)
|
const [pickerOpen, setPickerOpen] = useState(false)
|
||||||
@@ -65,8 +66,13 @@ export function ConversationRoot({
|
|||||||
// While a session is still replaying (loading + blank) the hero/docked
|
// While a session is still replaying (loading + blank) the hero/docked
|
||||||
// choice is unknowable — render the composer hidden instead of flashing
|
// choice is unknowable — render the composer hidden instead of flashing
|
||||||
// the centered hero and snapping to the docked bar (or vice versa).
|
// the centered hero and snapping to the docked bar (or vice versa).
|
||||||
|
// Exemption: a session the list summary already proves blank can only
|
||||||
|
// land on the hero, so hiding would blank the column for the whole
|
||||||
|
// history round-trip (the startup auto-selection flash) for nothing.
|
||||||
const settling = sessionId !== undefined && composerPhase === 'blank' && openState === 'loading'
|
const settling = sessionId !== undefined && composerPhase === 'blank' && openState === 'loading'
|
||||||
const hero = sessionId === undefined || (composerPhase === 'blank' && openState === 'open')
|
&& summaryBlank !== true
|
||||||
|
const hero = sessionId === undefined
|
||||||
|
|| (composerPhase === 'blank' && (openState === 'open' || summaryBlank === true))
|
||||||
const zone: InputZone | undefined =
|
const zone: InputZone | undefined =
|
||||||
session === undefined || inputState === undefined ? undefined : { session, input: inputState }
|
session === undefined || inputState === undefined ? undefined : { session, input: inputState }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user