Skip to content

Comments

fix(WebWalker): fix action matching for equipment items#1586

Merged
chsami merged 1 commit intochsami:developmentfrom
Yuof:fix-ardougne-cloak-teleport
Oct 25, 2025
Merged

fix(WebWalker): fix action matching for equipment items#1586
chsami merged 1 commit intochsami:developmentfrom
Yuof:fix-ardougne-cloak-teleport

Conversation

@Yuof
Copy link
Contributor

@Yuof Yuof commented Oct 24, 2025

Inventory items are already using a contains check.

This allows the bug fix from #1574 to also work with equipped items.

Improvements to equipment action matching:

  • Changed the action matching condition in invokeMenu so that it now checks if the equipment action contains the input string (case-insensitive), rather than requiring an exact match. This allows for partial matches.

Inventory items are already using a contains check.
This allows the bug fix form !1574 to also work with equipped items.
Copilot AI review requested due to automatic review settings October 24, 2025 14:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes action matching for equipment items in the WebWalker by changing from exact string matching to substring matching. This aligns the behavior with inventory items and enables partial action matching for equipped items.

Key Changes:

  • Modified equipment action matching to use case-insensitive substring matching instead of exact matching

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

Walkthrough

A modification to the invokeMenu method in Rs2Equipment.java changes the action matching logic. Previously, the method used exact case-insensitive equality to compare the requested action against equipment actions. The updated implementation uses a contains-based comparison with case normalization, enabling partial string matching instead of exact matches. When a match is found, the identifier assignment remains unchanged. All surrounding logic, including fallback behavior to sub-action handling when no main action matches, remains intact.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "fix(WebWalker): fix action matching for equipment items" is directly and clearly related to the changeset. The title accurately captures the primary change, which modifies action matching logic in Rs2Equipment.invokeMenu from an exact case-insensitive equality check to a partial contains-based match. The title is concise, specific, and would be meaningful to a developer reviewing the git history.
Description Check ✅ Passed The pull request description is clearly related to the changeset. It provides relevant context by explaining that inventory items already use a contains check and this change extends that same approach to equipment items for consistency. The description accurately summarizes the modification to the action matching condition, describing the shift from exact matching to partial/contains-based matching with case-insensitive comparison. This aligns with the actual code changes in Rs2Equipment.java.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1decbc3 and 7756de5.

📒 Files selected for processing (1)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/equipment/Rs2Equipment.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

runelite-client/src/main/java/net/runelite/client/plugins/microbot/**/*.java: Place all gameplay automation code under runelite-client/src/main/java/net/runelite/client/plugins/microbot
Prefix configuration interfaces with the plugin name (e.g., ExampleConfig) within microbot plugins

Files:

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/equipment/Rs2Equipment.java
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

Put shared helpers under .../microbot/util

Files:

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/equipment/Rs2Equipment.java
**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

**/*.java: Use tabs for indentation, follow the brace placement style exemplified in MicrobotPlugin.java, and keep lines under 120 characters
Use UpperCamelCase for types and lowerCamelCase for members

Files:

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/equipment/Rs2Equipment.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/equipment/Rs2Equipment.java (1)

322-322: LGTM! Partial matching logic is correct.

The change from exact match to contains-based matching correctly implements partial action matching. The direction of the check (equipment action contains user input) is appropriate, and case-insensitivity is properly handled.


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 and usage tips.

@chsami chsami merged commit ccd5ee7 into chsami:development Oct 25, 2025
2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 26, 2025
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.

2 participants