Update drop embed to say who dropped it when no one has claimed it yet #397

Open
opened 2024-10-18 13:25:13 +01:00 by Vylpes · 3 comments
Owner

Show who created a claimable drop in the Discord embed before anyone claims it, then switch to showing who claimed it after a successful claim.

Story Points: 2

Acceptance Criteria

GIVEN a user posts a claimable card drop via /drop or the reroll (🔁) button
WHEN the drop message is first shown and the card has not been claimed
THEN the embed includes an inline field named Dropped by
AND the field value is the dropper's Discord username (same format as the existing Claimed by field)

GIVEN an unclaimed drop embed that shows Dropped by
WHEN another user successfully claims the card via the Claim button within the claim window
THEN the Dropped by field is no longer shown
AND the embed shows Claimed by with the claimer's Discord username
AND the Claimed quantity field reflects the claimer's inventory count for that card (existing behaviour)

GIVEN a card embed that is not part of the standard claimable drop flow
WHEN the message is produced by /id, card search previews, stage drop commands, or multidrop keep/sacrifice
THEN this change is out of scope (unless product owner expands scope later)

Technical notes

  • Likely touch points: DropEmbedHelper.GenerateDropEmbed, src/commands/drop.ts, src/buttonEvents/Reroll.ts, and src/buttonEvents/Claim.ts.
  • Dropper identity is already encoded on the Claim button custom id; the initial embed should surface the dropper before claim.

Subtasks (implementation)

  • Extend drop embed helper to support Dropped by vs Claimed by states
  • Pass dropper username into initial /drop and reroll embeds
  • Update or add unit tests for embed field presence across unclaimed vs claimed states
Show who created a claimable drop in the Discord embed before anyone claims it, then switch to showing who claimed it after a successful claim. Story Points: 2 ## Acceptance Criteria GIVEN a user posts a claimable card drop via `/drop` or the reroll (🔁) button WHEN the drop message is first shown and the card has not been claimed THEN the embed includes an inline field named `Dropped by` AND the field value is the dropper's Discord username (same format as the existing `Claimed by` field) GIVEN an unclaimed drop embed that shows `Dropped by` WHEN another user successfully claims the card via the Claim button within the claim window THEN the `Dropped by` field is no longer shown AND the embed shows `Claimed by` with the claimer's Discord username AND the `Claimed` quantity field reflects the claimer's inventory count for that card (existing behaviour) GIVEN a card embed that is not part of the standard claimable drop flow WHEN the message is produced by `/id`, card search previews, stage drop commands, or multidrop keep/sacrifice THEN this change is out of scope (unless product owner expands scope later) ## Technical notes - Likely touch points: `DropEmbedHelper.GenerateDropEmbed`, `src/commands/drop.ts`, `src/buttonEvents/Reroll.ts`, and `src/buttonEvents/Claim.ts`. - Dropper identity is already encoded on the Claim button custom id; the initial embed should surface the dropper before claim. ## Subtasks (implementation) - Extend drop embed helper to support `Dropped by` vs `Claimed by` states - Pass dropper username into initial `/drop` and reroll embeds - Update or add unit tests for embed field presence across unclaimed vs claimed states
Vylpes added this to the 0.11.0 milestone 2026-09-16 18:28:38 +01:00
Member

Planning (needs/criteria → needs/estimate)

Acceptance criteria added to the issue description based on the current drop/claim embed behaviour in DropEmbedHelper and the /drop, reroll, and Claim flows.

No open questions from my side; please review the criteria (especially out-of-scope flows) and adjust if needed. Next step: story point estimate (needs/estimate).

**Planning (needs/criteria → needs/estimate)** Acceptance criteria added to the issue description based on the current drop/claim embed behaviour in `DropEmbedHelper` and the `/drop`, reroll, and Claim flows. No open questions from my side; please review the criteria (especially out-of-scope flows) and adjust if needed. Next step: story point estimate (`needs/estimate`).
Member

Planning (needs/estimate → needs/test)

Story points: 2

Factor Notes
Scope Localized embed field change for /drop, reroll, and post-claim update; out-of-scope flows already excluded in AC
Complexity Reuse existing Claimed by formatting; dropper id already on Claim button custom id
Touch points ~1 helper + 3 call sites + unit tests (per issue subtasks)
Risk Low — no schema/API changes; behaviour is well specified

Fibonacci mapping: smaller than a new command, larger than a one-line fix because of multiple entry points and test coverage.

Next step: QA test scripts against the acceptance criteria (needs/test).

**Planning (`needs/estimate` → `needs/test`)** **Story points: 2** | Factor | Notes | |--------|--------| | Scope | Localized embed field change for `/drop`, reroll, and post-claim update; out-of-scope flows already excluded in AC | | Complexity | Reuse existing `Claimed by` formatting; dropper id already on Claim button custom id | | Touch points | ~1 helper + 3 call sites + unit tests (per issue subtasks) | | Risk | Low — no schema/API changes; behaviour is well specified | Fibonacci mapping: smaller than a new command, larger than a one-line fix because of multiple entry points and test coverage. Next step: QA test scripts against the acceptance criteria (`needs/test`).
Member

