Context
tend turns existing websites into a conversational AI interface—users manage their site by chatting on WhatsApp. A user might say "make the header blue", then "actually, green", then "add my phone number to the footer", then "undo that". The conversation can branch, loop, and users can change their mind mid-flow.
Your Task
Design a state machine (or alternative architecture) that handles this conversational website editing. Include: how you'd represent state, handle undo/redo, manage concurrent edits, and recover from errors. Pseudocode or diagrams welcome. Use AI to help you think through edge cases.