Skip to content

Prevent silent chat fallback for strategy mutations - #53

Merged
Wishmaster117 merged 3 commits into
mainfrom
p1-strategy-no-silent-chat-fallback
Aug 9, 2026
Merged

Prevent silent chat fallback for strategy mutations#53
Wishmaster117 merged 3 commits into
mainfrom
p1-strategy-no-silent-chat-fallback

Conversation

@Wishmaster117

@Wishmaster117 Wishmaster117 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added bridge-first routing for strategy actions with delivery status and availability diagnostics.
    • Added optional legacy chat fallback when bridge delivery is unavailable.
  • Bug Fixes
    • Prevented target, group, and raid/party actions from sending chat when delivery is blocked.
    • Ensured buttons, mode toggles, and totem selections update only after successful command delivery.
    • Improved error reporting and state refresh behavior.
    • Prevented incomplete Shaman command sequences from saving settings or changing visual state.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Wishmaster117, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 423cce6d-351c-4ade-879e-3302bee54c16

📥 Commits

Reviewing files that changed from the base of the PR and between 18f9bcb and 44d9fde.

📒 Files selected for processing (9)
  • Core/MultiBotEngine.lua
  • Locales/MultiBotAceLocale-deDE.lua
  • Locales/MultiBotAceLocale-enGB.lua
  • Locales/MultiBotAceLocale-enUS.lua
  • Locales/MultiBotAceLocale-esES.lua
  • Locales/MultiBotAceLocale-frFR.lua
  • Locales/MultiBotAceLocale-koKR.lua
  • Locales/MultiBotAceLocale-ruRU.lua
  • Locales/MultiBotAceLocale-zhCN.lua
📝 Walkthrough

Walkthrough

Strategy 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.

Changes

Strategy mutation routing

Layer / File(s) Summary
Centralized route handling
Core/MultiBotEngine.lua
Explicit route states distinguish bridge delivery, permitted legacy chat delivery, blocked mutations, and non-strategy actions. Target, group, raid, party, and toggle actions use centralized routing.
Mode and totem state dispatch
UI/MultiBotLeftCoreUI.lua, UI/MultiBotShamanQuickFrame.lua
Mode toggles and totem selection stop when dispatch fails. UI and persistence state changes occur only after successful delivery.
Shaman command completion handling
Strategies/MultiBotShaman.lua
Playbook dispatch accepts a completion callback. Specification updates and Quick Shaman defaults apply only after the current command sequence succeeds.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preventing silent chat fallback during strategy mutations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch p1-strategy-no-silent-chat-fallback

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

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
Core/MultiBotEngine.lua (3)

664-685: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated route-dispatch block.

This raid and party dispatch repeats the same route-handling shape used in ActionToTargetOrGroup at 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 value

Route 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 value

Return an explicit route on every ActionToTarget path.

ActionToTarget returns two values for bridge, blocked, and chat outcomes, but returns only false when the target is unavailable. The Warlock transport calls destructure the second value, so that path will set transport to nil; 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8c08274 and 66951bc.

📒 Files selected for processing (1)
  • Core/MultiBotEngine.lua

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread Core/MultiBotEngine.lua
Comment thread Core/MultiBotEngine.lua
@Wishmaster117

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 18f9bcbdda

ℹ️ 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".

@Wishmaster117

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 44d9fde472

ℹ️ 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".

@Wishmaster117
Wishmaster117 merged commit f4dcbd8 into main Aug 9, 2026
5 checks passed
@Wishmaster117
Wishmaster117 deleted the p1-strategy-no-silent-chat-fallback branch August 9, 2026 16:17
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