Polish: legible crew roster, End-Scene enforcement, decluttered Hand

- Crew roster bubbles: explicit text color + opaque distinct surface so
  they're legible and stand out from the page in both themes (the bug was
  the <button> defaulting to black-on-dark in dark mode).
- End-Scene enforcement: unless Dev Mode is on, a scene can't end until
  every living Pi-Rat has faced a Deep Challenge or the Obstacle List is
  empty. end_scene_and_transition now returns (ok, msg) and the route
  surfaces a 400; the Deep sees a ✓/○ challenge-progress badge on each
  Pi-Rat bubble. 3 new tests cover the gate.
- Hand panel: dropped the how-to-play blurb and the title in favor of a
  low-profile "Your Hand" label.
- Bump VERSION to 8 with changelog entry; check off TODO.md Polish items.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 15:34:10 -07:00
parent 6fa7073f10
commit b1a559cf39
8 changed files with 151 additions and 18 deletions

View File

@@ -981,6 +981,53 @@ def test_pvp_challenge(session):
session.refresh(duel)
assert duel.status == "succeeded"
def test_end_scene_requires_every_pirat_challenged(session):
game, deep, (p2,) = make_scene_game(session)
game.dev_mode = False
session.add(game)
session.commit()
# Obstacles remain and p2 has not been challenged yet -> blocked.
ok, msg = crud.end_scene_and_transition(session, game.id)
assert not ok
assert p2.name in msg
session.refresh(game)
assert game.phase == "scene"
# Once p2 has faced a Deep Challenge, the scene can end.
obs = game.obstacles[0]
ok, msg = crud.create_challenge(session, game.id, deep.id, p2.id, [obs.id])
assert ok, msg
ok, msg = crud.end_scene_and_transition(session, game.id)
assert ok, msg
session.refresh(game)
assert game.phase == "between_scenes"
def test_end_scene_allowed_when_obstacle_list_empty(session):
game, deep, (p2,) = make_scene_game(session)
game.dev_mode = False
session.add(game)
# Clear the Obstacle List; nobody has been challenged.
for obs in list(game.obstacles):
session.delete(obs)
session.commit()
ok, msg = crud.end_scene_and_transition(session, game.id)
assert ok, msg
session.refresh(game)
assert game.phase == "between_scenes"
def test_end_scene_dev_mode_bypasses_challenge_requirement(session):
game, deep, (p2,) = make_scene_game(session)
assert game.dev_mode # defaults on for a local checkout
ok, msg = crud.end_scene_and_transition(session, game.id)
assert ok, msg
session.refresh(game)
assert game.phase == "between_scenes"
def test_obstacles_persist_across_scenes(session):
game, deep, (p2,) = make_scene_game(session)
assert len(game.obstacles) == 2