Skip to content

feat: improve plugin hub UI#1808

Merged
chsami merged 11 commits into
mainfrom
development
Jun 25, 2026
Merged

feat: improve plugin hub UI#1808
chsami merged 11 commits into
mainfrom
development

Conversation

@chsami

@chsami chsami commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • add newly-added plugin metadata support and a New/Newly Added filter in the Microbot plugin hub
  • tighten plugin list sizing/layout to avoid horizontal overflow and improve fixed-width panel behavior
  • shorten the plugin folder action label
  • bump microbot.version to 2.6.10 for the release

Validation

  • ./gradlew :client:compileJava
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d706e0bf-eb6c-448f-a99f-16c1cdc1d0cd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Bumps microbot.version, marks EntityOps.getSubOps(int) nullable, adds addedAt parsing and newly added plugin filtering, updates plugin list sizing, refactors ground-item action handling and reflection discovery, changes antiban timing and tick intervals, and routes camera angle updates through legacy-unit helpers and client-thread scheduling.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.81% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and broadly matches the main change set around the plugin hub UI and related metadata/filter updates.
Description check ✅ Passed The description accurately summarizes the plugin metadata, UI layout, label, and version bump changes in this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/NpcTracker.java (1)

27-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse the centralized yaw target path.

Rs2Camera.setYawInstant(yaw) already handles legacy yaw normalization, conversion, and client-thread dispatch, so keeping a separate conversion path here can drift from the camera utility contract.

♻️ Proposed simplification
 int yaw = Rs2Camera.calculateCameraYaw(Rs2Camera.angleToTile(actor));
-int clientYaw = Rs2Camera.toClientAngleUnits(yaw);
-Microbot.getClientThread().invokeLater(() -> Microbot.getClient().setCameraYawTarget(clientYaw));
+Rs2Camera.setYawInstant(yaw);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/NpcTracker.java`
around lines 27 - 29, Reuse the centralized yaw-target flow in NpcTracker
instead of manually converting and dispatching the camera yaw: replace the
separate Rs2Camera.calculateCameraYaw, Rs2Camera.toClientAngleUnits, and
Microbot.getClientThread().invokeLater setCameraYawTarget path with the existing
Rs2Camera.setYawInstant(yaw) helper so the legacy normalization, unit
conversion, and client-thread handling stay consistent with the camera utility
contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileitem/models/Rs2TileItemModel.java`:
- Around line 227-255: The empty-action handling in Rs2TileItemModel should not
return false before the widget-selected interaction path runs. Update the action
resolution logic so the early return on index == -1 only applies when a real
ground-item menu action is required, and allow the
Microbot.getClient().isWidgetSelected() branch to proceed with
MenuAction.WIDGET_TARGET_ON_GROUND_ITEM even when groundActions is empty or
null-only. Keep the behavior aligned with Rs2GroundItem.interact(...) by using
the existing action/index setup but deferring the failure decision until after
the widget-selected check.

---

