BS-PR-707 - Keep editor responsive while native dialogs are open #52

Closed
opened 2026-07-12 17:45:00 -04:00 by Rbanh · 2 comments
Owner

Summary

Native file/folder dialogs previously executed synchronously from the Bevy/egui main thread. Under Hyprland this could trigger an “Application Not Responding” prompt while the picker was open.

Scope

  • Add a shared non-blocking native-dialog broker with typed completions and one active request.
  • Convert editor and project-launcher file/folder pickers without moving project mutations off the main thread.
  • Preserve validation, collaborative revision guards, cancel behavior, and status feedback.
  • Route native dirty-scene confirmations through the same non-blocking broker and conservatively pause transitions until saves complete.

Acceptance criteria

  • Blacksite continues rendering/responding while native file, folder, and Save As dialogs are open.
  • Every existing picker workflow uses the shared non-blocking path.
  • Cancel and duplicate-request behavior is deterministic and non-mutating.
  • Result application retains the exact initiating workflow and existing path validation.
  • Focused lifecycle tests and live Hyprland acceptance pass.

Plan: .cursor/plans/non_blocking_native_dialogs_2026-07-12.plan.md

## Summary Native file/folder dialogs previously executed synchronously from the Bevy/egui main thread. Under Hyprland this could trigger an “Application Not Responding” prompt while the picker was open. ## Scope - Add a shared non-blocking native-dialog broker with typed completions and one active request. - Convert editor and project-launcher file/folder pickers without moving project mutations off the main thread. - Preserve validation, collaborative revision guards, cancel behavior, and status feedback. - Route native dirty-scene confirmations through the same non-blocking broker and conservatively pause transitions until saves complete. ## Acceptance criteria - [x] Blacksite continues rendering/responding while native file, folder, and Save As dialogs are open. - [x] Every existing picker workflow uses the shared non-blocking path. - [x] Cancel and duplicate-request behavior is deterministic and non-mutating. - [x] Result application retains the exact initiating workflow and existing path validation. - [x] Focused lifecycle tests and live Hyprland acceptance pass. Plan: `.cursor/plans/non_blocking_native_dialogs_2026-07-12.plan.md`
Rbanh added this to the M7 - Content production and shipping milestone 2026-07-12 17:45:00 -04:00
Author
Owner

Checkpoint d038cf3 is pushed on codex/non-blocking-native-dialogs.

Completed:

  • shared one-at-a-time native-dialog broker;
  • worker-thread dialog wait with one-shot main-thread completion;
  • focused exclusivity/delivery test;
  • collaborative conflict Save As migration;
  • project-browser existing-project and sandbox-folder migration;
  • duplicate launcher actions disabled while a dialog is active.

Verification:

  • focused broker test passes;
  • cargo check -p editor --all-targets passes;
  • git diff --check passes.

This ticket remains open. Scene open/save-as, import/export, prefab, composition, recovery, and blocking dirty-confirmation paths still require migration before live Hyprland acceptance.

Checkpoint `d038cf3` is pushed on `codex/non-blocking-native-dialogs`. Completed: - shared one-at-a-time native-dialog broker; - worker-thread dialog wait with one-shot main-thread completion; - focused exclusivity/delivery test; - collaborative conflict Save As migration; - project-browser existing-project and sandbox-folder migration; - duplicate launcher actions disabled while a dialog is active. Verification: - focused broker test passes; - `cargo check -p editor --all-targets` passes; - `git diff --check` passes. This ticket remains open. Scene open/save-as, import/export, prefab, composition, recovery, and blocking dirty-confirmation paths still require migration before live Hyprland acceptance.
Rbanh closed this issue 2026-07-12 18:07:40 -04:00
Author
Owner

Acceptance complete

Implementation: d038cf3, ba59f57

Completed:

  • migrated every scene, asset import/export, prefab, composition, collaboration, Project Browser, and dirty-confirmation native dialog to the shared broker;
  • kept all ECS, history, registry, project, and collaborative revision work on the main thread;
  • added one-dialog exclusivity, explicit cancellation, current-state validation, and stale initiating-entity rejection;
  • documented the architecture in ADR 0038 and the editor workflow guide.

Live native-Wayland acceptance launched the real KDE portal Open dialog through SceneIoRequest::Open, held it open for 12 seconds, and confirmed Hyprland continued to report Blacksite as mapped, visible, input-capable, and native Wayland with no application-not-responding client. Escape canceled without changing the active scene.

Responsive native Open dialog

Verification:

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • 2 focused broker lifecycle/frame-progress tests
  • strict editor all-target Clippy
  • git diff --check

Packaged acceptance remains deferred by project-owner direction.

## Acceptance complete Implementation: `d038cf3`, `ba59f57` Completed: - migrated every scene, asset import/export, prefab, composition, collaboration, Project Browser, and dirty-confirmation native dialog to the shared broker; - kept all ECS, history, registry, project, and collaborative revision work on the main thread; - added one-dialog exclusivity, explicit cancellation, current-state validation, and stale initiating-entity rejection; - documented the architecture in ADR 0038 and the editor workflow guide. Live native-Wayland acceptance launched the real KDE portal Open dialog through `SceneIoRequest::Open`, held it open for 12 seconds, and confirmed Hyprland continued to report Blacksite as mapped, visible, input-capable, and native Wayland with no application-not-responding client. Escape canceled without changing the active scene. ![Responsive native Open dialog](https://git.spacetrainclubhouse.com/attachments/d3c86c27-3335-48aa-97c7-35269887ea0d) Verification: - `cargo fmt --all -- --check` - `cargo check --workspace --all-targets` - `cargo clippy --workspace --all-targets -- -D warnings` - `cargo test --workspace` - 2 focused broker lifecycle/frame-progress tests - strict editor all-target Clippy - `git diff --check` Packaged acceptance remains deferred by project-owner direction.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Falling-Metal-Interactive/Blacksite#52
No description provided.