A.3-polish: cross-deck sig picker (MINOR + MIDDLE courts) + My Sea applet sig-decoupling — TDD. Two user-reported bugs caught during A.3 visual verify (2026-05-25 PM). Bug 1: my_sign picker shows only 2 cards (Major 0 + 1) for Minchiate-equipped users since _sig_unique_cards_for_deck filters by arcana=MIDDLE which Minchiate (and any non-Earthman tarot family) doesn't classify its courts as — Minchiate courts are MINOR per its standard structure. User spec confirmed: my_sign picker = courts + Major 0/1 for EVERY deck (NOT segment-limited, NOT arcana-classification-limited). Fix: broaden the filter to arcana__in=[MIDDLE, MINOR] so courts qualify regardless of how the deck classifies them. For Earthman, behavior unchanged (no MINOR 11-14 cards exist in seed — its courts are exclusively MIDDLE); for Minchiate + RWS, picker expands from 2 → 18 cards as designed. Two side-by-side suit queries (brands_crowns + blades_grails) collapse to a single 4-suit query since the union was already covering all 4 — that was historical artifact, not segment-limiting in effect. Bug 2: deleting the user's sig on /billboard/my-sign/ blanks the My Sea applet on /gameboard/ even though the saved MySeaDraw spread is still in the DB (visible on /billboard/my-sea/), reappearing only when any sig is re-selected. Root cause: _applet-my-sea.html gated the slot-render branch on {% if not request.user.significator_id %} first, treating no-sig as "no draws yet" regardless of actual draw state. But MySeaDraw rows carry their own significator_id snapshot at first-draw time (gameboard.models.MySeaDraw doc lines 130-132) precisely so user-sig clearing doesn't invalidate saved draws — the template ignored that contract. Fix: invert the template branches — slot render now keys solely on my_sea_slots; the sig-gate Brief banner only fires in the empty-state branch when ALSO not request.user.significator_id (the "fresh user, no draws, no sig" case). MySeaDraw display now correctly decoupled from current sig state — sig deletion only matters for users who haven't drawn yet. Companion code: _sig_unique_cards_for_deck docstring updated to articulate the cross-deck symmetry rule ("courts recognized by rank 11-14 regardless of arcana classification") + the spec-confirmed non-segment-limitation. 1 new regression IT in GameboardViewTest.test_my_sea_applet_renders_slots_even_when_user_significator_cleared locks Bug 2's fix: creates a MySeaDraw row w. one filled slot, then sets User.significator=None, GETs /gameboard/, asserts the filled slot still renders + "No draws yet" empty state is absent. Tests: 1 new IT green; 810/810 epic+gameboard+billboard ITs green; 1290/1290 IT+UT total green (70s, +1 from A.3's 1289). No FT changes needed — Bug 1's fix changes the count of cards in the picker grid; existing FTs that count cards target Earthman where the count is unchanged. Visual verify still pending; user will confirm both fixes via Claudezilla browser session
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
{# Spread lock-in: the row is created at first card draw, so the moment #}
|
||||
{# 1+ cards exist all the spread's positions show in the applet. The #}
|
||||
{# scroll container handles overflow (mirrors the Palettes applet). #}
|
||||
{% if not request.user.significator_id %}
|
||||
{# Sprint 4b applet-gate — DRYly rendered as a project-wide Brief #}
|
||||
{# banner (`note-banner` Gaussian-glass shell, portaled to the #}
|
||||
{# page h2). Inline body falls through to the empty-state "No #}
|
||||
{# draws yet" since no sig → no draws is the only possible state.#}
|
||||
{% include "apps/gameboard/_partials/_my_sea_sign_gate_brief.html" %}
|
||||
<p class="my-sea-empty">No draws yet.</p>
|
||||
{% elif my_sea_slots %}
|
||||
{# Slot display is INDEPENDENT of `request.user.significator_id` — the #}
|
||||
{# MySeaDraw row snapshots the sig at first-draw time (see #}
|
||||
{# `gameboard.models.MySeaDraw` doc lines 130-132), so a subsequent #}
|
||||
{# my-sign DEL doesn't invalidate the saved draw. The sig-gate Brief #}
|
||||
{# banner only shows when the user has NO draws AND no sig — once draws #}
|
||||
{# exist, they render regardless of current sig state (user spec #}
|
||||
{# 2026-05-25 PM bug-report). #}
|
||||
{% if my_sea_slots %}
|
||||
<div class="my-sea-scroll">
|
||||
{% for slot in my_sea_slots %}
|
||||
{% if slot.card %}
|
||||
@@ -72,6 +72,9 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% if not request.user.significator_id %}
|
||||
{% include "apps/gameboard/_partials/_my_sea_sign_gate_brief.html" %}
|
||||
{% endif %}
|
||||
<p class="my-sea-empty">No draws yet.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user