[feat] Session catalog: expose workspace aggregates for project lists
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend-api-design, databases
Línea de trabajo
Start by reading the session.catalog implementation and the owner Session row and activity timestamp definitions; the issue does not name their file paths. Compare the existing cwd filtering with the proposed project-scoped summaries, and review #1956 and #1099 for related semantics. Done means a bounded paged read returns workspace counts and latest activity with origin, closed-session, ordering, cursor, compatibility, and performance behavior defined and documented.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem / Context
Desktop clients need a bounded project/workspace list: for each workspace they render a Session count and the latest activity time, and they page workspaces. session.catalog exposes Session rows filtered by cwd, but it has no aggregate for a workspace.
The Electron client currently pages every Session row for the requested cwds and aggregates sessionCount, nonAcpSessionCount, createdAt and latestUpdatedAt locally in SessionService.listWorkspacePage (packages/desktop/packages/electron-main/src/services/session-service.ts). The renderer asks for workspace pages on startup and after activity changes; each refresh can walk the whole catalog for every requested workspace. This is O(Sessions in those workspaces) per read, repeated in every window, and every client would have to implement the same filtering and ordering.
session.catalog already accepts a cwd set (session.catalog.workspaces), but it still returns individual rows. Desktop issue #279 wired that cwd filter; it did not add aggregates.
Proposal
Add a read-only owner projection, for example:
session.workspace.summaries {
cwds?: string[],
projectCwd?: string,
limit?: number,
cursor?: string
}
-> {
items: [{
cwd: string,
projectCwd?: string,
sessionCount: number,
nonAcpSessionCount: number,
createdAt: number,
latestUpdatedAt: number
}],
nextCursor?: string
}
or an includeWorkspaceSummaries option on session.catalog that returns aggregates for the requested cwds. The preferred shape is project-scoped (projectCwd) so it composes with #1956.
Semantics to define:
- which origins count (
client,acp,internal,automation), or return separate counts; - whether closed Sessions count (probably no by default; expose
includeClosedif needed); - whether
latestUpdatedAtis the same fact as catalogupdatedAt(see #1099: real activity only); - stable ordering and cursor semantics.
Why this belongs in App Server
Workspace counts and latest activity are derived from owner Session rows. The owner already owns the catalog, worktree association and activity timestamp. A client cannot compute them without reading every row, and each client will drift on ACP/automation/closed filtering. This is a read projection, not a new store.
Client-local archive is a Desktop preference (upstream #279 declined a cross-client archive fact). Desktop can subtract locally archived ids from counts if the summary includes enough identity; otherwise it will treat counts as unfiltered or drop them. Do not make the owner aware of client archive state.
If upstream declines
If workspace aggregates are considered unnecessary, say so explicitly. Desktop will remove per-workspace counts and workspace pagination, load one Session page on demand, and stop scanning the catalog for summaries. We will not add a Desktop-local workspace index.
Acceptance
- A client can read per-workspace counts and latest activity for a requested cwd set in one bounded, paged owner read.
- Worktree Sessions can be aggregated under
projectCwdwhen #1956 is available. - ACP/automation/closed filtering is explicit and documented.
- An older client ignores the new method/fields; a feature gate is advertised.
- Performance evidence shows the read is bounded by the requested workspace/page, not by the total Session count.
Boundaries
- No new Session store or index in clients.
- No client archive/attention/settle state in the owner.
- No payloads, titles, previews or message content beyond the aggregate fields.
Related
- Desktop tracking issue will be linked in a comment.
- #1956
- #1099 (
updatedAtshould mean real activity, not restore bookkeeping) - Desktop #279 (closed: only cwd filtering was wired)
- Lenguaje dominante
- Rust
- Estrellas
- 584
- Forks
- 42
- Merge medio
- 9 h 41 min
- PR fusionados (30 d)
- 929
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de arcships/dim
-
P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
arcships/dim#2294 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
P2 roadmap
Dificultad 3/5 Medio día Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
P2
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
arcships/dim#2293 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
core enhancement P2
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
arcships/dim#2291 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
core enhancement P2
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
arcships/dim#2290 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de arcships/dim
Issues similares
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)Posiblemente ocupada @G-darshan-32 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
clipy-recorder/clipy#164 · 1 comentario ·
-
p2 ready-mac
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quickwit-oss/tantivy#3299 ·
Los mantenedores suelen responder en 1 día
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vercel-labs/agent-browser#2797 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
witchesofthehill/manabrew#1309 ·
Los mantenedores suelen responder en 1 día