Title: test(desktop): stop the agent's terminal commands in the real app, with real shells and real tmux by waleedlatif1 · Pull Request #8733 · simstudioai/sim · GitHub
Open Graph Title: test(desktop): stop the agent's terminal commands in the real app, with real shells and real tmux by waleedlatif1 · Pull Request #8733 · simstudioai/sim
X Title: test(desktop): stop the agent's terminal commands in the real app, with real shells and real tmux by waleedlatif1 · Pull Request #8733 · simstudioai/sim
Description: Summary Terminal cancel ships without a feature flag, so this tests it in the real app, with real shells and a real tmux server. It asserts what is running and which panes exist, never which calls were made. Builds on #8705, #8720, #8722 and #8725, all on staging. Stop: ends an agent command in a plain shell, and a tagged tmux run, closing only its pane. The user's own command, and the pane the user split beside the agent's, keep running. Sign-out: through the web app's logout, and through the session cookie going away (another account signing in). Every agent command stops, and the user's tmux panes keep running. Switching Terminal off: the same. A tmux run whose chat was put away: sign-out stops it, though no live terminal holds it any more. Launch recovery: after an interrupted sign-out, the previous process's run is stopped; after a crash mid-wait (the call never got its result), it is stopped; a run handed back as running survives a quit and the relaunch, and its pane can still be read; a finished run is only forgotten; a pane that took a recorded id after a tmux restart is never touched. tmux without pane options: using real tmux 2.9a's refusal text, a run goes ahead untracked, and Stop and sign-out leave it alone. How it is built Agent and user commands ignore SIGHUP, SIGINT and SIGTERM, so only Sim's own stop (which escalates to SIGKILL) can end them, and a stray stop would show. Each launch gets its own tmux server (TMUX_TMPDIR). Every process name carries a per-run suffix, so concurrent runs on one machine never see each other's processes. The fixture Sim and its helpers move to e2e/executor-sim.ts, shared with the background executor suite. The macOS Desktop E2E job installs tmux, so the tmux scenarios run in CI. Without tmux they skip, with the reason given. Each scenario's status and duration go to TERMINAL_CANCEL_REPORT_PATH (test-results/terminal-cancel-report.json in CI, uploaded on failure). A failed scenario attaches its calls, its panes, the app's output and the process list. By design, sign-out and Terminal off close every shell. So a user's command in a plain-shell tab is checked against Stop, and a user's command in a tmux pane is checked against every path. Type of Change Test coverage Testing EC2 (Linux, real tmux 3.4): 12/12. Each of 14 guards, removed in turn, turns its scenario red: Stop (plain shell and tmux); user commands and panes left alone; the sign-out, cookie and Terminal-off paths; untracked runs; the launch and sign-out sweeps; the tag check on recorded runs; dropping finished records; keeping collectable runs; marking runs handed back. Cold runs: 120/120 across 10 fresh Playwright invocations on EC2, on this branch rebased onto staging. Mac (no tmux installed): the 4 plain-shell scenarios pass and the 8 tmux scenarios skip. The background executor suite after the fixture move: 11/11 on the Mac. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Terminal cancel ships without a feature flag, so this tests it in the real app, with real shells and a real tmux server. It asserts what is running and which panes exist, never which calls ...
X Description: Summary Terminal cancel ships without a feature flag, so this tests it in the real app, with real shells and a real tmux server. It asserts what is running and which panes exist, never which calls ...
Opengraph URL: https://github.com/simstudioai/sim/pull/8733
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3cf585bf-9687-213c-4a2d-d5a7a4c1970b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A220:305156:8A55CE:C2BBD7:6AFB6F39 |
| html-safe-nonce | 203eda9aed7eec7952ebd4af73700f3579402aae8523300446ee5b25f32d8381 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjIwOjMwNTE1Njo4QTU1Q0U6QzJCQkQ3OjZBRkI2RjM5IiwidmlzaXRvcl9pZCI6IjY5MDc1MjY3ODA3NDgwMDEwODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ec39c716e807b7a6b9eceeb5baa99b0623a71f1e03d268524ca983fee1fca610 |
| hovercard-subject-tag | pull_request:4769328323 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/8733/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Terminal cancel ships without a feature flag, so this tests it in the real app, with real shells and a real tmux server. It asserts what is running and which panes exist, never which calls ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width