Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Conversation

RomanPodymov
Copy link
Owner

No description provided.

# Conflicts:
#	Bookie/ViewModel/BookViewModel.swift
#	Bookie/ViewModel/BooksViewModel.swift
# Conflicts:
#	BookieTests/BookieTests.swift
#	project.yml
# Conflicts:
#	Bookie/UI/BooksScreenSwiftUI.swift
#	Bookie/ViewModel/BooksViewModel.swift
@RomanPodymov RomanPodymov requested a review from Copilot May 14, 2025 16:43
Copy link

@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

This PR integrates the JobInterviewAssignmentKit dependency and updates the view model implementations to use generics, alongside adjustments to dependency injection and build script configurations.

  • Added JobInterviewAssignmentKit dependency in project.yml.
  • Updated BooksViewModel and BookViewModel to use generic type parameters and refined initialization.
  • Adjusted DI registrations and updated build script command paths with absolute mint paths.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
project.yml Added JobInterviewAssignmentKit and updated build script command paths.
Bookie/ViewModel/BooksViewModel.swift Made BooksViewModel generic, introduced SetupParams, and removed optional chaining.
Bookie/ViewModel/BookViewModel.swift Updated BookViewModel to be generic and imported JobInterviewAssignmentKit.
Bookie/UI/BooksScreenSwiftUI.swift Updated viewModel type to generic and updated binding signatures.
Bookie/UI/BooksScreen.swift Updated viewModel type to generic.
Bookie/UI/BookScreenSwiftUI.swift Updated viewModel type to generic in binding definitions.
Bookie/UI/BookScreen.swift Updated viewModel type to generic.
Bookie/DI/DI.swift Updated dependency registration to use Coordinator instead of CoordinatorSwiftUI.
Bookie/DI/CoordinatorSwiftUI.swift Updated return types to use new Swift 5.9 existential syntax for AnyScreen protocols.
Comments suppressed due to low confidence (3)

Bookie/ViewModel/BooksViewModel.swift:44

  • [nitpick] The introduced SetupParams struct is not currently integrated into the view model initialization; consider either utilizing it for configuration consistency or removing it if redundant.
struct SetupParams { ... }

Bookie/ViewModel/BooksViewModel.swift:86

  • Removing optional chaining on 'screen' assumes it is always non-nil; please confirm that the initialization order guarantees that a valid screen is always assigned.
await screen.onNewDataReceived(oldSet: oldSet, newSet: createSet(from: books))

Bookie/DI/DI.swift:34

  • Ensure that the new Coordinator provides equivalent functionality to the previous CoordinatorSwiftUI to maintain expected navigation flow.
Coordinator()

Comment on lines +85 to +90
- script: "/opt/homebrew/bin/mint run swiftgen"
name: SwiftGen
postCompileScripts:
- script: "mint run swiftformat . --swiftversion 5.5"
- script: "/opt/homebrew/bin/mint run swiftformat . --swiftversion 5.5"
name: SwiftFormat
- script: "mint run swiftlint"
- script: "/opt/homebrew/bin/mint run swiftlint"
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

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

[nitpick] The use of absolute paths for mint commands can improve reliability; ensure that these paths are consistent across different environments.

Copilot uses AI. Check for mistakes.


final class BooksScreenSwiftUI: UIHostingController<BooksScreenRootView>, AnyBooksScreen {
private var viewModel: BooksViewModel!
var viewModel: BooksViewModel<BooksScreenSwiftUI>!
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

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

[nitpick] Changing the viewModel from private to internal exposes it beyond the class; consider whether this exposure is intentional or if encapsulation should be maintained.

Suggested change
var viewModel: BooksViewModel<BooksScreenSwiftUI>!
private var viewModel: BooksViewModel<BooksScreenSwiftUI>!

Copilot uses AI. Check for mistakes.

@RomanPodymov RomanPodymov merged commit 3163b6c into main May 14, 2025
1 check passed
@RomanPodymov RomanPodymov deleted the feature/kit branch May 14, 2025 20:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant