guan404ming commented on code in PR #76302:
URL: https://github.com/apache/airflow/pull/76302#discussion_r4457728044


##########
airflow-core/src/airflow/ui/src/context/groups/GroupsProvider.tsx:
##########
@@ -61,7 +65,15 @@ export const GroupsProvider = ({ children, dagId }: Props) 
=> {
   );
 
   const { allGroupIds: observedGroupIds, allOperators } = 
flattenGraphNodes(structure.nodes);
-  const openGroupIds = storedOpenGroupIds ?? (defaultTaskGroupsExpanded ? 
observedGroupIds : []);
+  const savedOpenGroupIds =
+    sessionOpenGroupIds?.dagId === dagId ? sessionOpenGroupIds.groupIds : 
storedOpenGroupIds;
+  const openGroupIds = savedOpenGroupIds ?? (defaultTaskGroupsExpanded ? 
observedGroupIds : []);
+
+  // Keep the selection in memory too, so groups still toggle when 
localStorage is full.

Review Comment:
   Nice fix! Maybe drop the inline comment, since the PR description already 
explains the in-memory fallback.



-- 
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]

Reply via email to