Skip to content

Give the operator a Cancel test button beside Restart station - #32

Merged
virtualguy merged 1 commit into
masterfrom
feat/cancel-test-button
Sep 23, 2026
Merged

virtualguy merged 1 commit into
masterfrom
feat/cancel-test-button

Conversation

@virtualguy

Copy link
Copy Markdown

Why

Restart station was the only control in the nav bar, and on a run that holds a radio for an hour a restart is a kill: the plan's teardown never runs, so a mesh bench is left with both tower boards on the test channel and at the test power until someone reboots them. Operators need a way to end a run that was started with the wrong answer, or has to move channel, and come straight back to the DUT prompt with the station process still up.

What

A Cancel test button beside Restart station. It POSTs /commands/cancel to the station, which aborts the running phase, runs the queued teardown phases, finalises the record as ABORTED and lets the test loop return to the DUT prompt. The station answers with what it did, refusing at the DUT prompt and again while a previous cancel is still tearing down, so the GUI flashes that reply verbatim rather than composing a message of its own.

The endpoint itself lives in hardware-test-framework's station-server patch (generic_station._patched_command_post), paired with this change in halter-corp/hardware-test-framework#2035. A station running an older framework build answers 404 and the button flashes that.

dist/

Rebuilt, as always, because stations serve the prebuilt bundle and have no node. Hashed filenames change with it.

Build and verification

Built with node 16.20.1, which is what webpack 3 and node-sass 7 need:

npm ci --ignore-scripts
npm rebuild node-sass
npm run build

Source change is three files: the button in station.component.html, cancelTest() in station.component.ts, and StationService.cancel() posting the command and flashing the response.

Exercised on the HQ mesh bench against t4-mesh-5ghz-emission: cancel mid-transfer stopped the phase, teardown restored both boards' radio config and Ethernet autonegotiation, the report was recorded ABORTED, and the station returned to the scan prompt. A second click during teardown was refused with the station's own message, and a click at the DUT prompt was refused likewise.

Restarting was the only control the nav bar had, and on a run that holds a
radio for an hour that means killing the process: the plan's teardown never
runs, so a mesh bench is left with both tower boards on the test channel and
at the test power until someone reboots them.

POST /commands/cancel ends the running test instead - openhtf aborts the
phase, runs the queued teardown phases, finalises the record as ABORTED and
lets the test loop come back at the DUT prompt with the process still up. The
station answers with what it did, refusing at the DUT prompt and again while a
previous cancel is still tearing down, so the reply is flashed verbatim rather
than a message of our own. The endpoint itself lives in the framework's
station-server patch, not here.

dist/ is rebuilt because the station serves the prebuilt bundle and its hashed
filenames change with it. Built with node 16.20.1, which is what webpack 3 and
node-sass 7 need: npm ci --ignore-scripts, npm rebuild node-sass, npm run build.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 35934004508

Coverage remained the same at 60.622%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 7743
Covered Lines: 4694
Line Coverage: 60.62%
Coverage Strength: 3.03 hits per line

💛 - Coveralls

@virtualguy
virtualguy merged commit 534f206 into master Sep 23, 2026
9 of 14 checks passed
@virtualguy
virtualguy deleted the feat/cancel-test-button branch September 23, 2026 23:35
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.

2 participants