Skip to content

handle second-instance events (auto-generated new window action on gnome)#2998

Merged
sawka merged 1 commit intomainfrom
sawka/handle-second-instance
Mar 6, 2026
Merged

handle second-instance events (auto-generated new window action on gnome)#2998
sawka merged 1 commit intomainfrom
sawka/handle-second-instance

Conversation

@sawka
Copy link
Member

@sawka sawka commented Mar 6, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 003fc764-5a87-45f0-bb26-253729e1bee3

📥 Commits

Reviewing files that changed from the base of the PR and between aefd4da and 52749de.

📒 Files selected for processing (1)
  • emain/emain.ts

Walkthrough

The change adds event handling for when a second instance of the application is launched. Upon detecting a second-instance event, the code logs the process arguments and working directory, then asynchronously triggers the creation of a new wave window using the fireAndForget utility. This enables the application to respond to multi-instance startup attempts by opening a new window rather than terminating the new instance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the purpose and context of handling second-instance events and why this change is needed.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding handling for second-instance events to auto-generate new window actions on GNOME, which matches the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawka/handle-second-instance

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 and usage tips.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 6, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • emain/emain.ts - No issues

The changes implement handling for Electron's second-instance event, which fires when a user attempts to launch a second instance of the application (e.g., clicking the app icon in GNOME's dock). The implementation:

  1. Registers a handler for the second-instance event after acquiring the single-instance lock
  2. Uses fireAndForget(createNewWaveWindow) to create a new window when a second instance is detected
  3. Follows existing patterns already used in the codebase (e.g., the activate event handler at line 428-432)

The code is clean and follows the established patterns in the Wave Terminal codebase.

@sawka sawka merged commit 06bac33 into main Mar 6, 2026
7 checks passed
@sawka sawka deleted the sawka/handle-second-instance branch March 6, 2026 18:06
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.

1 participant