Skip to content

feat(inventory): build collections by moving copies, deck-builder source per collection, Kartenart filter - #171

Merged
dinooo13 merged 9 commits into
mainfrom
feat/collections-from-inventory
Oct 3, 2026
Merged

dinooo13 merged 9 commits into
mainfrom
feat/collections-from-inventory

Conversation

@dinooo13

@dinooo13 dinooo13 commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Tester feedback (Sept 2026): the inventory is the master list, and per-deck collections are filled by moving owned copies (no double counting). Quick-capture results can be moved on after saving instead of being read in again. The deck builder can use a single collection as its card source. A grouped "Kartenart" filter counts Flip, Tuner and similar monsters as effect monsters.

Roadmap phase / item

Phase 1 / Phase 2 (Inventar), "Tester-Feedback Sept 2026".

Changes

  • POST /api/inventory/move
    • Moves part of a stack or whole stacks into another collection (or none).
    • Up to 200 items in one transaction, merging into existing stacks, with per-item errors.
  • Inventory UI
    • "Verschieben" (move) dialog with a quantity stepper.
    • "Auswählen" multi-select with "In Sammlung verschieben".
    • "Neue Sammlung…" in the target select.
  • Quick capture
    • "Gerade gespeichert" (just saved) panel that moves exactly the copies just saved.
    • The review table is never refilled, so nothing is written twice.
  • "Sammlung aus Deck befüllen" (fill a collection from a deck)
    • POST /api/decks/:id/fill-collection with a dryRun preview.
    • Copies come from the selected sources, "Ohne Sammlung" first.
    • Shows a shortfall list with "Auf Wunschliste" (add to wishlist).
  • Deck builder "Quelle" (source)
    • All collections, "Ohne Sammlung", or one collection.
    • The new scoped=1 flag on the inventory search counts only that collection's copies.
    • The inventory page itself is unchanged.
  • "Kartenart" filter
    • Normal, Effekt, Ritual, Fusion, Synchro, XYZ, Link, Pendel, Spielmarke, Zauber, Falle.
    • Based on frame_type with the same keyword fallback as card-frame.ts, mirrored in SQL.
    • Available in the catalog, the inventory and the deck builder source. The exact "Typ" filter stays as a finer filter.
  • ADR 0030 (collections are built by moving copies). DEVELOPMENT.md and the Roadmap are updated. No migration.

Test plan

  • CI gates pass locally:
    • pnpm lint, pnpm typecheck, pnpm typecheck:e2e
    • pnpm test: 1910 tests
    • pnpm test:e2e: 143, including the new e2e/collections-move.spec.ts
  • Tests added/updated:
    • move API, fill plan and execution
    • kind filter SQL vs. cardKinds()
    • scoped search
    • move and fill UIs
    • just-saved panel
  • Docs/ADR updated
  • Expect merge conflicts with feat(decks): deck import/export (Omega, YDK, ydke), quick-capture header fix, Edison format #169 in app/pages/decks/index.vue, app/pages/decks/[id].vue, docs/Roadmap.md and docs/adr/README.md. Rebase whichever PR lands second.

🤖 Generated with Claude Code

dinooo13 and others added 9 commits October 3, 2026 04:47
…o. as Effekt

The exact type filter only matches one type line, so "Effect Monster"
left out Flip, Tuner, Spirit, Toon, Union and Gemini effect monsters.
A new "Kartenart" filter groups cards by frame (frame_type, with the
card-frame keyword fallback in SQL), Pendulum as its own kind. It sits
in front of the exact type filter in the catalog, the inventory and the
deck builder's card source. The deck source also gets a "Quelle" select
(all collections / without / one collection) whose owned counts are that
collection's copies, via a new `scoped` flag of the inventory search.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
POST /api/inventory/move takes up to 200 {ownedCardId, quantity?,
toCollectionId} items and applies them in one transaction: a partial move
splits the stack, a whole stack is re-pointed or merged into the target's
stack (same note joining as an edit), ownership of stacks and collections
and the quantities are checked per item first. The answer says where each
item ended up, so callers can follow the copies.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
POST /api/decks/:id/fill-collection works out what a deck needs (main +
extra + side per card, copies already in the target counted), takes it from
the chosen source collections in priority order (default: ohne Sammlung
first) and moves it with the move API's logic. dryRun answers with the
plan only; the answer lists per card what moves and what is missing, and
what is missing even counting the whole inventory (for the wishlist).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nel in quick capture

A "Liste" row gets a move button (quantity stepper, default all copies; a
target of ohne Sammlung, a collection or a new one) and "Auswählen" turns the
list into a selection whose whole stacks move together. After the quick
entry saves, a "gerade gespeichert" panel keeps what was written (card,
copies, collection, the stacks from the bulk answer) and moves exactly those
copies to another collection through the move API; it follows them, can be
dismissed, and does not feed the review table, so nothing is written twice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… and wishlist

From a collection's menu on the inventory page and from a deck's menu on
the deck list. Pick the deck, a target collection (existing or new) and the
sources (ohne Sammlung first, each can be left out); the preview shows what
moves from where, what is already in the target and what is missing; after
"Sammlung befüllen" the shortfall stays visible, and the cards that no
collection has can go to the wishlist in one click.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…"aus X"

After "Sammlung befüllen" the badge said "zu verschieben" and a card taken
from one collection read "×3 3 aus Box". Also keep the quick entry's
"Noch nichts zu prüfen" hint while the just-saved panel shows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Quick capture then moving the just-saved copies, a partial move and a
selection move into a new collection, the deck builder's source per
collection, the Kartenart filter, and filling a collection from a deck
(preview, source left out, result, wishlist, from the deck list).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd the Kartenart filter

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dinooo13
dinooo13 force-pushed the feat/collections-from-inventory branch from e5052c5 to 9730ce9 Compare October 3, 2026 02:48
@dinooo13
dinooo13 merged commit dd2d94f into main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant