Skip to content

feat(main): confirm quit while on air - #79

Merged
Roboroads merged 3 commits into
mainfrom
fix-58-confirm-quit-on-air
Jul 2, 2026
Merged

feat(main): confirm quit while on air#79
Roboroads merged 3 commits into
mainfrom
fix-58-confirm-quit-on-air

Conversation

@Roboroads

@Roboroads Roboroads commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #58.

Closing the window while an encoder is streaming now shows a native "You are on air — quit anyway?" confirm dialog (default = Cancel). Quitting while off air stays instant. Adds isAnyEncoderStreaming() to the encoder manager with unit tests.

Summary by CodeRabbit

  • New Features

    • Added a safety prompt when closing the app while a stream is active.
    • Users can now choose to quit anyway or cancel and keep the app open.
  • Bug Fixes

    • Improved close behavior so active streaming sessions are less likely to be interrupted accidentally.

Signed-off-by: Robbin "Roboroads" Schepers <robbin@deschepers.nl>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 74d9a342-cce8-4fe5-b30b-c4bb5397ac8c

📥 Commits

Reviewing files that changed from the base of the PR and between 627cd40 and 18d356e.

📒 Files selected for processing (3)
  • packages/streamline/src/encoders/manager.spec.ts
  • packages/streamline/src/encoders/manager.ts
  • packages/streamline/src/main.ts

📝 Walkthrough

Walkthrough

Added an exported isAnyEncoderStreaming() function to the encoder manager that checks if any active encoder process has a streaming status. Wired this helper into main.ts via a mainWindow close handler that shows a confirmation dialog before quitting while streaming. Added corresponding unit tests.

Changes

Confirm quit while on air

Layer / File(s) Summary
Streaming status helper and tests
packages/streamline/src/encoders/manager.ts, packages/streamline/src/encoders/manager.spec.ts
Adds isAnyEncoderStreaming() which scans the processes map for a streaming status, and adds tests for no-encoder, streaming, and non-streaming cases.
Window close confirmation dialog
packages/streamline/src/main.ts
Adds a mainWindow close handler that prevents default close, checks isAnyEncoderStreaming(), shows a synchronous confirmation dialog, and destroys the window only if the user chooses to quit.

Estimated code review effort: 2 (Simple) | ~10 minutes

Related issues: Closes #58 (confirm quit while at least one encoder is streaming, with instant quit when off air).

Suggested reviewers: N/A

🐰 A quiet click to close the tray,
but if we're live, we pause and say —
"Still on air, are you sure?"
Quit or cancel, the choice is yours,
then off we hop, the stream secure.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The close-confirm flow matches the behavior, but the dialog text differs from the required “You are on air — quit anyway?” copy. Update the confirmation dialog message to exactly “You are on air — quit anyway?” and keep off-air closes immediate.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly describes the main change: confirming quit while the app is on air.
Out of Scope Changes check ✅ Passed The changes stay focused on quit confirmation, encoder streaming detection, and tests, with no unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Roboroads

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Roboroads
Roboroads marked this pull request as ready for review July 2, 2026 10:25
@Roboroads
Roboroads enabled auto-merge (squash) July 2, 2026 10:27
@Roboroads
Roboroads disabled auto-merge July 2, 2026 10:37
@Roboroads
Roboroads merged commit 4465f66 into main Jul 2, 2026
9 checks passed
@Roboroads
Roboroads deleted the fix-58-confirm-quit-on-air branch July 2, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confirm quit while on air

1 participant