Skip to content

Conversation

maoyama
Copy link
Owner

@maoyama maoyama commented May 10, 2025

No description provided.

maoyama added 3 commits May 10, 2025 10:09
- Updated logic to maintain expansion state of file diffs when new data is loaded.
- Modified mapping of cached and new file diffs to preserve user interactions.
- Added ExpandableModelTests to test the `withExpansionState(from:)` method in Array extension for handling expansion state.
- Updated project.pbxproj to include the new test file.
- Enhanced ExpandableModel struct with necessary functionality for testing.
@maoyama maoyama requested a review from Copilot May 10, 2025 01:58
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR fixes the expandable state handling to preserve user-expansion choices when updating the list of models.

  • Added tests in ExpandableModelTests to verify state preservation and default behavior.
  • Updated CommitCreateView to use the withExpansionState extension when updating file diffs.
  • Introduced an Array extension for merging old expansion states with new models in ExpandableModel.swift.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
GitClientTests/ExpandableModelTests.swift New tests to verify that the expansion state is correctly preserved.
GitClient/Views/Commit/CommitCreateView.swift Updated view logic to merge new file diffs with existing expansion states.
GitClient/Models/ExpandableModel.swift Added an Array extension to support merging expansion states.
Files not reviewed (1)
  • GitClient.xcodeproj/project.pbxproj: Language not supported

@maoyama maoyama merged commit 74774a7 into main May 10, 2025
4 checks passed
@maoyama maoyama deleted the fix-expandable-state branch May 10, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant