diff --git a/bun.lock b/bun.lock index 169ad5a3..0bff7da3 100644 --- a/bun.lock +++ b/bun.lock @@ -1095,6 +1095,8 @@ "@twsxtd/hapi-linux-x64": ["@twsxtd/hapi-linux-x64@0.25.3", "", { "os": "linux", "cpu": "x64", "bin": { "hapi": "bin/hapi" } }, "sha512-mLe7mJKctdEIeMmf19u0wWcpf4Lj7sA/SJT65cd+4G5wWRy632SAPcJ7pl+KSdsbEu9TMTyrXm1L4usB0xc4Gg=="], + "@twsxtd/hapi-win32-x64": ["@twsxtd/hapi-win32-x64@0.25.3", "", { "os": "win32", "cpu": "x64", "bin": { "hapi": "bin/hapi.exe" } }, "sha512-K1zhYTj8eAPt5W7q92U4ywdUs0122faulU2kywHOuzmwO95nI4zQ0CXlCNkJlGpTv6AYj7GiQdU21sR1NJSYFg=="], + "@types/aria-query": ["@types/aria-query@5.0.4", "", {}, "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw=="], "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], diff --git a/web/src/components/SessionList.tsx b/web/src/components/SessionList.tsx index d27ed862..d1bb1e48 100644 --- a/web/src/components/SessionList.tsx +++ b/web/src/components/SessionList.tsx @@ -764,9 +764,10 @@ function SessionItem(props: { api: ApiClient | null selected?: boolean showDetailedStatus?: boolean + inRunningSection?: boolean }) { const { t } = useTranslation() - const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false } = props + const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false } = props const { haptic } = usePlatform() const [menuOpen, setMenuOpen] = useState(false) const [menuAnchorPoint, setMenuAnchorPoint] = useState<{ x: number; y: number }>({ x: 0, y: 0 }) @@ -859,6 +860,7 @@ function SessionItem(props: { nestedTooltips attentionTooltipId={attentionId} scheduleTooltipId={scheduleId} + inRunningSection={inRunningSection} /> @@ -1066,8 +1068,14 @@ export function SessionList(props: { : visibleSessions.filter(session => (session.metadata?.machineId ?? UNKNOWN_MACHINE_ID) === activeMachineFilter), [visibleSessions, activeMachineFilter] ) + const runningSessions = useMemo( + () => machineFilteredSessions + .filter((session) => session.active) + .sort((a, b) => b.updatedAt - a.updatedAt), + [machineFilteredSessions] + ) const groups = useMemo( - () => groupSessionsByDirectory(machineFilteredSessions), + () => groupSessionsByDirectory(machineFilteredSessions.filter((session) => !session.active)), [machineFilteredSessions] ) const [collapseOverrides, setCollapseOverrides] = useState>( @@ -1393,12 +1401,41 @@ export function SessionList(props: { /> ) : null} - {props.sessions.length > 0 && (isFiltering || activeMachineFilter !== null) && groups.length === 0 ? ( + {props.sessions.length > 0 && (isFiltering || activeMachineFilter !== null) && groups.length === 0 && runningSessions.length === 0 ? (
{t('sessions.search.noResults')}
) : null} + {runningSessions.length > 0 ? ( +
+
+
+
+ {runningSessions.map((s) => ( + + ))} +
+
+ ) : null} {groups.map((group) => { const isCollapsed = isGroupCollapsed(group) const visibleGroupSessions = getVisibleGroupSessions(group) diff --git a/web/src/components/SessionRowSummary.tsx b/web/src/components/SessionRowSummary.tsx index df94b8bd..72641dff 100644 --- a/web/src/components/SessionRowSummary.tsx +++ b/web/src/components/SessionRowSummary.tsx @@ -111,6 +111,8 @@ export function SessionRowSummary(props: { attentionTooltipId?: string scheduleTooltipId?: string className?: string + /** Rows inside the pinned "in progress" section skip the text label (dot only). */ + inRunningSection?: boolean }) { const { session: s, @@ -121,6 +123,7 @@ export function SessionRowSummary(props: { attentionTooltipId: attentionTooltipIdProp, scheduleTooltipId: scheduleTooltipIdProp, className, + inRunningSection = false, } = props const { t } = useTranslation() const sessionName = getSessionTitle(s) @@ -136,6 +139,8 @@ export function SessionRowSummary(props: { [s, selected, showDetailedStatus] ) const attentionLabel = attention ? getAttentionLabel(attention, t) : null + const urgentAttention = attention !== null + && (attention.kind === 'permission' || attention.kind === 'input') const scheduledLabel = s.futureScheduledMessageCount > 1 ? t('session.item.scheduledMessages', { count: s.futureScheduledMessageCount }) : t('session.item.scheduledMessage') @@ -160,7 +165,30 @@ export function SessionRowSummary(props: { {sessionName} {s.active && s.thinking ? ( - + + ) : urgentAttention && nestedTooltips && attentionId ? ( + + ) : urgentAttention ? ( + + ) : s.active ? ( + + ) : attention && nestedTooltips && attentionId ? (