toasts and background tasks seem to sometimes steal focus from entry fields #102
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While I was in the comit message field in the git commit, a semantic indexing of the new post happened and a toast with success for that indexing was shown and the focus left the edit field. While focus is inside an edit field, it should never be taken away by background processes and toasts - toasts are meant to be unobstrusive notifications, they can't rip the user out of editing.
Implemented in
08a5bd1. The workspace now always has a stable Stack root, so adding or removing toasts/background overlays no longer replaces the root widget tree and discards focused text-input state. Added a widget-tree regression test that focuses an input, inserts a toast layer, removes it, and verifies focus after both transitions; documented the behavior and added the PassiveOverlayFocusStability Allium invariant. Neutral review confirmed parity with bDS2's LiveToast sibling layout and the issue/spec requirement. Verified with the focused test, full cargo test --workspace, cargo build --workspace, clean Allium check/analyse, a release macOS bundle, and Computer Use confirming the field retained focus and accepted typing during background activity.