fix(activity): roll subagent activity up to its root and accept only selectable windows

- List child sessions in the activity query and credit each child's latest update
  to its root, so Recent includes roots whose subagents were active inside the
  window; children never become rows, and only roots of in-window children are
  fetched
- Show and sort activity rows by that rolled-up time
- Restrict activityWindowMinutes to the selectable options on write, and coerce a
  stored unknown value to the default on read so it cannot reset every preference
This commit is contained in:
Chris Scott committed 2026-10-16 11:57:52 -04:00
1 parent 8b6251d83b
commit 84cdffa261
22 files changed
+343 -48

No files matched your search

@@ -48,6 +48,7 @@ function createItem(
return {
key: `${overrides.repo.id}:${overrides.session.id}`,
path: `/repos/${overrides.repo.id}/sessions/${overrides.session.id}`,
updatedAt: overrides.session.time.updated,
...overrides,
}
}
@@ -85,7 +85,7 @@ function ActivityRow({ item, isCurrent, onSelect }: ActivityRowProps) {
<span className="block truncate text-xs text-muted-foreground">{repoLine}</span>
</span>
<span className="shrink-0 text-xs text-muted-foreground">
{formatShortRelativeTime(new Date(item.session.time.updated))}
{formatShortRelativeTime(new Date(item.updatedAt))}
</span>
</button>
)
@@ -109,7 +109,7 @@ function CompactActivityRow({ item, isCurrent, onSelect }: ActivityRowProps) {
{getRepoDisplayName(item.repo)}
</span>
<span className="shrink-0 text-xs text-muted-foreground">
{formatShortRelativeTime(new Date(item.session.time.updated))}
{formatShortRelativeTime(new Date(item.updatedAt))}
</span>
</button>
)