mind: double-buffer MindState for UI diffing

UI event loop clones MindState on each render tick, diffs against
the previous copy, and generates status updates from changes. Mind
no longer sends UiMessage::StatusUpdate — state changes are detected
automatically by the UI.

Removes update_status from both Mind and event_loop. DMN state
changes, turn tracking, scoring status all flow through the diff.

Zero UiMessage sends from Mind's run loop for state changes.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 03:24:08 -04:00
parent 54cd3783eb
commit 07ca136c14
3 changed files with 24 additions and 33 deletions

View file

@ -22,7 +22,7 @@ use std::path::PathBuf;
use std::time::{Duration, Instant};
/// DMN state machine.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum State {
/// Responding to user input. Short interval — stay engaged.
Engaged,