diff --git a/docker/frontend/src/Library.tsx b/docker/frontend/src/Library.tsx index 2b61d37..17f8e0c 100644 --- a/docker/frontend/src/Library.tsx +++ b/docker/frontend/src/Library.tsx @@ -1065,12 +1065,20 @@ export function Library() { > {rows.map((n) => { const folder = folders.find((f) => f.name === n.key.split('/')[0]) ?? null; - // The row being read says so, and no other: a roll is read - // from one folder down, and every row of that roll spinning - // is a tree that says all of itself is being read when one - // branch of it is. The row is the folder the reading was - // kept to, which for a whole roll is the roll's own row. - const scanning = !!folder && live?.folder === folder.name && relOf(n.key) === live.progress.from; + // The rows that say a reading is under way are the folder it + // was kept to and every folder above it on the way down, and + // never a folder under it, which the reading has not reached. + // Depth is why: a branch folded shut hides the row being read, + // and the rows above it are what keeps the work in sight while + // the folder doing it is out of sight. The roll's own row is + // the exception, and says so only when the roll itself is what + // is being read — a roll asked to speak for one branch of + // itself tells the reader the whole of it is being read, which + // is the one answer a deep tree cannot afford. + const dir = relOf(n.key); + const from: string | null = live && live.folder === folder?.name ? live.progress.from : null; + const scanning = + dir !== null && from !== null && (dir === '' ? from === '' : dir === from || from.startsWith(dir)); const under = parents.has(n.key); return (