From 4e8548892181ca483e67865ae087f6aa8be3fb3b Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 16 Nov 2025 21:01:38 +0100 Subject: [PATCH] Simplify unclaim logic - only for claimed state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refine unclaim button visibility to prevent confusing UX where users could "unclaim" status updates they didn't claim. Changes: - Only show "Unclaim" button when task is in "claimed" state - Remove "Unclaim" button from in-progress and completed states - Maintain check that current user must be the claimer Rationale: - Prevents confusion where user marks task in-progress but sees "Unclaim" - "Unclaim" makes sense only for the original claim action - Users can still update status (mark in-progress/complete) on any task - But only the claimer can unclaim the original claim Example scenarios: - Alice claims task → Alice sees "Unclaim" button - Bob marks Alice's task as in-progress → Bob does NOT see "Unclaim" - Only Alice can unclaim, reverting task to unclaimed state This simple rule prevents UX confusion until we implement full per-user status tracking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/modules/nostr-feed/components/ScheduledEventCard.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/nostr-feed/components/ScheduledEventCard.vue b/src/modules/nostr-feed/components/ScheduledEventCard.vue index 51c8102..3abb133 100644 --- a/src/modules/nostr-feed/components/ScheduledEventCard.vue +++ b/src/modules/nostr-feed/components/ScheduledEventCard.vue @@ -74,9 +74,11 @@ const completion = computed(() => props.getCompletion(eventAddress.value, occurr // Get current user's pubkey const currentUserPubkey = computed(() => authService?.user.value?.pubkey) -// Check if current user can unclaim (only if they created the current status) +// Check if current user can unclaim +// Only show unclaim for "claimed" state, and only if current user is the one who claimed it const canUnclaim = computed(() => { if (!completion.value || !currentUserPubkey.value) return false + if (taskStatus.value !== 'claimed') return false return completion.value.pubkey === currentUserPubkey.value })