when closing the last window, close the app. #101

Closed
opened 2026-07-22 18:32:32 +00:00 by hugo · 2 comments
Owner

closing the last window currently lets the app stay open, but since this is a single-window app, that is a bad state and can't be productively used, so just close the app when the last window is closed.

closing the last window currently lets the app stay open, but since this is a single-window app, that is a bad state and can't be productively used, so just close the app when the last window is closed.
hugo added the bug label 2026-07-22 18:32:32 +00:00
Author
Owner

Implemented in fa0a510. RuDS now owns the native close request, persists the current project UI session, exits the Iced runtime explicitly, and flushes the embedding index through the existing drop path. Added the lifecycle behavior to layout.allium and documented the single-window behavior in README.md. Verified with the focused regression test, allium check/analyse, cargo test --workspace, cargo build --workspace, a release macOS bundle, and a Computer Use test confirming the bundled app is no longer running after its native close button is clicked.

Implemented in fa0a510. RuDS now owns the native close request, persists the current project UI session, exits the Iced runtime explicitly, and flushes the embedding index through the existing drop path. Added the lifecycle behavior to layout.allium and documented the single-window behavior in README.md. Verified with the focused regression test, allium check/analyse, cargo test --workspace, cargo build --workspace, a release macOS bundle, and a Computer Use test confirming the bundled app is no longer running after its native close button is clicked.
hugo closed this issue 2026-07-23 07:03:47 +00:00
hugo reopened this issue 2026-07-23 07:15:48 +00:00
Author
Owner

Correction after stress testing: commit a01c86e replaces fa0a510. Closing during an active embedding reindex exposed a Tokio shutdown wait on native model inference. The final implementation now persists the project UI session, flushes cached embedding indexes explicitly, and terminates the process without dropping the executor, matching bDS2's persist-then-hard-terminate behavior. Verified in isolation with the regression test, full cargo test --workspace, cargo build --workspace, clean Allium check/analyse, a release app bundle, and a Computer Use stress test that started embedding reindexing and immediately closed the only window; the repository app process exited and did not beachball.

Correction after stress testing: commit a01c86e replaces fa0a510. Closing during an active embedding reindex exposed a Tokio shutdown wait on native model inference. The final implementation now persists the project UI session, flushes cached embedding indexes explicitly, and terminates the process without dropping the executor, matching bDS2's persist-then-hard-terminate behavior. Verified in isolation with the regression test, full cargo test --workspace, cargo build --workspace, clean Allium check/analyse, a release app bundle, and a Computer Use stress test that started embedding reindexing and immediately closed the only window; the repository app process exited and did not beachball.
hugo closed this issue 2026-07-23 07:22:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hugo/RuDS#101