Skip to content

Clear the last run's shutdown notice once Start runs - #1589

Open
davidmckayv wants to merge 1 commit into
mainfrom
fix/clear-shutdown-notice-on-start
Open

davidmckayv wants to merge 1 commit into
mainfrom
fix/clear-shutdown-notice-on-start

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What was wrong

After OpenBot quit while its engine machine was stopped, the next launch showed "That didn't finish: OpenBot had trouble shutting down last time." over the "OpenBot is stopped" card. The card stayed through Start and through every Retry. When that Start stopped as well (the engine was down, "Getting OpenBot ready" failed with "The software OpenBot runs on isn't running. Retry to start it."), the old notice read as the reason this run stopped.

The cause: the setup window keeps what last_failure returned at launch as its recovery failure, and cleared it only when a Start succeeded, on Stop, or on a provider change. A Start that stopped in the local sequence never reached any of those.

The fix

The notice read at launch is about the last run, so it goes as soon as a Start runs. Only that notice is cleared: a failure of the new Start still shows, in its row and in the card, as before.

Tests

  • New UI test the last shutdown's notice goes once Start runs, and a Start that stops says only why: launch with the shutdown notice, press Start with the engine down, then Retry once it answers. Failed before the fix (the notice was still on screen after Start stopped), passes after.
  • bun test desktop/src (416 pass), bun run --cwd desktop typecheck, bun run format:check, bun run lint.
  • Real-product check on the Mac: quit OpenBot with the engine machine stopped, relaunch, Start, and the notice is gone.

After OpenBot quit while its engine machine was stopped, the next launch
showed "That didn't finish: OpenBot had trouble shutting down last time." over
the stopped card, and the card stayed through Start and every Retry. When that
Start stopped too, with the engine down, the old notice read as the reason.

The notice the window reads at launch is about the last run, so it now goes
as soon as a Start runs. A Start that then stops says why in its own row, and
a failure of the new Start is shown as before.

This branch has not been deployed

No deployments
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