Nitpick comments:
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/NpcTracker.java`:
- Around line 27-29: Reuse the centralized yaw-target flow in NpcTracker instead
of manually converting and dispatching the camera yaw: replace the separate
Rs2Camera.calculateCameraYaw, Rs2Camera.toClientAngleUnits, and
Microbot.getClientThread().invokeLater setCameraYawTarget path with the existing
Rs2Camera.setYawInstant(yaw) helper so the legacy normalization, unit
conversion, and client-thread handling stay consistent with the camera utility
contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3a4a2695-8f3b-478d-a4cf-5e2688033237

📥 Commits

Reviewing files that changed from the base of the PR and between e7220aa and 53f24db.

📒 Files selected for processing (20)
  • gradle.properties
  • runelite-api/src/main/java/net/runelite/api/EntityOps.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileitem/models/Rs2TileItemModel.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/externalplugins/MicrobotPluginClient.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/externalplugins/MicrobotPluginManager.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/externalplugins/MicrobotPluginManifest.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotFixedWidthPanel.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginHubPanel.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginListItem.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginListPanel.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/antiban/Rs2Antiban.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/antiban/enums/PlayStyle.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/NpcTracker.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/Rs2Camera.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/grounditem/Rs2GroundItem.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/reflection/Rs2Reflection.java
  • runelite-client/src/test/java/groundactionfixture/GroundItemActionFixture.java
  • runelite-client/src/test/java/net/runelite/client/plugins/microbot/util/antiban/enums/PlayStyleRandomTickIntervalTest.java
  • runelite-client/src/test/java/net/runelite/client/plugins/microbot/util/grounditem/GroundItemMenuActionResolutionTest.java
  • runelite-client/src/test/java/net/runelite/client/plugins/microbot/util/reflection/Rs2ReflectionGroundItemActionsTest.java

Comment on lines 227 to 255
int index = -1;
if (action.isEmpty()) {
action = groundActions[0];
index = 0;
for (int i = 0; i < groundActions.length; i++) {
if (groundActions[i] == null) {
continue;
}
action = groundActions[i];
index = i;
break;
}
if (index == -1) return false;
} else {
for (int i = 0; i < groundActions.length; i++) {
String groundAction = groundActions[i];
if (groundAction == null || !groundAction.equalsIgnoreCase(action)) continue;
index = i;
break;
}
}

if (Microbot.getClient().isWidgetSelected()) {
menuAction = MenuAction.WIDGET_TARGET_ON_GROUND_ITEM;
} else if (index == 0) {
menuAction = MenuAction.GROUND_ITEM_FIRST_OPTION;
} else if (index == 1) {
menuAction = MenuAction.GROUND_ITEM_SECOND_OPTION;
} else if (index == 2) {
menuAction = MenuAction.GROUND_ITEM_THIRD_OPTION;
} else if (index == 3) {
menuAction = MenuAction.GROUND_ITEM_FOURTH_OPTION;
} else if (index == 4) {
menuAction = MenuAction.GROUND_ITEM_FIFTH_OPTION;
}
if (menuAction == MenuAction.CANCEL) {
log.warn("Unable to interact with ground item '{}' using action '{}'; actions={}", getName(), action, java.util.Arrays.toString(groundActions));
return false;
} else {
menuAction = groundItemMenuAction(index);
if (menuAction == null) {
log.warn("Unable to interact with ground item '{}' using action '{}'; actions={}", getName(), action, Arrays.toString(groundActions));
return false;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Don't short-circuit widget-target clicks on empty ground actions.

Line 237 now returns false before the WIDGET_TARGET_ON_GROUND_ITEM branch runs. That makes click("") fail whenever reflection returns an empty/null-only action list, even though the widget-selected path below can still dispatch the interaction. Rs2GroundItem.interact(...) does not have this early return, so the two entry points now behave differently.

Suggested fix
-            if (action.isEmpty()) {
+            boolean widgetSelected = Microbot.getClient().isWidgetSelected();
+            if (!widgetSelected && action.isEmpty()) {
                 for (int i = 0; i < groundActions.length; i++) {
                     if (groundActions[i] == null) {
                         continue;
@@
-            if (Microbot.getClient().isWidgetSelected()) {
+            if (widgetSelected) {
                 menuAction = MenuAction.WIDGET_TARGET_ON_GROUND_ITEM;
             } else {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
int index = -1;
if (action.isEmpty()) {
action = groundActions[0];
index = 0;
for (int i = 0; i < groundActions.length; i++) {
if (groundActions[i] == null) {
continue;
}
action = groundActions[i];
index = i;
break;
}
if (index == -1) return false;
} else {
for (int i = 0; i < groundActions.length; i++) {
String groundAction = groundActions[i];
if (groundAction == null || !groundAction.equalsIgnoreCase(action)) continue;
index = i;
break;
}
}
if (Microbot.getClient().isWidgetSelected()) {
menuAction = MenuAction.WIDGET_TARGET_ON_GROUND_ITEM;
} else if (index == 0) {
menuAction = MenuAction.GROUND_ITEM_FIRST_OPTION;
} else if (index == 1) {
menuAction = MenuAction.GROUND_ITEM_SECOND_OPTION;
} else if (index == 2) {
menuAction = MenuAction.GROUND_ITEM_THIRD_OPTION;
} else if (index == 3) {
menuAction = MenuAction.GROUND_ITEM_FOURTH_OPTION;
} else if (index == 4) {
menuAction = MenuAction.GROUND_ITEM_FIFTH_OPTION;
}
if (menuAction == MenuAction.CANCEL) {
log.warn("Unable to interact with ground item '{}' using action '{}'; actions={}", getName(), action, java.util.Arrays.toString(groundActions));
return false;
} else {
menuAction = groundItemMenuAction(index);
if (menuAction == null) {
log.warn("Unable to interact with ground item '{}' using action '{}'; actions={}", getName(), action, Arrays.toString(groundActions));
return false;
}
}
int index = -1;
boolean widgetSelected = Microbot.getClient().isWidgetSelected();
if (action.isEmpty()) {
for (int i = 0; i < groundActions.length; i++) {
if (groundActions[i] == null) {
continue;
}
action = groundActions[i];
index = i;
break;
}
if (!widgetSelected && index == -1) return false;
} else {
for (int i = 0; i < groundActions.length; i++) {
String groundAction = groundActions[i];
if (groundAction == null || !groundAction.equalsIgnoreCase(action)) continue;
index = i;
break;
}
}
if (widgetSelected) {
menuAction = MenuAction.WIDGET_TARGET_ON_GROUND_ITEM;
} else {
menuAction = groundItemMenuAction(index);
if (menuAction == null) {
log.warn("Unable to interact with ground item '{}' using action '{}'; actions={}", getName(), action, Arrays.toString(groundActions));
return false;
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileitem/models/Rs2TileItemModel.java`
around lines 227 - 255, The empty-action handling in Rs2TileItemModel should not
return false before the widget-selected interaction path runs. Update the action
resolution logic so the early return on index == -1 only applies when a real
ground-item menu action is required, and allow the
Microbot.getClient().isWidgetSelected() branch to proceed with
MenuAction.WIDGET_TARGET_ON_GROUND_ITEM even when groundActions is empty or
null-only. Keep the behavior aligned with Rs2GroundItem.interact(...) by using
the existing action/index setup but deferring the failure decision until after
the widget-selected check.

@chsami chsami merged commit 16ec781 into main Jun 25, 2026
3 checks passed
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.

4 participants