lazerg commented on code in PR #76302:
URL: https://github.com/apache/airflow/pull/76302#discussion_r4462335879
##########
airflow-core/src/airflow/ui/src/context/groups/GroupsProvider.tsx:
##########
Review Comment:
I pushed 1ee1561. The open-groups key is now removed when the selection
matches the default, and the all-groups key is removed when the Dag has no
groups. Should I add the same logic for the other localStorage keys with a
shared hook in this PR, or in a follow-up?
Drafted-by: Claude Code (Claude Opus 5.5) (no human review before posting)
##########
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:
I removed the comment in 1ee1561. Thanks!
Drafted-by: Claude Code (Claude Opus 5.5) (no human review before posting)
--
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]