Skip to content

Activity: a change that failed, or whose end is unknown, says so - #2854

Closed
davidmckayv wants to merge 2 commits into
mainfrom
david/g1f-trail-outcome
Closed

davidmckayv wants to merge 2 commits into
mainfrom
david/g1f-trail-outcome

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What

A change's activity row can now say how it came out when it did not simply happen:

  • outcome: "failed" with error: the change was tried and did not happen (a stop the computer never answered).
  • outcome: "unknown" with error: OpenBot started the change and could not confirm how it ended.

Activity drew those rows by their type alone, so a stop that never stopped read "A person pressed stop" in the colour of a change that went through. Such a row now reads Did not happen or Outcome unknown, in the colour of a change that did not happen, with the reason under it. Every other row is drawn as before. The CSV export already carries the payload, so it shows the outcome and the reason unchanged.

changeOutcomeOf in app/src/lib/audit/outcome.ts is the one place that reads it; outcomeOf and the Decision cell both use it.

Why

Part of "nothing leaves no trace": a change and its row both happen, or neither, and a change that fails is recorded as failed instead of leaving nothing. The server writes these outcomes under the change's own event type, so no new event type is added.

Tests

  • app/tests/audit-change-outcome-rows.test.tsx: the rows as the page draws them. Fails before this change (the failed stop read "A person pressed stop", outcomeOf said "allowed"), passes after.
  • app/tests/audit-change-outcome-layout.test.tsx: the same page in real Chromium and WebKit, light and dark, 1440px and 390px. No sideways scroll; the two rows are drawn in the did-not-happen colour, the stop that went through in the muted one. Added to the CI browser list.

Screenshots (from OPENBOT_APP_SHOTS): light 1440px shows the failed stop and unknown reset in amber with their reasons under them; dark 390px stacks the decision under What with nothing clipped.

The Did not happen view finds them too

A failed change keeps its own event type, so a view that asks by type never showed one. The audit-events list and export take a new optional changeOutcome query parameter (failed, unknown, or both): with eventType, an event matches either; every other filter still applies; leaving it out changes nothing (api/openapi/audit-events.yaml, clients regenerated). The Did not happen view and the Did not happen outcome chip now ask for changeOutcome=failed,unknown alongside their types. Test: audit-change-outcome-rows.test.tsx checks the view and the chip ask for it and Blocked does not; it fails before this change.

Changelog

Activity.

  • A change that failed, or one OpenBot started and could not confirm the end of (a stop that did not stop, a reset that did not finish), reads "Did not happen" or "Outcome unknown" with the reason under it, instead of reading as done, and the Did not happen view lists it.

API.

  • GET .../audit-events and GET .../audit-events/export take an optional changeOutcome (failed, unknown): also the events whose change did not simply happen, whatever their type.

A change's row now says how it came out when it did not simply happen:
`outcome: "failed"` with why, or `outcome: "unknown"` when OpenBot started
it and could not confirm how it ended. Activity drew those rows by their
type alone, so a stop that never stopped read "A person pressed stop" in the
colour of a change that went through.

Such a row now reads "Did not happen" or "Outcome unknown", in the colour of
a change that did not happen, with the reason under it. Rows that went
through are drawn as before. The CSV export already carries the payload.

Tests: the rows as the page draws them, and the same page in Chromium and
WebKit, light and dark, wide and on a phone.
A change that failed keeps its own event type (a stop that did not stop
is still computer.stopped, with outcome failed), so the Did not happen
view, which asks by type, never showed it.

The audit-events list and export take a new optional changeOutcome
parameter: failed, unknown, or both. With eventType, an event matches
either; every other filter still applies, and leaving it out changes
nothing. The Did not happen view and the Did not happen outcome chip ask
for failed,unknown as well as their types.

Test: the view and the chip ask the server for both, and Blocked does not.
@davidmckayv

Copy link
Copy Markdown
Contributor Author

Landed in #2869, which fused every G1 slice.

@davidmckayv davidmckayv closed this Dec 3, 2026
@davidmckayv
davidmckayv deleted the david/g1f-trail-outcome branch December 3, 2026 17:23
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