Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the MVVM-Reducer Xcode file template to the OversizeArchitecture module-based approach, replacing the previous per-screen MVVM setup with macros and a streamlined structure.
- Migrates to @module, @viewmodel, @view, and @observable macros from OversizeArchitecture/Observation.
- Replaces the old Screen-based files with a Module-centric structure and updates TemplateInfo.plist accordingly.
- Introduces a minimal SwiftUI view scaffold with NavigationLayoutView and preview.
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 |
|---|---|
| File Templates/MVVM-Reducer.xctemplate/___VARIABLE_productName___Screen/___VARIABLE_productName___ViewState.swift | Removed legacy ViewState class (old pattern). |
| File Templates/MVVM-Reducer.xctemplate/___VARIABLE_productName___Screen/___VARIABLE_productName___ViewModel.swift | Removed legacy ViewModel actor and event handling. |
| File Templates/MVVM-Reducer.xctemplate/___VARIABLE_productName___Screen/___VARIABLE_productName___Screen.swift | Removed legacy SwiftUI Screen builder and reducer wiring. |
| File Templates/MVVM-Reducer.xctemplate/___VARIABLE_productName___Screen/___VARIABLE_productName___Reducer.swift | Removed legacy Reducer wrapper. |
| File Templates/MVVM-Reducer.xctemplate/VARIABLE_productName/___VARIABLE_productName___ViewState.swift | Added new ViewState class conforming to ViewStateProtocol using @observable. |
| File Templates/MVVM-Reducer.xctemplate/VARIABLE_productName/___VARIABLE_productName___ViewModel.swift | Added new ViewModel actor annotated with @viewmodel. |
| File Templates/MVVM-Reducer.xctemplate/VARIABLE_productName/___VARIABLE_productName___View.swift | Added new View conforming to ViewProtocol with NavigationLayoutView and preview. |
| File Templates/MVVM-Reducer.xctemplate/VARIABLE_productName/VARIABLE_productName.swift | Added Module enum annotated with @module and Input/Output structs. |
| File Templates/MVVM-Reducer.xctemplate/TemplateInfo.plist | Updated template description, summary, default completion name, and main template file. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| public final class ___FILEBASENAMEASIDENTIFIER___: ViewStateProtocol { | ||
| public init(input: ___VARIABLE_productName___.Input?) {} | ||
| } |
There was a problem hiding this comment.
The initializer references VARIABLE_productName.Input, but the module in this PR does not declare a nested Input type. Either update this to use ___VARIABLE_productName___Input or, preferably, define nested types in the module (e.g., enum Module { struct Input {} struct Output {} }) so the signature remains module-scoped.
| import SwiftUI | ||
|
|
There was a problem hiding this comment.
[nitpick] SwiftUI is not used in this file; consider removing the unused import to keep the template minimal.
| import SwiftUI |
No description provided.