Skip to content

feat: add run profile feature#11

Merged
sirily11 merged 1 commit into
mainfrom
run-profile
May 14, 2026
Merged

feat: add run profile feature#11
sirily11 merged 1 commit into
mainfrom
run-profile

Conversation

@sirily11

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 14, 2026 14:57
@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rxcode Ready Ready Preview, Comment May 14, 2026 2:57pm

Request Review

@sirily11 sirily11 enabled auto-merge (squash) May 14, 2026 14:57
@autopilot-project-manager autopilot-project-manager Bot added the enhancement New feature or request label May 14, 2026
@sirily11 sirily11 merged commit c93a442 into main May 14, 2026
8 checks passed
@sirily11 sirily11 deleted the run-profile branch May 14, 2026 15:00
@sirily11

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a run profile feature to RxCode, including persisted run configurations, toolbar run/stop controls, an inspector tab for run output, process execution helpers, and core tests.

Changes:

  • Added run profile models, environment parsing, wrapper script generation, and persistence.
  • Added SwiftUI configuration, toolbar, and run output inspector views.
  • Added tests for core run profile helpers and .env parsing.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
RxCode/Views/Toolbar/RxCodeToolbar.swift Adds the run profile toolbar group.
RxCode/Views/RunProfile/RunProfileToolbarGroup.swift Implements profile selection plus run/stop toolbar controls.
RxCode/Views/RunProfile/RunOutputInspectorView.swift Adds the Run inspector output UI and terminal host.
RxCode/Views/RunProfile/RunConfigurationsView.swift Adds the run configuration editor sheet.
RxCode/Views/MainView.swift Presents the run configurations sheet.
RxCode/Views/Inspector/RightInspectorPanel.swift Handles the new Run inspector tab case.
RxCode/Views/Inspector/InspectorContentView.swift Mounts the Run inspector view.
RxCode/Services/RunProfile/RunService.swift Adds run task lifecycle and terminal process management.
RxCode/Services/PersistenceService.swift Persists run profiles per project.
RxCode/App/AppState.swift Adds run service ownership and run profile cache/load/save APIs.
Packages/Tests/RxCodeCoreTests/RunTaskExecutorTests.swift Tests run task helper behavior and model round-tripping.
Packages/Tests/RxCodeCoreTests/RunEnvFileParserTests.swift Tests .env parser behavior.
Packages/Sources/RxCodeCore/WindowState.swift Adds Run inspector tab and per-window run UI state.
Packages/Sources/RxCodeCore/RunProfile/RunTaskExecutor.swift Adds working-directory, environment, and wrapper-script helpers.
Packages/Sources/RxCodeCore/RunProfile/RunEnvFileParser.swift Adds .env parsing utilities.
Packages/Sources/RxCodeCore/Models/RunStep.swift Adds run step model.
Packages/Sources/RxCodeCore/Models/RunProfile.swift Adds run profile model.
Packages/Sources/RxCodeCore/Models/BashRunConfig.swift Adds Bash run config, environment preset, and env var models.

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

Comment on lines +38 to +42
draft = appState.runProfiles(for: project.id)
selectedId = windowState.selectedRunProfileId ?? draft.first?.id
}
}

Comment thread RxCode/App/AppState.swift
func ensureRunProfilesLoaded(for projectId: UUID) async {
if runProfilesByProject[projectId] != nil { return }
let loaded = await persistence.loadRunProfiles(projectId: projectId)
runProfilesByProject[projectId] = loaded
Comment on lines +108 to +115
// Login but *not* interactive: `-i` makes `set -e` + builtins (e.g.
// `cd`) exit with code 1 and skip the EXIT trap in zsh — a quirk that
// left users staring at a silent "exit 1" with no diagnostics.
// `-l` still sources /etc/zprofile and ~/.zprofile, which is where
// macOS and Homebrew configure PATH. The wrapper script also
// tolerantly sources ~/.zshrc for users who stash PATH there.
terminalView.startProcess(
executable: "/bin/zsh",
Comment on lines +86 to +88
// weirdness) can't leak back here.
lines.append("__rxcode_user_path=$(/bin/zsh -ic 'printf %s \"$PATH\"' 2>/dev/null)")
lines.append("[ -n \"$__rxcode_user_path\" ] && export PATH=\"$__rxcode_user_path\"")
Comment on lines +153 to +154
nonisolated func processTerminated(source: TerminalView, exitCode: Int32?) {
onTerminated(exitCode ?? -1)
}

func start() {
let envPairs = resolvedEnvironment.map { "\($0.key)=\($0.value)" }
Comment on lines +114 to +118
terminalView.startProcess(
executable: "/bin/zsh",
args: ["-lc", wrapperScript],
environment: envPairs,
currentDirectory: resolvedCwd
.frame(minWidth: 760, minHeight: 560, idealHeight: 620)
.onAppear {
draft = appState.runProfiles(for: project.id)
selectedId = windowState.selectedRunProfileId ?? draft.first?.id
Comment on lines +446 to +450
ForEach(steps.wrappedValue.indices, id: \.self) { i in
HStack(spacing: 6) {
Picker("", selection: Binding(
get: { steps.wrappedValue[i].type },
set: { steps.wrappedValue[i].type = $0 }
Comment on lines +405 to +423
ForEach(preset.wrappedValue.manualVars.indices, id: \.self) { i in
HStack(spacing: 8) {
TextField("API_KEY", text: Binding(
get: { preset.wrappedValue.manualVars[i].key },
set: { preset.wrappedValue.manualVars[i].key = $0 }
))
.textFieldStyle(.roundedBorder)
.font(.system(.body, design: .monospaced))
.frame(width: 140)

TextField("value", text: Binding(
get: { preset.wrappedValue.manualVars[i].value },
set: { preset.wrappedValue.manualVars[i].value = $0 }
))
.textFieldStyle(.roundedBorder)
.font(.system(.body, design: .monospaced))

Button {
preset.wrappedValue.manualVars.remove(at: i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants