diff --git a/.github/workflows/mobile-e2e.yml b/.github/workflows/mobile-e2e.yml index 6c7f974..da79fe7 100644 --- a/.github/workflows/mobile-e2e.yml +++ b/.github/workflows/mobile-e2e.yml @@ -1,17 +1,7 @@ name: Mobile E2E Tests on: - push: - branches: [main] - paths: - - 'mobile/**' - pull_request: - branches: [main] - paths: - - 'mobile/**' workflow_dispatch: - schedule: - - cron: '0 9 * * 1' # Monday 9am UTC jobs: maestro-ios: diff --git a/src/workspace/manager.ts b/src/workspace/manager.ts index 00e9b62..9e44f5b 100644 --- a/src/workspace/manager.ts +++ b/src/workspace/manager.ts @@ -607,6 +607,19 @@ export class WorkspaceManager { } } + private async restartOpenCodeServer(containerName: string): Promise { + await docker.execInContainer( + containerName, + [ + 'sh', + '-c', + 'pkill -f "opencode serve" || true; for i in $(seq 1 20); do pgrep -f "opencode serve" > /dev/null || break; sleep 0.25; done', + ], + { user: 'workspace' } + ); + await this.startOpenCodeServer(containerName); + } + private async runUserScripts(containerName: string): Promise { const scriptPaths = this.config.scripts.post_start; if (!scriptPaths || scriptPaths.length === 0) { @@ -1221,7 +1234,12 @@ export class WorkspaceManager { throw new Error(`Workspace '${name}' is not running`); } - await this.setupWorkspaceCredentials(containerName, name, { strictWorker: true }); + await this.setupWorkspaceCredentials(containerName, name, { + strictWorker: true, + startOpenCodeServer: false, + }); + await this.updateAgentBinaries(containerName); + await this.restartOpenCodeServer(containerName); } async setPortForwards(name: string, forwards: PortMapping[]): Promise {