From 023d0fcfce575030ee503c5f60df8c28dba7ab07 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 2 May 2026 11:46:13 +0900 Subject: feat(decks): make deck CRUD work fully offline-first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create / Edit / Delete deck modals now write through localDeckRepository and fire-and-forget syncActionAtom so the change is pushed when the network is up. EditDeckModal reads its note-type list from the local-first noteTypesAtom instead of fetching, and the "reconnect to..." guards on the submit buttons are gone — the user can keep working while offline. Soft-delete intentionally does NOT cascade to notes/cards, matching the server's existing deck.softDelete: the deck disappears from listings and its children become unreachable that way. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/client/db/repositories.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client/db') diff --git a/src/client/db/repositories.ts b/src/client/db/repositories.ts index 8d9a1fe..9f1d27c 100644 --- a/src/client/db/repositories.ts +++ b/src/client/db/repositories.ts @@ -63,7 +63,9 @@ export const localDeckRepository = { */ async update( id: string, - data: Partial>, + data: Partial< + Pick + >, ): Promise { const deck = await db.decks.get(id); if (!deck) return undefined; -- cgit v1.3.1