{"draft":null,"from":157,"to":158,"files":[{"path":"server/src/engine-project.ts","added":12,"removed":3,"diff":"--- a/server/src/engine-project.ts\n+++ b/server/src/engine-project.ts\n@@ -536,14 +536,23 @@\n \t\tif (!this.read) throw Object.assign(new Error(\"the feed needs the log\"), { code: \"not-implemented\" });\n \t\tconst end = this.project.logLength;\n \t\tconst start = Math.max(0, Math.min(from, end));\n-\t\tconst entries = start < end ? this.read(start, Math.min(limit, end - start)) : [];\n+\t\t// Discard each canonical payload after extracting its event. A feed page must\n+\t\t// not retain every historical file payload in the requested range.\n+\t\tconst events = [];\n+\t\tlet next = start;\n+\t\twhile (next < end && next - start < limit) {\n+\t\t\tconst entries = this.read(next, 1);\n+\t\t\tif (entries.length === 0) break;\n+\t\t\tevents.push(...feedEvents(entries, next));\n+\t\t\tnext += entries.length;\n+\t\t}\n \t\t// A drop event names the files it took out (#41), so a timeline needs no read per drop.\n-\t\tconst events = feedEvents(entries, start).map((e) => {\n+\t\tconst enriched = events.map((e) => {\n \t\t\tif (e.type !== \"drop\" || e.version === undefined) return e;\n \t\t\tconst v = this.project.log({ limit: 1, before: e.version + 1 }).versions[0];\n \t\t\treturn v && v.version === e.version ? { ...e, dropped: v.files } : e;\n \t\t});\n-\t\treturn { next: start + entries.length, end, events };\n+\t\treturn { next, end, events: enriched };\n \t}\n \n \t/** The log position for a time (ms since 1970) or a version of shared (#41). */"}],"unmatched":[]}