perf(server): serve timeline pages from retained projection (#7958)

* perf(server): select timeline pages from retained projection

Keep page selection and source coverage indexes with the retained projection so bounded fetches and last-message lookups do not copy or reproject history. Omitted after limits use the existing 200-item store default; explicit zero remains unlimited for released CLI clients.

* test(server): keep timeline page oracle outside production builds
This commit is contained in:
Mohamed Boudra
2026-10-27 09:56:42 +07:00
committed by GitHub
parent 6077bc6219
commit a25f4f5065
7 changed files with 638 additions and 173 deletions
+1 -3
View File
@@ -7787,8 +7787,6 @@ export class Session {
): Promise<void> {
const direction: AgentTimelineFetchDirection = msg.direction ?? (msg.cursor ? "after" : "tail");
const projection = "projected" as const;
const requestedLimit = msg.limit;
const pageLimit = requestedLimit ?? (direction === "after" ? 0 : 200);
const cursor: AgentTimelineCursor | undefined = msg.cursor
? {
epoch: msg.cursor.epoch,
@@ -7807,7 +7805,7 @@ export class Session {
const fetchedControlTimeline = this.agentManager.fetchTimeline(msg.agentId, {
direction,
cursor,
limit: pageLimit,
limit: msg.limit,
});
const selectedTimeline = {
timeline: fetchedControlTimeline,