[feat] Session catalog: expose workspace aggregates for project lists
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend-api-design, databases
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Rust
- Stelle
- 584
- Fork
- 42
- Merge medio
- 9h 41m
- PR unite (30g)
- 929
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di arcships/dim
-
P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
arcships/dim#2294 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
P2 roadmap
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
arcships/dim#2293 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
core enhancement P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
arcships/dim#2291 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
core enhancement P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
arcships/dim#2290 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di arcships/dim
Issue simili
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)Forse già presa @G-darshan-32 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
clipy-recorder/clipy#164 · 1 commento ·
-
p2 ready-mac
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
quickwit-oss/tantivy#3299 ·
I maintainer di solito rispondono entro 1 giorno
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vercel-labs/agent-browser#2797 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
witchesofthehill/manabrew#1309 ·
I maintainer di solito rispondono entro 1 giorno