mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(web): don't auto-expand directory groups when opening pinned running sessions
This commit is contained in:
@@ -1170,7 +1170,11 @@ export function SessionList(props: {
|
||||
return
|
||||
}
|
||||
|
||||
const group = allGroups.find(g =>
|
||||
// Pinned "in progress" sessions are not rendered inside directory
|
||||
// groups, so only auto-expand when the selected session actually lives
|
||||
// in a visible group. Using `allGroups` here would expand the group
|
||||
// below whenever a running session is opened.
|
||||
const group = groups.find(g =>
|
||||
g.sessions.some(s => s.id === selectedSessionId)
|
||||
)
|
||||
if (!group) return
|
||||
@@ -1180,7 +1184,7 @@ export function SessionList(props: {
|
||||
autoExpandedSelectedSessionKeyRef.current = autoExpandKey
|
||||
|
||||
setCollapseOverrides(prev => expandSelectedSessionCollapseOverrides(prev, group))
|
||||
}, [selectedSessionId, allGroups])
|
||||
}, [selectedSessionId, groups])
|
||||
|
||||
// Clean up stale collapse overrides
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user