@industry-theme/repository-composition-panels 0.2.20 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8425,13 +8425,12 @@ const GitChangesPanelContent = ({
8425
8425
  );
8426
8426
  const [showFullTree, setShowFullTree] = useState(false);
8427
8427
  const userHasToggledView = useRef(false);
8428
- const hasInitializedView = useRef(false);
8429
8428
  useEffect(() => {
8430
- if (!isLoading && !hasInitializedView.current && !userHasToggledView.current) {
8431
- hasInitializedView.current = true;
8432
- setShowFullTree(!hasChanges);
8429
+ if (!isLoading && !userHasToggledView.current) {
8430
+ const shouldShowFullTree = !hasChanges;
8431
+ setShowFullTree((prev) => prev === shouldShowFullTree ? prev : shouldShowFullTree);
8433
8432
  }
8434
- }, [isLoading]);
8433
+ }, [hasChanges, isLoading]);
8435
8434
  const getFileStatus = useCallback(
8436
8435
  (filePath) => {
8437
8436
  if (gitStatus.staged.includes(filePath)) {