diff --git a/src/pages/workspace/rules/AgentRules/AddAgentRulePage.tsx b/src/pages/workspace/rules/AgentRules/AddAgentRulePage.tsx index f2d69c09adf4..990e7527d976 100644 --- a/src/pages/workspace/rules/AgentRules/AddAgentRulePage.tsx +++ b/src/pages/workspace/rules/AgentRules/AddAgentRulePage.tsx @@ -129,11 +129,9 @@ function AddAgentRulePage({ setActiveTab(key); }; + // The header back button always closes the RHP. Switching between the Suggested and Edit tabs is handled + // by the TabSelector, so the back button must not be repurposed to step between tabs. const handleBackButtonPress = () => { - if (activeTab === CONST.TAB.AGENT_RULE.WRITE) { - setActiveTab(CONST.TAB.AGENT_RULE.SUGGESTIONS); - return; - } Navigation.goBack(); };