The checkout app restarts itself after a rebuild

“Obeya (checkout)” rebuilds its window shell when app/ changes on main. Now the new build also starts when the Obeya it shows was started from a terminal, and that Obeya keeps running.

Before

With bun start in a terminal, the new build was installed, but the old window kept running until you quit the app and opened it again. Meanwhile it ran from a replaced bundle, which is how the microphone got lost.

Now

The window restarts by itself, at a moment a restart for new code would also pick: not while you dictate or watch a demo video, and only when the window is in front with you in it, or closed. It comes back at the same place, with the card you had open and your unsent text.

Live test on this Mac

A separate test build of the app (its own name and data, so your app and your Obeya were not touched), shown on a scratch Obeya started from the terminal, with one card open and a sentence typed but not sent.

  1. 19:38
    Scratch Obeya started from the terminal (server process 24960).
  2. 19:42 – 19:52
    First run: the screen was locked, so the window was not in front. The new build was installed, and the app waited instead of restarting.
  3. 20:01
    Second run, with the test build's check for the right moment switched off, so the run did not depend on where the window was: test build b010baa open, card “Invoices as PDF” open, text “Half a sentence I had not sent yet” typed, window at 920, 270, 1440 × 900.
  4. 20:03
    app/ changed in the test checkout. The app rebuilt itself in the background in about two minutes.
  5. 20:05
    The old window closed and new build 956cd86 opened on its own.
After the restartResult
Build the window runsthe new one (956cd86)
Obeya started from the terminalstill the same process, never stopped
Window position and sizeunchanged: 920, 270, 1440 × 900
Open card“Invoices as PDF”, still open
Unsent text in the card“Half a sentence I had not sent yet”, kept

Not tried live: Windows and Linux, the case where the window was closed (hidden in the Dock), and the microphone right after such a restart (it would have needed a permission prompt on your screen). On a Mac the new window is opened the way the Dock opens apps, so it gets its own microphone permission.