feat(state-machine): auto-clear confirmAbandon after 60s
If a customer walks away from the abandon confirmation screen, the machine now returns to idle after 60 seconds instead of hanging indefinitely. Cash stays in the cashbox as operator funds. Closes #31 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bebe987b60
commit
44f8f803ae
1 changed files with 5 additions and 1 deletions
|
|
@ -507,7 +507,11 @@ export function createATMMachine(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
confirmAbandon: {
|
confirmAbandon: {
|
||||||
// Warning: cash is in the machine, abandoning forfeits it
|
// Warning: cash is in the machine, abandoning forfeits it.
|
||||||
|
// Auto-clear after 60s so the machine self-recovers if customer walked away.
|
||||||
|
after: {
|
||||||
|
60000: '#atm.idle',
|
||||||
|
},
|
||||||
on: {
|
on: {
|
||||||
CANCEL: '#atm.idle', // User confirms they want to leave
|
CANCEL: '#atm.idle', // User confirms they want to leave
|
||||||
RETRY: 'generatingNdebit', // Go back and try again
|
RETRY: 'generatingNdebit', // Go back and try again
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue