Repository navigation
Frontend tests: follow the desktop quit hiding the window - #15801
Merged
Merged
Conversation
#15723 made the quit cover the backend reap by hiding the main window on every platform instead of emitting the Windows-only app-closing overlay events, and the macOS terminate path now also holds on while a window is on screen. Three frontend tests still read the old main.rs and fail on main. The overlay event tests now check the contract that replaced them: the quit hides the window only when it is on screen, after the confirmations and before the reap, and Rust does not emit app-closing. The macOS transcript test accepts the extra reason to hold on.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Frontend unit testsfails on main (seen as the Windows leg on #15795; reproduces locally on795da3b42a) with three tests that readstudio/src-tauri/src/main.rsand still describe the quit as it was before #15723:#15723 changed the quit on purpose: the cover step now hides the main window on every platform instead of emitting the Windows-only
app-closingoverlay events, a window that was not on screen is left hidden, and the macOS terminate path holds on while a window is on screen (quit_requires_confirmation(app) || main_window_on_screen(app)). Its description notes the frontend overlay (closing-signal.ts,ClosingScreen) is no longer triggered and leaves removing it to a follow-up. The product is right; these three tests were not updated with it.Change
studio/frontend/tests/desktop-closing-overlay.test.ts: the two tests pinned to the removed Rust emitters are replaced by the contract that replaced them:hide_main_window_for_quithides only whenmain_window_on_screen(app)says the window is visible, read viawindow.is_visible();quit_sequence,if !confirm()comes beforehide(), which comes beforereap(); andmain.rsdoes not emitapp-closing, so if the overlay is ever wired back the test says to put it back under test (or remove it).The store-level overlay tests in the same file still pass and still cover
closing-signal.tsuntil the follow-up removes it.studio/frontend/tests/audio-transcript-lifecycle.test.ts: the macOS check now matchesbegin_or_attach_termination(quit_requires_confirmation(app)..., so the terminate path may hold on for more reasons but never fewer; the|| renderer.unsaved_transcriptandconfirm_quit_with_unsaved_transcriptchecks are unchanged.Testing
node --experimental-strip-types --test "tests/**/*.test.ts"): 3 failing on main (the three above), 0 with this change.main.rs, one at a time:let hide = true;) fails "a quit with no window on screen leaves it hidden";|| renderer.unsaved_transcriptfromquit_requires_confirmationfails the macOS transcript test.