Cockatrice/tests
BruebachL 9677fad342
[Client] Add zone management to the deck state manager (#7204)
* [Client] Add zone management to the deck state manager

State-layer operations for custom deck zones, plus the shared prompt
dialog that later editor menus will call into.

- moveCardToZone relocates every copy of a card row into any zone,
  refusing non-card rows and tokens so miswired selections can never
  shred a group or turn tokens into deck cards. The current zone is
  found by walking ancestors, which also handles legacy top-level
  zones.
- createCustomZone, renameCustomZone, moveCustomZone and
  removeCustomZone wrap the tree API with memento history, model
  rebuilds and deck hash refreshes via modifyTree.
- Same-board zone moves return success without minting a history
  entry, keeping the undo log honest.
- promptForNewZone asks for a name and the parent zone, keeps Ok
  disabled until the trimmed name passes a caller-supplied validator
  (shown inline as an error), and reports its own translation context.

Took 14 minutes

# Commit time for manual adjustment:
# Took 6 minutes

# Commit time for manual adjustment:
# Took 33 seconds

* [DeckEditor] Address zone-management review feedback

- Expose DecklistNodeTree::hasZoneName and use it in validateNewZoneName
  so the uniqueness scan covers custom zones on every board, not just the
  standard ones.
- Hide the board selector in the rename dialog path where it is not used.
- Emit deckHashChanged after refreshDeckHash so the deck hash label stays
  current after zone create/rename/move/remove.

* [DeckEditor] Notify card set changes after zone edits and drop the board scan

- modifyTree emits cardNodesChanged alongside deckHashChanged so the
  banner-card combo and printing in-deck counts refresh after removing a
  zone that still holds cards
- DecklistNodeTree::findCustomZoneByName is public and moveCustomZone uses
  it, locating zones under non-standard boards (e.g. tokens) instead of
  scanning only main/side/maybeboard

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-09-05 22:00:21 +02:00
..
card_zone_algorithms [Game/Zones] Simple move refactor to differentiate between logic and graphics for zones (#6903) 2026-05-18 06:36:18 +02:00
carddatabase [Card Database] Improve loading times through binary cache (#7051) 2026-07-27 23:12:53 +02:00
deck_list_model [Models] Mirror custom deck zones in the deck list model (#7203) 2026-09-05 22:00:20 +02:00
deck_list_zones [Client] Add zone management to the deck state manager (#7204) 2026-09-05 22:00:21 +02:00
loading_from_clipboard Fix/cmake test only build (#6709) 2026-03-15 17:24:50 +01:00
movecard_tests [Server] Consolidate Server_Game construction parameters into a GameConfig struct (#7128) 2026-08-16 19:13:03 +02:00
oracle [Oracle] Parse sets lazily to slash importer peak memory (#7217) 2026-09-05 20:35:28 +02:00
settings [Mods] Properly close card art rules tab on disconnect (#7227) 2026-09-01 11:31:49 +02:00
clamped_arithmetic_test.cpp Unify counter clamp arithmetic into shared addClamped() helper (#7009) 2026-06-28 16:10:57 -07:00
CMakeLists.txt [Models] Mirror custom deck zones in the deck list model (#7203) 2026-09-05 22:00:20 +02:00
deck_hash_performance_test.cpp Hashing tests (#5026) 2025-12-23 17:48:10 +01:00
dummy_test.cpp Clang script (#3085) 2018-02-06 08:45:13 -05:00
expression_test.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
lag_monitor_test.cpp [Client] Detect main-thread event loop stalls (#7155) 2026-08-23 00:53:40 +02:00
latency_tracker_test.cpp [Network] Measure real server round-trip times (#7153) 2026-08-23 00:03:52 +02:00
password_hash_test.cpp [Security] Use a CSPRNG for salts, tokens, and RNG seeding (#7192) 2026-09-04 13:49:18 +02:00
playmat_resolver_test.cpp [Game] Playmats (#7101) 2026-08-21 10:40:49 +02:00
server_card_counter_test.cpp Split trice_limits.h into dedicated headers (#7025) 2026-06-29 14:37:52 -07:00
server_counter_test.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_rate_limiter_test.cpp [PictureLoader] Schedule exponential backoff on 429 - Too many request handler and call failed on fail (#7053) 2026-08-08 22:55:27 +02:00
test_age_formatting.cpp do not save a const reference to the user data in the info dialog (#6974) 2026-06-09 23:35:00 -07:00
warning_categories_test.cpp [Server/Client/Protocol] Reporting users + moderation queue functionality (#7091) 2026-08-21 15:00:13 +02:00