Versions 39 to 318
Lines 1–15 at 318 (were 1–14 at 39)
12// The version list reads: log (versions newest first, or one file's history), ribbon (who published each version),
23// show (one version's changes), fileAt, compare and viewAt. They read through LogHost; today the host is the project
45
5−import { type AtomId, type Graph, View } from "../../src/engine/index.ts";
11−import { changesBetween } from "./view-changes.ts";
1213
Lines 20–31 at 318 (were 19–30 at 39)
22− viewAt(space: Space, version: number): View;
23− view(set: ReadonlySet<AtomId>): View;
25− spellingIn(view: View, path: string): string;
27− touchedFiles(ids: Iterable<AtomId>, views: readonly View[]): Set<string>;
2930
Lines 60–83 at 318 (were 59–76 at 39)
5960 // A file's history (#43): only versions whose changes name the file, or a file moves can carry lines from, can have changed it.
6061 const sources = path === undefined ? undefined : new Set(names.flatMap((n) => [...moveSources(host.graph, n.path)]));
62− const views = new Map<number, View>();
6667 if (![...p.atoms, ...(p.dropped ?? [])].some((id) => g.filesOf(id).some((f) => sources.has(f)))) continue;
69+ // With a path: only the versions that changed that file (its history), under its name then. Their files first, and
70+ // the whole entry (every atom of the version read) only for those (abso Capacity): a file's history read every
71− // With a path: only the versions that changed that file (its history), under its name then.
73− else if (entry.files.includes(nameAt(v))) versions.push(nameAt(v) === path ? entry : { ...entry, path: nameAt(v) });
7582 const next = v >= 0 && versions.length > 0 ? versions[versions.length - 1]!.version : undefined;
7683 const movedFrom = names.slice(0, -1).map((n, i) => ({ path: names[i + 1]!.path, version: n.since }));
Lines 186–192 at 318 (were 179–185 at 39)
181188
182−function logEntry(host: LogHost, space: Space, version: number, views?: Map<number, View>): LogEntry {
189+function logEntry(host: LogHost, space: Space, version: number, views?: Map<number, ReadView>): LogEntry {
Lines 244–345 at 318 (were 237–271 at 39)
239246
240−/** Every file that differs between two versions of shared (or a named draft), before (at `from`) and after (at `to`). */
241−export function compare(
248+ * fileAt for exactly this spelling, from the file's own lines (abso Capacity, 2026-10-17): no spelling lookup and no
249+ * list of the version's files. fileAt's hasFile answers from the version's whole path list, folded from version 0
250+ * when nothing's kept, and a spelling it doesn't find reads every known path. A name nothing ever wrote is one read.
266+ // hasFile's own test, without its path list: kept while empty, a link, a binary, or a visible line.
267+ const exists = attrs.exists || attrs.link !== null || attrs.blob !== null || view.lines(path).length > 0;
275+
276+/** The files that may differ between two versions, and both views: compare's and compareSummary's ground. */
245− options: { draft?: string | null; agent?: string } = {},
246−): { from: number; to: number; files: FileChange[] } {
290+ // A stored writer keeps each shared version's changed files (version-files.ts, abso Capacity): every file that
291+ // differs between two versions changed in one between them, so those lists are the candidates, not every atom
253− const files = new Set<string>();
259− [...x].filter((id) => !y.has(id)),
260− [host.view(a), host.view(b)],
264− return { from, to, files: changesBetween(host.view(a), host.view(b), files) };
266314
267−/** A version of shared (or of a named draft) as a View, for reading lines (blame at a version). */
268−export function viewAt(host: LogHost, version: number, options: { draft?: string | null; agent?: string } = {}): View {
315+/** Every file that differs between two versions of shared (or a named draft), before (at `from`) and after (at `to`). */
325+
326+/** compare's files as each one's size and SHA-256 before and after, not its texts (abso issue 680). */
336+
337+/** A version of shared (or of a named draft) as a ReadView, for reading lines (blame at a version). */
- MCP
- compare on this site's /mcp
- CLI
- abso diff 39 318 worker/project/version-log.ts --json
- JSON
- /christopher/abso-core/compare/39..318?file=worker%2Fproject%2Fversion-log.ts&format=json