mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
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:
1 parent
8b6251d83b
commit
84cdffa261
22 files changed
+343
-48
No files matched your search
@@ -37,6 +37,7 @@ function createActiveWorkItem(): ActiveWorkItem {
|
||||
return {
|
||||
key: '1:s1',
|
||||
state: 'recent',
|
||||
updatedAt: now,
|
||||
path: '/repos/1/sessions/s1',
|
||||
session: {
|
||||
id: 's1',
|
||||
|
||||
@@ -105,12 +105,14 @@ function createRepo(id: number, name: string, fullPath: string) {
|
||||
}
|
||||
|
||||
function createActiveWorkItem(): ActiveWorkItem {
|
||||
const session = createSession('s1', Date.now(), '/path/to/repo1')
|
||||
return {
|
||||
key: '1:s1',
|
||||
state: 'recent',
|
||||
path: '/repos/1/sessions/s1',
|
||||
session: createSession('s1', Date.now(), '/path/to/repo1'),
|
||||
session,
|
||||
repo: createRepo(1, 'repo1', '/path/to/repo1'),
|
||||
updatedAt: session.time.updated,
|
||||
path: '/repos/1/sessions/s1',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ function createActivityItem(id: string, title: string, repoId: number, repoName:
|
||||
session,
|
||||
repo,
|
||||
state: 'recent',
|
||||
updatedAt: session.time.updated,
|
||||
path: `/repos/${repoId}/sessions/${id}`,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user