Skip to content

[18ZOO] Display stock market metadata#12752

Open
carlorusso1984 wants to merge 1 commit into
tobymao:masterfrom
carlorusso1984:codex/18zoo-stock-market-metadata
Open

[18ZOO] Display stock market metadata#12752
carlorusso1984 wants to merge 1 commit into
tobymao:masterfrom
carlorusso1984:codex/18zoo-stock-market-metadata

Conversation

@carlorusso1984

@carlorusso1984 carlorusso1984 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Closes #12723

Change from:
image
To:
image

Summary

  • attach appreciation thresholds, dividends, and president bonuses to 18ZOO share-price metadata
  • render metadata in enlarged 2D stock-market cells while preserving ledge arrows
  • safely handle sparse 2D markets and retain their existing layout
  • add regression coverage for 18ZOO market prices, types, and metadata

Shared renderer audit

  • audited the shared grid_2d renderer across 60 two-dimensional stock-market definitions; one-dimensional, zigzag, and hexagonal markets use separate renderers
  • confirmed that 18ZOO is the only game assigning SharePrice#info, so only 18ZOO selects the enlarged metadata layout
  • confirmed through DOM measurements that standard markets retain 50x50 cells while 18ZOO uses 70x70 cells
  • identified 20 sparse 2D market definitions and verified that flatten.compact safely ignores empty cells, addressing the failure mode of the reverted 2023 implementation
  • manually checked representative layouts in the browser:
    • 1880: sparse stepped market
    • 1822: large 15-row market with 39 empty cells
    • 1866: very wide 4x37 market
    • 18MS: compact market without empty cells
  • all sampled markets preserved their existing dimensions, ledge arrows, colors, scrolling, and legends

Testing

  • docker compose exec rack bundle exec rspec spec/lib/engine/game/g_18_zoo/game_spec.rb (179 examples, 0 failures)
  • docker compose exec rack bundle exec rubocop lib/engine/game/g_18_zoo/game.rb assets/app/view/game/stock_market.rb spec/lib/engine/game/g_18_zoo/game_spec.rb
  • git diff --check
  • manually verified the Market tab in local 18ZOO Map C
  • manually verified 1880, 1822, 1866, and 18MS through the shared 2D renderer

perwestling
perwestling previously approved these changes Jun 14, 2026

@perwestling perwestling left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with AI assistance by Mistral Vibe


✅ Strengths

  • Implements requested feature (closes #12723)
  • Comprehensive change: adds appreciation thresholds, dividends, president bonuses
  • Clean UI implementation with enlarged 2D cells for metadata
  • Extensive verification:
    • Audited shared grid_2d renderer across 60 markets
    • Confirmed 18ZOO is only game using SharePrice#info
    • Manual testing of 1880, 1822, 1866, 18MS (appropriate for frontend code)
  • All backend tests pass (179 examples, 0 failures)
  • RuboCop passes
  • Adds backend regression tests for metadata

❓ Questions

  • Have you considered adding a screenshot of the new UI to the PR description?

✅ Verdict: Approve

Well-crafted implementation. The frontend changes are appropriately verified through manual testing, and backend changes are well-tested.

@perwestling perwestling dismissed their stale review June 15, 2026 19:30

Remove AI assisted approval.

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.

18ZOO stock market meta data fix

2 participants