Skip to content

[build-tools] Stop web-preview startup when the session is stopped - #4669

Open
gwdp wants to merge 1 commit into
gwdp/appium-startup-stop-20261016from
gwdp/web-preview-startup-stop-20261016
Open

gwdp wants to merge 1 commit into
gwdp/appium-startup-stop-20261016from
gwdp/web-preview-startup-stop-20261016

Conversation

@gwdp

@gwdp gwdp commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Why

A Stop request that arrives while a web-preview session is still starting does not end startup. The worker goes on through Simulator preparation, the host start and the preview tunnel, and then reports the session as ready. This applies to web-preview-only sessions and to legacy serve-sim sessions.

How

  • Use the shared startup Stop watch from [build-tools] Stop agent-device startup when the session is stopped #4666, with a createStartupTasks startup signal, the same as Argent and Appium.
  • Pass the startup signal to Simulator preparation, the host start and the ready report. On Stop, the pending work is cancelled, and the step ends without a ready report.
  • End the watch after the ready report and before the lifetime wait.
  • Finish the session host on every exit. Teardown errors stay visible.

Test Plan

  • New controller tests: Stop while the host starts on macOS and Linux, a teardown failure after Stop during preview setup that stays visible, and a check that the watch ends before the lifetime wait.
  • Claude Code ran the build-tools typecheck and the src/steps tests (1954 passed, 8 skipped), and the root build, typecheck, oxlint, oxfmt and Lerna tests (2511 passed, 8 skipped) on this commit.
  • CI passes on 33a8525. Codecov reports all changed lines covered.
  • Planned: a hosted check that Stop during web-preview startup ends the session without a ready report.

Authorship and LLM use

Gabe asked for Stop coverage for every Simulator session type, with one PR per type. Codex wrote the first version, and Devin found no issues in it. Claude Code rebased it onto the current stack. On Gabe's request, Claude Code changed it to use the shared startup watch from #4666, with the same startup code as Argent and Appium. Gabe reviewed the final diffs and can answer questions.

Generated with T3 Code, using Claude Code.

@gwdp

This comment has been minimized.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp
gwdp added this pull request to stack #4606 October 17, 2026 01:32
devin-ai-integration[bot]

This comment was marked as outdated.

@gwdp
gwdp removed this pull request from stack #4606 October 17, 2026 01:44
@gwdp
gwdp added this pull request to stack #4670 October 17, 2026 01:44
@gwdp gwdp changed the title [build-tools] Observe web-preview Stop requests during startup [build-tools] Stop web-preview startup when the session is stopped Oct 20, 2026
@gwdp
gwdp force-pushed the gwdp/web-preview-startup-stop-20261016 branch from a7089f9 to 25c98dd Compare October 20, 2026 19:04
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.39%. Comparing base (6fc41b4) to head (33a8525).

Additional details and impacted files
@@                          Coverage Diff                          @@
##           gwdp/appium-startup-stop-20261016    #4669      +/-   ##
=====================================================================
+ Coverage                              75.38%   75.39%   +0.01%     
=====================================================================
  Files                                   1056     1056              
  Lines                                  52371    52384      +13     
  Branches                               11381    11424      +43     
=====================================================================
+ Hits                                   39477    39491      +14     
+ Misses                                 11905    11904       -1     
  Partials                                 989      989              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gwdp
gwdp force-pushed the gwdp/web-preview-startup-stop-20261016 branch from 25c98dd to 33a8525 Compare October 20, 2026 20:16
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@gwdp
gwdp marked this pull request as ready for review October 20, 2026 20:46
@gwdp
gwdp requested a review from szdziedzic October 20, 2026 20:46
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.

1 participant