feat(items): move an item to another list with a long swipe

A longer swipe left on an item (past the edit threshold) opens a dialog
with the user's other lists; picking one moves the item there while the
user stays on the current list. On desktop, right-click now opens a
context menu with "Editar" and "Mover a otra lista…".

The API gets POST /api/lists/:listId/items/:itemId/move, which requires
membership in both lists and publishes item.removed on the source list
and item.created on the target, so other members see the change live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-10-20 20:24:38 -03:00
parent 86d4796d88
commit feb8df14c0
13 changed files with 807 additions and 71 deletions

View File

@@ -5,6 +5,7 @@ import type { QueryKey } from '@tanstack/react-query'
export const LIST_EVENT_TYPES: readonly ListEventType[] = [
'item.created',
'item.updated',
'item.removed',
'invitation.created',
'member.added',
'list.updated',
@@ -19,6 +20,7 @@ export function queryKeysForListEvent(type: ListEventType, listId: string): Quer
switch (type) {
case 'item.created':
case 'item.updated':
case 'item.removed':
return [['lists', listId, 'items']]
case 'invitation.created':
case 'member.added':