Skip to content

Server management from Welcome Screen#165

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

Server management from Welcome Screen#165
kirich1409 merged 1 commit intomainfrom
feature/server-mgmt-welcome

Conversation

@kirich1409
Copy link
Copy Markdown
Contributor

Summary

  • Lift ServerListFeature and CloudNavigationFeature from MainFeature up to AppFeature as @Presents sheets — both are now reachable from Welcome and Main.
  • WelcomeFeature gains .manageServersTappeddelegate(.manageServersRequested); AppFeature intercepts and opens the server sheet.
  • Connect-local and connect-cloud flows from the Welcome-screen sheet auto-switch to MainFeature and open a remote tab (or walk the cloud navigation → session → terminal flow).
  • activeRESTClient (used by CloudNavigationFeature via .transformDependency) moves from MainFeature to AppFeature.
  • WelcomeView redesigned as a two-column HSplitView: Recent Projects + search on the left, Quick Actions (Open Project / Manage Servers) + app identity on the right.
  • Connect to Server… menu item and ⌘⇧K now target AppFeature.showServerList directly.

Test plan

  • swiftlint lint --strict (0 violations)
  • xcodebuild build with CODE_SIGN_IDENTITY=- (BUILD SUCCEEDED)
  • xcodebuild test unit tests — all pass (WelcomeFeatureTests, ServerListDuplicateTests, ServerRepositoryTests, StartupRouteResolverTests, RelayTests)
  • Added manageServersTappedEmitsDelegate to WelcomeFeatureTests
  • Manual: open Welcome, tap "Manage Servers", add/edit/delete a server, connect local → Main opens with remote tab
  • Manual: from Welcome → connect cloud → CloudNavigationView → open session terminal → Main with remote tab
  • Manual: verify ⌘⇧K and Connect-to-Server… menu work from both Welcome and Main

RelayUITests failures are pre-existing (fail on main too, unrelated to this change — the worktree sidebar never appears in the headless UI-test host).

Closes #147

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

🤖 Generated with Claude Code

ServerListFeature and CloudNavigationFeature now live on AppFeature as
@presents sheets, available from both Welcome and Main. WelcomeFeature
emits .manageServersRequested; AppFeature routes it to the sheet and
handles local/cloud connect flows, auto-switching to Main when the user
triggers a session from the Welcome screen.

Welcome layout redesigned as two columns: Recent Projects + search on
the left, Quick Actions (Open Project, Manage Servers) plus app
identity on the right.

Closes #147

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 17, 2026 12:08
@kirich1409 kirich1409 merged commit 6c20399 into main Apr 17, 2026
14 checks passed
@kirich1409 kirich1409 deleted the feature/server-mgmt-welcome branch April 17, 2026 12:14
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 makes server management reachable from both the Welcome screen and the Main UI by lifting server-related presentation (ServerList + CloudNavigation) to the app root, and updates the Welcome UI layout to include “Manage Servers”.

Changes:

  • Lift ServerListFeature + CloudNavigationFeature ownership/presentation from MainFeature to AppFeature/AppRootView as global sheets.
  • Add Welcome quick action .manageServersTapped that delegates to AppFeature to open the server management sheet.
  • Redesign WelcomeView into a two-column HSplitView layout and update menu/keyboard routing to target AppFeature.showServerList.

Reviewed changes

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

Show a summary per file
File Description
MacApp/Relay/AppFeature.swift Owns global server/cloud sheets; handles Welcome delegate and routes connect flows into Main.
MacApp/Relay/AppRootView.swift Presents global sheets (ServerList, CloudNavigation) at the root view level.
MacApp/Relay/MainFeature.swift Removes server/cloud sheet state/actions now owned by AppFeature.
MacApp/Relay/Welcome/WelcomeFeature.swift Adds manageServersTapped and delegates manageServersRequested to parent.
MacApp/Relay/Welcome/WelcomeView.swift Two-column Welcome layout; adds “Manage Servers” quick action button.
MacApp/Relay/RelayApp.swift Updates menu item “Connect to Server…” to send AppFeature.showServerList.
MacApp/Relay/AppDelegate.swift Updates Cmd+Shift+K shortcut handler to send AppFeature.showServerList.
MacApp/RelayTests/WelcomeFeatureTests.swift Adds a unit test asserting manage-servers emits the delegate action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +36
/// Server management sheet — available from both Welcome and Main.
@Presents var serverList: ServerListFeature.State?

/// Cloud navigation sheet — presented after selecting a cloud server.
@Presents var cloudNavigation: CloudNavigationFeature.State?
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

Now that serverList and cloudNavigation live in AppFeature.State, route transitions like .showWelcome / .closeProject will no longer implicitly dismiss these sheets (previously they were owned by MainFeature and disappeared when routing away). To avoid stale sheets remaining visible after switching routes (and potential retention of activeRESTClient), ensure these presentation states are reset to nil when leaving Main/Welcome as appropriate.

Copilot uses AI. Check for mistakes.

// MARK: Server list

case .showServerList:
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

showServerList sets state.serverList without first dismissing cloudNavigation (or clearing activeRESTClient). Because AppRootView attaches two .sheet modifiers, having both presentation states non-nil can lead to undefined/incorrect sheet presentation. Consider enforcing mutual exclusivity by clearing state.cloudNavigation and activeRESTClient when showing the server list, or by modeling both sheets under a single @Presents destination enum.

Suggested change
case .showServerList:
case .showServerList:
state.cloudNavigation = nil
activeRESTClient.setValue(nil)

Copilot uses AI. Check for mistakes.
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.

Server management from Welcome Screen

2 participants