Skip to content

feature: sortable player role rank in search - #434

Merged
lukepolo merged 1 commit into
mainfrom
feature/player-role-rank
Sep 29, 2026
Merged

lukepolo merged 1 commit into
mainfrom
feature/player-role-rank

Conversation

@lukepolo

@lukepolo lukepolo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds a sortable integer role_rank to the Typesense players collection, so the player directory can sort by privilege. Today it can only sort alphabetically by role name.

  • roleRank(role) returns the role's position in the existing roleOrder (user 0 … administrator 6; unknown or null is 0).
  • The players schema gains role_rank (int32, sortable), and every player upsert sets it. role is unchanged.
  • The boot-time schema reconcile adds the field in place (no drop or recreate) and queues a full reindex.

Merge/deploy: after deploy, run "Reindex Search" by hand (Settings → Application → Players) and wait for it to finish before merging web#613. The reindex queued at boot can be picked up by the old pod.

Tests: feature only, no bug fix. The schema, upsert and ordering tests fail when role_rank is removed or ranked alphabetically. Based on DEAFCS 476dff9, c1d91b7

@lukepolo
lukepolo merged commit 0714c95 into main Sep 29, 2026
2 checks passed
@lukepolo
lukepolo deleted the feature/player-role-rank branch September 29, 2026 00:32
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