Skip to content

Commit 7116db7

Browse files
authored
fix(macos): replace setup terminal modal with terminal drawer (#16)
## Summary - remove Setup Assistant's embedded terminal modal state/sheet flow - route "Run here" actions to the built-in terminal drawer via global-shell terminal notifications - delete unused `ShellView` now that no modal terminal surface remains ## Testing - bun run macos:test - bun x ultracite check Closes #15 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Setup assistant terminal execution now uses the global terminal panel instead of an embedded sheet for consistency with standard terminal behavior. * **Refactor** * Removed the embedded terminal component from the setup process. Commands now route through the global terminal panel for a unified user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 8393ddf commit 7116db7

2 files changed

Lines changed: 3 additions & 139 deletions

File tree

apps/macos/Packages/Features/DashboardFeature/Sources/DashboardFeature/SetupAssistantView.swift

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ struct SetupAssistantView: View {
1818
let initialSection: SetupAssistantSection
1919
@State private var section: SetupAssistantSection
2020

21-
@State private var showEmbeddedTerminal = false
22-
@State private var embeddedCommand: String? = nil
2321
@State private var terminalAutomationGranted: Bool? = nil
2422

2523
init(initialSection: SetupAssistantSection) {
@@ -49,9 +47,6 @@ struct SetupAssistantView: View {
4947
}
5048
.padding(18)
5149
.frame(minWidth: 560, idealWidth: 720, minHeight: 460, idealHeight: 560, alignment: .topLeading)
52-
.sheet(isPresented: $showEmbeddedTerminal) {
53-
embeddedTerminalSheet
54-
}
5550
}
5651

5752
private var header: some View {
@@ -220,31 +215,9 @@ struct SetupAssistantView: View {
220215
}
221216

222217
private func runInEmbeddedTerminalIfAvailable(_ command: String) {
223-
embeddedCommand = command
224-
showEmbeddedTerminal = true
225-
}
226-
227-
private var embeddedTerminalSheet: some View {
228-
let project = ProjectSummary(
229-
projectId: "setup",
230-
name: "Setup",
231-
devHost: nil,
232-
repoRoot: FileManager.default.homeDirectoryForCurrentUser.path,
233-
projectDir: nil,
234-
definedServices: nil,
235-
extensionsEnabled: nil,
236-
features: nil,
237-
serviceHosts: nil,
238-
runtimeConfigured: nil,
239-
runtimeStatus: nil,
240-
runtime: nil,
241-
kind: .unregistered,
242-
status: .unknown
243-
)
244-
return VStack(alignment: .leading, spacing: 0) {
245-
ShellView(project: project, embedded: true, initialCommand: embeddedCommand)
246-
}
247-
.frame(minWidth: 760, minHeight: 480)
218+
let normalizedCommand = command.trimmingCharacters(in: .whitespacesAndNewlines)
219+
guard !normalizedCommand.isEmpty else { return }
220+
openGlobalCommandInTerminalPanel(command: normalizedCommand, title: "Setup")
248221
}
249222
}
250223

apps/macos/Packages/Features/DashboardFeature/Sources/DashboardFeature/ShellView.swift

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)