From 594475815f1a10e3593786a2d041ca24dc890452 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Fri, 11 Sep 2026 17:29:17 +0200 Subject: [PATCH] refactor: drop the item store's rename command, which nothing calls Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01ViTUkt4czrvZdxdWwxqRAQ --- frontend/src/lib/itemStore.svelte.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/frontend/src/lib/itemStore.svelte.ts b/frontend/src/lib/itemStore.svelte.ts index a031d8f198..6ee0c7bacc 100644 --- a/frontend/src/lib/itemStore.svelte.ts +++ b/frontend/src/lib/itemStore.svelte.ts @@ -388,16 +388,6 @@ class Entry { }) } - rename(to: string): Promise { - return this.run(async () => { - const from = this.key - if (to !== from.path) this.moveTo(to) - this.reconcile() - await this.settleRows([from, this.key]) - return { ok: true } - }) - } - /** * A command that changes what exists resolves once the rows it implied have landed, so a * list re-read on its outcome sees neither the draft a save made redundant nor a draft-only @@ -524,7 +514,6 @@ export type ItemHandle = { readonly canSave: boolean save(): Promise discard(): Promise - rename(to: string): Promise reload(): Promise applyExternal(value: V): number markEdited(): void @@ -614,9 +603,6 @@ class Handle implements ItemHandle { discard() { return this.entry.discard() } - rename(to: string) { - return this.entry.rename(to) - } reload() { return this.entry.load(this.adapter) } @@ -935,7 +921,6 @@ export function useItem( }, save: () => h()?.save() ?? noItem(), discard: () => h()?.discard() ?? Promise.resolve({ removed: false }), - rename: (to) => h()?.rename(to) ?? noItem(), reload: () => h()?.reload() ?? noItem(), applyExternal: (v) => h()?.applyExternal(v) ?? 0, markEdited: () => h()?.markEdited(),