diff --git a/docker/frontend/src/Library.tsx b/docker/frontend/src/Library.tsx index ea16806..c587118 100644 --- a/docker/frontend/src/Library.tsx +++ b/docker/frontend/src/Library.tsx @@ -1656,14 +1656,34 @@ function Catalogue() { // left bare, and the toolbar's line is what carries them. const isScanFolderMatch = !!(live && folder && normPath(live.folder) === normPath(folder.name)); const scanAt = live?.progress.at ? normPath(live.progress.at) : ''; - const nodeRel = (relOf(n.key) ?? '').replace(/\/$/, ''); - const scanning = isScanFolderMatch && ( - n.depth === 0 ? true : (scanAt === nodeRel || scanAt.startsWith(nodeRel ? `${nodeRel}/` : '')) - ); - const waiting = !scanning && isScanFolderMatch && scanQueue().some((j) => { - const qRel = (j.rel ?? '').replace(/\/$/, ''); - return qRel === nodeRel || qRel.startsWith(nodeRel ? `${nodeRel}/` : ''); - }); + // The row's own path under its own roll, spelled the way the + // walk spells one. Not `relOf`, which answers for the open + // node's roll alone: a reading of another roll draws its ring + // on that roll's rows too, and those rows still have to say + // where it stands. + const normFolder = folder ? normPath(folder.name) : ''; + const nodeRel = + n.depth === 0 || !normFolder || !n.key.startsWith(`${normFolder}/`) + ? '' + : n.key.slice(normFolder.length + 1); + const scanning = + isScanFolderMatch && + n.depth > 0 && + nodeRel !== '' && + (scanAt === nodeRel || scanAt.startsWith(`${nodeRel}/`)); + // What is waiting its turn is waiting on the row it was asked + // of, and on every row above it: a request under a folded + // branch still says the roll has work queued. The roll's own + // row says nothing, for the reason it says nothing of the + // reading — and a request belongs to the roll it was asked + // of, so another roll's queue is not this row's news. + const waiting = + !scanning && + n.depth > 0 && + nodeRel !== '' && + scanQueue().some( + (j) => j.folder === folder?.name && (j.rel === `${nodeRel}/` || j.rel.startsWith(`${nodeRel}/`)) + ); const under = parents.has(n.key); return (