bito-code-review[bot] commented on code in PR #37141:
URL: https://github.com/apache/superset/pull/37141#discussion_r2843060408


##########
superset-frontend/src/dashboard/components/Header/useHeaderActionsDropdownMenu.tsx:
##########
@@ -106,6 +111,11 @@ export const useHeaderActionsMenu = ({
         case MenuKeys.ManageEmbedded:
           manageEmbedded();
           break;
+        case 'toggle-favorite':
+          if (saveFaveStar && isStarred !== undefined) {
+            saveFaveStar(dashboardId, isStarred);
+          }
+          break;

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Incorrect favorite toggle logic</b></div>
   <div id="fix">
   
   The favorite toggle logic passes the current isStarred value to 
saveFaveStar, but it should pass the inverted value (!isStarred) to actually 
toggle the state. The label correctly shows 'Remove' when starred and 'Add' 
when not, but the action doesn't match.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #6dd7b3</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to