Skip to content

fix(1d4_web): derive motif badges from occurrences map; drop dead has* fields#1090

Merged
aaylward merged 1 commit intomainfrom
fix/1d4-web-motif-badges-from-occurrences
Mar 1, 2026
Merged

fix(1d4_web): derive motif badges from occurrences map; drop dead has* fields#1090
aaylward merged 1 commit intomainfrom
fix/1d4-web-motif-badges-from-occurrences

Conversation

@aaylward
Copy link
Copy Markdown
Collaborator

@aaylward aaylward commented Mar 1, 2026

Summary

  • GameTable was gating badge display on legacy has* boolean fields (e.g. hasFork, hasPin) that the backend dropped when motifs moved from game_features columns to the motif_occurrences table
  • The occurrences: Record<string, OccurrenceRow[]> map is already returned by the API — switch GameTable to derive badge presence from Object.keys(game.occurrences ?? {})
  • Remove the 16 dead has* fields from the GameRow type and all test fixtures; occurrences is now the single source of truth

Test plan

  • npm run typecheck — clean
  • npm test — 46/46 passing
  • Verify motif badges appear on /games page against live API

…* fields

GameTable was gating badge display on legacy has* boolean fields (e.g.
hasFork, hasPin) that the backend dropped when motifs moved from
game_features columns to the motif_occurrences table. The occurrences
map is already on the wire — switch to Object.keys(game.occurrences)
as the single source of truth and remove the now-dead has* fields from
GameRow and all test fixtures.
@aaylward aaylward enabled auto-merge (squash) March 1, 2026 14:50
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web e2d6d6c Commit Preview URL

Branch Preview URL
Mar 01 2026, 02:51 PM

@aaylward aaylward disabled auto-merge March 1, 2026 14:51
@aaylward aaylward merged commit 12db54a into main Mar 1, 2026
11 checks passed
@aaylward aaylward deleted the fix/1d4-web-motif-badges-from-occurrences branch March 1, 2026 14:51
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