Skip to content

T-7: Switch RelayApp to WindowGroup(for: ProjectID) + Window(id: welcome) #201

@kirich1409

Description

@kirich1409

Part of EPIC #193. Depends on #198, #200.

Description

Replace the single WindowGroup in RelayApp.body with:

  • Window("Welcome to Relay", id: "welcome") { WelcomeSceneRoot(store: scopedStore) } — singleton scene
  • WindowGroup("Project", for: ProjectID.self) { $projectID in ProjectSceneRoot(projectID: projectID, store: scopedStore) } — data-driven

Each scene receives a scoped store: on appear, dispatch AppFeature.Action.windowDidAppear(windowID:) which adds a new WindowFeature.State to AppFeature.State.windows; on disappear, dispatch windowDidClose(windowID:) to remove it. The global AppFeature store continues to exist; only the per-window slice changes.

Acceptance Criteria

  • Welcome is exactly one window — File → New Welcome activates the existing one, never creates a duplicate
  • openWindow(value: projectID) on an already-open projectID activates the existing window rather than creating a duplicate (verified via manual test + unit test)
  • Scene restoration after Cmd+Q + relaunch opens all previously open project windows
  • Scoped store routes actions correctly to its owning window
  • Window title = project name
  • Integration test: open 2 projects, close window A → window B remains with its project

Module / Layer

Relay / RelayApp (scene composition)

Complexity

Large

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions