Skip to content

Operator fault panel: report spinner + escalate-to-PagerDuty button#22

Merged
PaulSalaun merged 2 commits into
hotfix/webui-no-loading-testfrom
feat/operator-fault-report-escalate
Jul 2, 2026
Merged

Operator fault panel: report spinner + escalate-to-PagerDuty button#22
PaulSalaun merged 2 commits into
hotfix/webui-no-loading-testfrom
feat/operator-fault-report-escalate

Conversation

@PaulSalaun

@PaulSalaun PaulSalaun commented Jun 30, 2026

Copy link
Copy Markdown

Builds on the operator fault panel to give operators two clear, distinct actions on a failed test, with proper in-flight feedback.

Report buttons — spinner + good/fail, no double-fire

Both submit buttons show a spinner, disable while the request is in flight, then a green (sent) / red (error) result so operators get an unambiguous outcome and can't fire repeatedly. State is keyed by a stable code + issue id, not the OutcomeDetail object — the station data is re-polled periodically and makeTest rebuilds those objects, so an object-keyed map lost the state on the next poll (the button visibly reverted). A sent button stays green even while disabled (.operator-fault-report-sent:disabled); only an error re-enables it for a retry.

Two distinct actions

  • Uncaught error (no remediation): grey "Notify Halter" button → /fault-report (relayed to Slack). Informational — flag it so engineering can add a fault code.
  • Known fault, steps didn't help: a distinct red "Report Issue" button, shown below the "What to do" steps, → new /fault-escalate relay. Raises a higher-priority incident (PagerDuty + on-call) rather than a routine report.

Panel hidden on an aborted test

showFaultPanel now also requires the test not be aborted. An abort is a reset (e.g. the station service restarting on a deploy), not a fault, so its residual outcome_details must not surface as an operator action. (HTF drops those details server-side too — see hardware-test-framework#1753.)

station_server

Adds FaultEscalateHandler + set_fault_escalate_handler + the /fault-escalate route, delegating to a framework-injected handler exactly like /fault-report — the GUI server never calls external services itself (returns 501 until a handler is registered).

Build

dist/ rebuilt with Node 16; the served bundle is app.4cad1b230047e7d0f056.js (referenced by dist/index.html).

Companion PRs

  • hardware-test-service: PagerDuty escalation endpoint (/hardware-test/fault-escalate), routed to the "Hardware Test Stations" service.
  • hardware-test-framework#1753: registers the escalate handler, bumps the client to 1.0.39, drops aborted-test details, and pins this submodule.

- The report buttons now show a spinner, disable while in flight, then a
  good/fail result. State is keyed by a stable code+issue id so it survives
  the station's periodic re-polls (an object-keyed map reverted the button).
- A known fault whose remediation steps did not resolve it gets a distinct red
  "Report Issue" button that POSTs to a new /fault-escalate relay (raises a
  PagerDuty incident via hardware-test-service), shown below the hint and kept
  separate from the grey "Notify Halter" report for uncaught errors.
- station_server: add FaultEscalateHandler + set_fault_escalate_handler +
  /fault-escalate route, delegating to an injected handler exactly like
  /fault-report (the GUI never calls external services itself).
- Rebuild dist.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coveralls

coveralls commented Jun 30, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28417492005

Coverage decreased (-0.1%) to 60.607%

Details

  • Coverage decreased (-0.1%) from the base build.
  • Patch coverage: 19 uncovered changes across 1 file (0 of 19 lines covered, 0.0%).
  • 1 coverage regression across 1 file.

Uncovered Changes

File Changed Covered %
openhtf/output/servers/station_server.py 19 0 0.0%

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
openhtf/output/servers/station_server.py 1 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 7740
Covered Lines: 4691
Line Coverage: 60.61%
Coverage Strength: 3.03 hits per line

💛 - Coveralls

An aborted test is a reset (e.g. the station service restarting on a deploy),
not a fault — so its outcome_details must not surface as an operator action.
Gate the panel behind a showFaultPanel getter that excludes ABORTED. Rebuild
dist.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PaulSalaun
PaulSalaun merged commit 82b0c5f into hotfix/webui-no-loading-test Jul 2, 2026
14 checks passed
@PaulSalaun
PaulSalaun deleted the feat/operator-fault-report-escalate branch July 2, 2026 20:59
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