{"draft":null,"from":244,"to":245,"files":[{"path":"src/engine/view.ts","added":28,"removed":1,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -49,7 +49,14 @@\n /** Structural read boundary shared by historical and transaction-bound projections. */\n export type ReadView = Omit<\n \tPick<View, keyof View>,\n-\t\"sameText\" | \"visibleCount\" | \"shareMoves\" | \"shareFiles\" | \"fileOfNumber\" | \"lineNumberOf\" | \"visibleWriters\"\n+\t| \"sameText\"\n+\t| \"visibleCount\"\n+\t| \"shareMoves\"\n+\t| \"shareFiles\"\n+\t| \"knowPaths\"\n+\t| \"fileOfNumber\"\n+\t| \"lineNumberOf\"\n+\t| \"visibleWriters\"\n > & {\n \tsameText(path: string, other: ReadView): boolean;\n };\n@@ -427,6 +434,17 @@\n \t\tthis.#filesFrom = { from, except };\n \t}\n \t#filesFrom: { from: View; except: () => ReadonlySet<string> | undefined } | null | undefined;\n+\n+\t/**\n+\t * The files this view's set has, from what the project keeps for a published version (abso Capacity): hasFile\n+\t * answers from it, not a layout of the file. Collisions resolving an import tried up to seven names, and each one\n+\t * laid its file out. `paths` is asked once, when first needed; undefined lays files out as before.\n+\t */\n+\tknowPaths(paths: () => ReadonlySet<string> | undefined): void {\n+\t\tif (this.#pathsFrom === undefined) this.#pathsFrom = paths;\n+\t}\n+\t#pathsFrom: (() => ReadonlySet<string> | undefined) | undefined;\n+\t#knownPaths: ReadonlySet<string> | null | undefined;\n \t#filesShared: { from: View; except: ReadonlySet<string> } | null | undefined;\n \t#sharedFiles(): { from: View; except: ReadonlySet<string> } | null {\n \t\tif (this.#filesShared === undefined) {\n@@ -899,6 +917,15 @@\n \n \t/** Whether the file exists in this projection (has a visible line). */\n \thasFile(path: string): boolean {\n+\t\tif (!this.#files.has(path)) {\n+\t\t\t// A file the draft doesn't touch exists as it does in the base; a published version's files are kept.\n+\t\t\tconst shared = this.#filesFrom === undefined ? null : this.#sharedFiles();\n+\t\t\tif (shared && !shared.except.has(path)) return shared.from.hasFile(path);\n+\t\t\tif (this.#pathsFrom !== undefined) {\n+\t\t\t\tif (this.#knownPaths === undefined) this.#knownPaths = this.#pathsFrom() ?? null;\n+\t\t\t\tif (this.#knownPaths) return this.#knownPaths.has(path);\n+\t\t\t}\n+\t\t}\n \t\tconst attrs = this.attrs(path);\n \t\treturn attrs.exists || attrs.link !== null || attrs.blob !== null || this.#file(path).vis.length > 0;\n \t}"}],"unmatched":[]}