Skip to content

patch(ranking): remove group rank changes when ranking provider is set to none - #202

Merged
thecamerondev merged 1 commit into
mainfrom
fix/ranking-none
Aug 30, 2026
Merged

patch(ranking): remove group rank changes when ranking provider is set to none#202
thecamerondev merged 1 commit into
mainfrom
fix/ranking-none

Conversation

@thecamerondev

@thecamerondev thecamerondev commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Setting External Services to None still changed Roblox ranks on promotion, demotion, and termination logs. The logbook ignored that setting and fell back to the workspace Open Cloud key.

This patch ranks people only when a provider is actually selected (RankGun or Integrated Ranking with its own key). Saving None clears leftover ranking credentials and does not rank users on logbook entries.

Related to community report: External Services set to None still ranking users after save.

Summary by CodeRabbit

  • New Features

    • Added a combined ranking status for RankGun and OpenCloud providers.
    • Added guidance when no ranking provider is configured, clarifying that rank-related logs will not change Roblox group ranks.
  • Bug Fixes

    • Improved ranking status detection and configuration handling.
    • Removing a ranking provider now clears its related credentials and settings.
    • Ranking actions now require an explicitly configured provider and appropriate permissions.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4bf30ca2-a9e8-4311-bb39-241c2ec13301

📥 Commits

Reviewing files that changed from the base of the PR and between 2dc1ca0 and 53a56cb.

📒 Files selected for processing (5)
  • components/profile/book.tsx
  • components/settings/instance/external.tsx
  • pages/api/workspace/[id]/external/ranking.ts
  • pages/api/workspace/[id]/settings/external.ts
  • pages/api/workspace/[id]/userbook/[uid]/new.ts

📝 Walkthrough

Walkthrough

Ranking status now uses workspace provider records and reports combined availability. Removing a provider clears its ranking settings. Userbook ranking requires explicit provider configuration and rank_users permission. The settings UI explains the no-provider behavior.

Changes

Ranking provider state

Layer / File(s) Summary
Ranking status resolution
pages/api/workspace/[id]/external/ranking.ts, components/profile/book.tsx, components/settings/instance/external.tsx
The ranking endpoint checks workspace external-service records and returns rankingEnabled. Profile state uses this value. Settings show a note when no provider is selected.
Provider removal cleanup
pages/api/workspace/[id]/settings/external.ts
Removing the ranking provider clears the ranking token, workspace ID, and maximum rank.
Userbook ranking eligibility and execution
pages/api/workspace/[id]/userbook/[uid]/new.ts
Ranking uses only an explicitly configured provider and requires rank_users permission. RankGun remains the first provider, followed by the configured Roblox provider. Existing synchronization, auditing, attachment handling, and response behavior remain intact.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UserbookRoute
  participant RankGun
  participant RobloxRankingProvider
  UserbookRoute->>UserbookRoute: verify rank_users permission and provider configuration
  UserbookRoute->>RankGun: execute ranking action when RankGun is configured
  RankGun-->>UserbookRoute: return ranking result
  UserbookRoute->>RobloxRankingProvider: execute ranking action when Open Cloud is configured
  RobloxRankingProvider-->>UserbookRoute: return ranking result
  UserbookRoute->>UserbookRoute: synchronize rank and write audit result
Loading

Suggested reviewers: brennanpeters

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ranking-none

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/profile/book.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

components/settings/instance/external.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

pages/api/workspace/[id]/external/ranking.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 2 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thecamerondev
thecamerondev merged commit ca4042a into main Aug 30, 2026
2 of 6 checks passed
@BuddyWinte
BuddyWinte deleted the fix/ranking-none branch September 2, 2026 21:28
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