Integrate WelcomeFeature into AppFeature + rewrite WelcomeView#161
Merged
kirich1409 merged 1 commit intomainfrom Apr 17, 2026
Merged
Integrate WelcomeFeature into AppFeature + rewrite WelcomeView#161kirich1409 merged 1 commit intomainfrom
kirich1409 merged 1 commit intomainfrom
Conversation
- Route.welcome now carries WelcomeFeature.State - routeWelcome computed property mirrors routeMain - WelcomeFeature scoped via .ifLet, delegate.projectSelected forwards to .openProject - Default route is .welcome — app launches with Welcome screen - WelcomeView rewritten to use StoreOf<WelcomeFeature>; drop @query, @Environment(\.modelContext), direct ProjectRepository - RecentProjectRow accepts ProjectInfo instead of ProjectModel Closes #144
There was a problem hiding this comment.
Pull request overview
This PR integrates WelcomeFeature into the app-level router (AppFeature) and rewrites the Welcome UI to be fully driven by TCA state/actions, removing direct SwiftData/repository access from the view layer.
Changes:
- Updates
AppFeature.State.Route.welcometo carryWelcomeFeature.State, addsrouteWelcome, and scopesWelcomeFeaturevia.ifLet. - Forwards
WelcomeFeature’s delegate event (projectSelected) into the existing.openProject(url)routing pipeline. - Rewrites
WelcomeViewto takeStoreOf<WelcomeFeature>and routes all recent-project interactions through feature actions, withRecentProjectRownow usingProjectInfo.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| MacApp/Relay/AppFeature.swift | Adds Welcome route state + reducer scoping and forwards delegate selection into .openProject. |
| MacApp/Relay/AppRootView.swift | Scopes and renders WelcomeView from the Welcome route. |
| MacApp/Relay/Welcome/WelcomeView.swift | Converts Welcome UI to StoreOf<WelcomeFeature> and moves project operations into TCA actions using ProjectInfo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppFeature.State.Route.welcomenow carriesWelcomeFeature.State; addedrouteWelcomecomputed property mirroringrouteMainand scoped the child reducer via.ifLet(\.routeWelcome, action: \.welcome).welcome(.delegate(.projectSelected(url)))is forwarded to.openProject(url), preserving the existing project-open pipeline.AppFeature.Stateroute is now.welcome(WelcomeFeature.State())— app launches with the Welcome screen by default.WelcomeViewrewritten to consumeStoreOf<WelcomeFeature>— removed@Query,@Environment(\.modelContext), and directProjectRepositoryinstantiation. All project ops (open recent, toggle favorite, remove) now go through the store.RecentProjectRowupdated to acceptProjectInfo(value type) instead ofProjectModel(SwiftData @model).AppRootViewscopes into the welcome store viastore.scope(state: \.routeWelcome, action: \.welcome).Closes #144
Test plan
xcodebuild build— BUILD SUCCEEDEDswiftlint lint --strict— 0 violations in 146 filesxcodebuild test— all unit tests pass (includingWelcomeFeatureTests)Note:
RelayUITestsfailures are pre-existing onmain(worktree sidebar timeout unrelated to routing) and not introduced by this change.Board item ID:
PVTI_lADOA59kY84BUaDazgqBrek