Files
buzz/desktop/src
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w de96c07acd feat(settings): confirm agent restart when toggling spawn-env experiments
The acpToolSummaries experiment is enforced at agent spawn time
(BUZZ_AGENT_NO_TOOL_SUMMARY in the child env), so flipping the toggle
repaints the UI but leaves running agents on their spawn-time behavior —
the 'enabled but still raw labels' confusion.

Toggling such an experiment now opens a shared AlertDialog. Confirm
applies the toggle, awaits an explicit set_desktop_experiments mirror
write (so respawns read the NEW env, not a racy passive-effect write),
then restarts the local agents that were running at confirmation time.
Cancel leaves the setting unchanged; stopped agents stay stopped.
Partial restart failures surface a failed-agent toast without rolling
the experiment back; a failed mirror write aborts the restart but keeps
the toggle applied (best-effort mirror convention).

Orchestration lives in a pure lib module with node tests covering
toggle→mirror→restart ordering, mirror-failure abort, local-running-only
selection, partial-failure collection, and outcome messaging.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
2026-07-07 14:26:03 -07:00
..