diff --git a/frontend/src/lib/components/MoveDrawer.svelte b/frontend/src/lib/components/MoveDrawer.svelte index f2e02e2edd..6f1d1949ea 100644 --- a/frontend/src/lib/components/MoveDrawer.svelte +++ b/frontend/src/lib/components/MoveDrawer.svelte @@ -14,10 +14,11 @@ type Kind = 'script' | 'resource' | 'schedule' | 'variable' | 'flow' | 'app' - /** Where a draft-only item's draft row actually lives. It is parked at a - * generated path while the drawer edits the name the user sees, so the two - * can't be the same string. Empty for a deployed item, which is addressed by - * `initialPath` throughout. */ + /** Where a draft-only item's draft row actually lives, which is what the move + * endpoint addresses; `initialPath` is the name the user sees and edits. The + * two are often equal — a row is only reported under a separate display path + * when the two differ — so this is not a "storage vs display" discriminator, + * only the address. Empty for a deployed item, addressed by `initialPath`. */ let storagePath = $state('') let rawApp = $state(false) let draftOnly = $derived(storagePath !== '') @@ -167,9 +168,8 @@
{#each attachedSummary as { label, count } (label)} {count} {label}{count === 1 - ? '' - : 's'}{count} + {label}{count === 1 ? '' : 's'} {/each}
diff --git a/frontend/src/lib/components/home/BulkActionsBar.svelte b/frontend/src/lib/components/home/BulkActionsBar.svelte index fc7716d109..ec90bee8b3 100644 --- a/frontend/src/lib/components/home/BulkActionsBar.svelte +++ b/frontend/src/lib/components/home/BulkActionsBar.svelte @@ -84,9 +84,6 @@ function actionTitle(action: BulkAction): string { const n = targets(action).length - // Reachable by unticking the last row without leaving selection mode: there is - // nothing to block, so no reason to report. - if (items.length === 0) return `Select items to ${ACTION_LABEL[action].toLowerCase()}` if (n === 0) return `Cannot ${ACTION_LABEL[action].toLowerCase()}: ${blockedSummary(action)}` if (n < items.length) return `${ACTION_LABEL[action]} ${n} of the ${items.length} selected` return `${ACTION_LABEL[action]} ${n} item${plural(n)}` diff --git a/frontend/src/lib/components/home/Item.svelte b/frontend/src/lib/components/home/Item.svelte index aa1d948999..f9e30eaf65 100644 --- a/frontend/src/lib/components/home/Item.svelte +++ b/frontend/src/lib/components/home/Item.svelte @@ -56,12 +56,8 @@ homeSelection.register(b) return () => homeSelection.unregister(b.key) }) - // Gated on `available`, not just on having an item: it is what excludes - // operators and the read-only embedded lists. Without it they would get a - // checkbox and a Select entry that tick rows while `active` stays false - // forever, so the bar that clears the selection never appears. let rowSelection: RowSelection | undefined = $derived( - bulkItem && homeSelection?.available + bulkItem && homeSelection ? { key: bulkItem.key, selected: homeSelection.has(bulkItem.key), diff --git a/frontend/src/lib/components/home/homeSelection.svelte.ts b/frontend/src/lib/components/home/homeSelection.svelte.ts index 453060a884..f4c12a5d20 100644 --- a/frontend/src/lib/components/home/homeSelection.svelte.ts +++ b/frontend/src/lib/components/home/homeSelection.svelte.ts @@ -89,10 +89,6 @@ export class HomeSelection { return this.available && this.selected.size > 0 } - get size(): number { - return this.selected.size - } - get items(): BulkItem[] { return [...this.selected.values()] }