Skip to content

Integrate WelcomeFeature into AppFeature + rewrite WelcomeView#161

Merged
kirich1409 merged 1 commit intomainfrom
feature/integrate-welcome
Apr 17, 2026
Merged

Integrate WelcomeFeature into AppFeature + rewrite WelcomeView#161
kirich1409 merged 1 commit intomainfrom
feature/integrate-welcome

Conversation

@kirich1409
Copy link
Copy Markdown
Contributor

Summary

  • AppFeature.State.Route.welcome now carries WelcomeFeature.State; added routeWelcome computed property mirroring routeMain and scoped the child reducer via .ifLet(\.routeWelcome, action: \.welcome).
  • welcome(.delegate(.projectSelected(url))) is forwarded to .openProject(url), preserving the existing project-open pipeline.
  • Default AppFeature.State route is now .welcome(WelcomeFeature.State()) — app launches with the Welcome screen by default.
  • WelcomeView rewritten to consume StoreOf<WelcomeFeature> — removed @Query, @Environment(\.modelContext), and direct ProjectRepository instantiation. All project ops (open recent, toggle favorite, remove) now go through the store.
  • RecentProjectRow updated to accept ProjectInfo (value type) instead of ProjectModel (SwiftData @model).
  • AppRootView scopes into the welcome store via store.scope(state: \.routeWelcome, action: \.welcome).

Closes #144

Test plan

  • xcodebuild build — BUILD SUCCEEDED
  • swiftlint lint --strict — 0 violations in 146 files
  • xcodebuild test — all unit tests pass (including WelcomeFeatureTests)
  • Manual: launch app → Welcome appears; Open Project opens folder picker; Recent row opens project; favorite toggle + remove work end-to-end

Note: RelayUITests failures are pre-existing on main (worktree sidebar timeout unrelated to routing) and not introduced by this change.

Board item ID: PVTI_lADOA59kY84BUaDazgqBrek

- 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
Copilot AI review requested due to automatic review settings April 17, 2026 10:54
Copy link
Copy Markdown

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 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.welcome to carry WelcomeFeature.State, adds routeWelcome, and scopes WelcomeFeature via .ifLet.
  • Forwards WelcomeFeature’s delegate event (projectSelected) into the existing .openProject(url) routing pipeline.
  • Rewrites WelcomeView to take StoreOf<WelcomeFeature> and routes all recent-project interactions through feature actions, with RecentProjectRow now using ProjectInfo.

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.

@kirich1409 kirich1409 merged commit 5293d41 into main Apr 17, 2026
14 checks passed
@kirich1409 kirich1409 deleted the feature/integrate-welcome branch April 17, 2026 11:00
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.

Integrate WelcomeFeature into AppFeature + rewrite WelcomeView

2 participants