fix: restore ground item Take fallback#1812
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Walkthrough
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/util/reflection/Rs2Reflection.java`:
- Around line 180-181: `extractWithCache()` still has early exits that return an
empty string array before the cached fallback is applied, so normalize those
cached-path returns as well. Update the `outer == null` and non-`List` branches
in `Rs2Reflection.extractWithCache()` to route through the same
`groundItemActionsOrDefault(...)` fallback used later, matching the
`cachedStringField` handling and avoiding the old empty-array behavior after
cache warmup.
🪄 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: 127480ab-9a90-4a7f-80de-c389c0867f91
📒 Files selected for processing (3)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/reflection/Rs2Reflection.javarunelite-client/src/test/java/groundactionfixture/GroundItemActionFixture.javarunelite-client/src/test/java/net/runelite/client/plugins/microbot/util/reflection/Rs2ReflectionGroundItemActionsTest.java
|
Validation note: during the forced fallback smoke test, the injected client logged a warning that it could not correlate the synthetic fallback `Take` menu op with a clicked menu entry. The action still completed successfully: the dropped Amethyst was picked back up and inventory increased from 15 to 16. I am treating this as a diagnostic/menu-correlation warning from the forced fallback test path, not as evidence that the fallback action failed. |
Summary
Restores the legacy ground item action fallback for cases where reflection cannot resolve usable ground item actions from the item definition.
Details
{null, null, "Take", null, null}only when no usable action data is found.Validation
./gradlew.bat :client:compileJava :client:compileTestJava --console=plainNote
This PR is intentionally narrow. It does not replace normal reflected action resolution; it only restores the default Take fallback for failure cases.