Prevent silent chat fallback for strategy mutations - #53
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughStrategy mutations now prioritize bridge delivery, report failures, block unintended chat fallback, and update UI state only after successful delivery across target, group, raid, party, toggle, and Shaman actions. ChangesStrategy mutation routing
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant UI
participant MultiBotEngine
participant Bridge
participant ShamanState
UI->>MultiBotEngine: dispatch strategy mutation
MultiBotEngine->>Bridge: deliver command
Bridge-->>MultiBotEngine: accept or reject command
MultiBotEngine-->>UI: return route result
UI->>ShamanState: update selection or toggle after success
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (3)
Core/MultiBotEngine.lua (3)
664-685: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicated route-dispatch block.
This raid and party dispatch repeats the same route-handling shape used in
ActionToTargetOrGroupat lines 635-655. Extract a helper to keep the four copies in sync.🤖 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 `@Core/MultiBotEngine.lua` around lines 664 - 685, Extract the repeated route-handling and SendChatMessage logic from ActionToTargetOrGroup and the shown RAID/PARTY branches into a shared helper, preserving the existing route outcomes and return values for each channel. Replace all four duplicated dispatch blocks with calls to that helper so future route behavior remains synchronized.
529-545: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRoute the warning text through the localization helper.
The surrounding code uses
MultiBot.L(...)for user-visible text, for example at lines 623, 658, and 687. These new messages are hardcoded French strings. Add locale keys so the warning matches the addon language.♻️ Suggested direction
- local message = "|cffff4444[MultiBot]|r " .. subject - .. " : echec de la commande de strategie (" .. detail - .. "). Aucun fallback chat n'a ete envoye." + local message = "|cffff4444[MultiBot]|r " .. subject + .. " : " .. MultiBot.L("strategy.blocked") .. " (" .. detail .. ")"🤖 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 `@Core/MultiBotEngine.lua` around lines 529 - 545, Update _mbWarnStrategyMutationBlocked to obtain both user-visible warning strings through MultiBot.L(...) instead of hardcoded French text, adding the required localization keys in the existing locale definitions. Preserve the dynamic subject and detail values, and follow the established localization usage used near the referenced strategy messages.
607-624: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReturn an explicit route on every
ActionToTargetpath.
ActionToTargetreturns two values for bridge, blocked, and chat outcomes, but returns onlyfalsewhen the target is unavailable. The Warlock transport calls destructure the second value, so that path will settransporttonil; return an explicit route like"no_target"for consistency.🤖 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 `@Core/MultiBotEngine.lua` around lines 607 - 624, Update MultiBot.ActionToTarget so the unavailable-target fallback returns false together with an explicit "no_target" route, while preserving the existing bridge, blocked, and chat return values.
🤖 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.
Nitpick comments:
In `@Core/MultiBotEngine.lua`:
- Around line 664-685: Extract the repeated route-handling and SendChatMessage
logic from ActionToTargetOrGroup and the shown RAID/PARTY branches into a shared
helper, preserving the existing route outcomes and return values for each
channel. Replace all four duplicated dispatch blocks with calls to that helper
so future route behavior remains synchronized.
- Around line 529-545: Update _mbWarnStrategyMutationBlocked to obtain both
user-visible warning strings through MultiBot.L(...) instead of hardcoded French
text, adding the required localization keys in the existing locale definitions.
Preserve the dynamic subject and detail values, and follow the established
localization usage used near the referenced strategy messages.
- Around line 607-624: Update MultiBot.ActionToTarget so the unavailable-target
fallback returns false together with an explicit "no_target" route, while
preserving the existing bridge, blocked, and chat return values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 5effb4ec-3fa7-46fa-9c7d-e1e9187ed061
📒 Files selected for processing (1)
Core/MultiBotEngine.lua
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66951bc2b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary by CodeRabbit