Planning (needs/tests → needs/approval)

QA test scripts

Prerequisites: Test bot in a guild with drop permissions; at least two test users (dropper + claimer); a claimable card drop flow enabled.

TS-1 — Unclaimed /drop shows dropper (AC block 1)

Step Action Expected result
1 As User A, run /drop for a claimable card Drop message posts with card embed
2 Inspect embed fields before anyone claims Inline field Dropped by is present
3 Compare field value Value matches User A's Discord username (same formatting as existing Claimed by field)
4 Inspect embed fields Claimed by is not shown while unclaimed

TS-2 — Successful claim swaps fields (AC block 2)

Step Action Expected result
1 Start from TS-1 unclaimed embed Dropped by visible
2 As User B, click Claim within the claim window Claim succeeds
3 Inspect updated embed Dropped by field is removed
4 Inspect updated embed Claimed by shows User B's Discord username
5 Inspect Claimed quantity field Reflects User B's inventory count for that card (unchanged behaviour)

TS-3 — Reroll (🔁) unclaimed embed (AC block 1, reroll path)

Step Action Expected result
1 As User A, post a claimable drop and use Reroll (🔁) before any claim New embed posts
2 Inspect embed Dropped by shows User A (dropper for the rerolled drop)
3 Claim as User B Same post-claim behaviour as TS-2

TS-4 — Out of scope flows unchanged (AC block 3)

Step Action Expected result
1 Run /id (or card search preview) No new Dropped by field introduced by this change
2 Use stage drop commands No Dropped by / claim-field change unless product expands scope
3 Multidrop keep/sacrifice flows No Dropped by / claim-field change unless product expands scope

TS-5 — Automated regression (dev)

Step Action Expected result
1 Run unit tests for DropEmbedHelper / drop + claim + reroll embed builders Tests cover unclaimed vs claimed field sets (Dropped by vs Claimed by)
2 CI All existing tests pass

Criteria and estimate (2 SP) are sufficient for QA; no open questions.

@Vylpes — please review and approve planning when ready (remove needs/approval to start implementation).

**Planning (`needs/tests` → `needs/approval`)** ## QA test scripts **Prerequisites:** Test bot in a guild with drop permissions; at least two test users (dropper + claimer); a claimable card drop flow enabled. ### TS-1 — Unclaimed `/drop` shows dropper (AC block 1) | Step | Action | Expected result | |------|--------|-----------------| | 1 | As **User A**, run `/drop` for a claimable card | Drop message posts with card embed | | 2 | Inspect embed fields before anyone claims | Inline field **`Dropped by`** is present | | 3 | Compare field value | Value matches **User A**'s Discord username (same formatting as existing **`Claimed by`** field) | | 4 | Inspect embed fields | **`Claimed by`** is **not** shown while unclaimed | ### TS-2 — Successful claim swaps fields (AC block 2) | Step | Action | Expected result | |------|--------|-----------------| | 1 | Start from TS-1 unclaimed embed | **`Dropped by`** visible | | 2 | As **User B**, click **Claim** within the claim window | Claim succeeds | | 3 | Inspect updated embed | **`Dropped by`** field is **removed** | | 4 | Inspect updated embed | **`Claimed by`** shows **User B**'s Discord username | | 5 | Inspect **`Claimed`** quantity field | Reflects **User B**'s inventory count for that card (unchanged behaviour) | ### TS-3 — Reroll (🔁) unclaimed embed (AC block 1, reroll path) | Step | Action | Expected result | |------|--------|-----------------| | 1 | As **User A**, post a claimable drop and use **Reroll (🔁)** before any claim | New embed posts | | 2 | Inspect embed | **`Dropped by`** shows **User A** (dropper for the rerolled drop) | | 3 | Claim as **User B** | Same post-claim behaviour as TS-2 | ### TS-4 — Out of scope flows unchanged (AC block 3) | Step | Action | Expected result | |------|--------|-----------------| | 1 | Run `/id` (or card search preview) | No new **`Dropped by`** field introduced by this change | | 2 | Use stage drop commands | No **`Dropped by`** / claim-field change unless product expands scope | | 3 | Multidrop keep/sacrifice flows | No **`Dropped by`** / claim-field change unless product expands scope | ### TS-5 — Automated regression (dev) | Step | Action | Expected result | |------|--------|-----------------| | 1 | Run unit tests for `DropEmbedHelper` / drop + claim + reroll embed builders | Tests cover unclaimed vs claimed field sets (`Dropped by` vs `Claimed by`) | | 2 | CI | All existing tests pass | --- Criteria and estimate (2 SP) are sufficient for QA; no open questions. @Vylpes — please review and approve planning when ready (remove `needs/approval` to start implementation).
Smithy-bot removed their assignment 2026-09-26 12:17:29 +01:00
Vylpes removed their assignment 2026-09-26 12:56:04 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
External/card-drop#397
No description provided.