Add startup window state preference (#1367)#1538
Open
SukuWc wants to merge 1 commit into
Open
Conversation
Add a "Startup window state" radio in Preferences > General with three options controlling how the window appears when Grid Editor launches: - normal: open in a normal window (default) - taskbar: open minimized to the taskbar/dock - tray: open hidden in the tray (Windows/Linux) / dock (macOS) The window is now created with `show: false` and shown on `ready-to-show`, which also avoids a white flash on normal launch. The single-instance `second-instance` handler now restores + shows + focuses the window on all platforms (previously `show()` was skipped on macOS and only minimized windows were restored), so a minimized/tray start is always recoverable by relaunching. It also guards the deeplink parse so a plain relaunch no longer throws on `new URL()`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit b03a119): https://grid-editor-web--pr1538-feat-startup-window-ywzpla1n.web.app (expires Thu, 23 Jul 2026 13:16:24 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2b65ba6ef19c55d367eaffd04e46bcde25305d6f |
|
Visit the preview URL for this PR (updated for commit b03a119): https://grid-playwright-result--pr1538-feat-startup-window-rvejvegs.web.app (expires Fri, 26 Jun 2026 13:24:56 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0f764ceb264072188bf1a5dee10613d8f10b4ca2 |
Contributor
|
Mac OS ok |
Collaborator
|
Tested on Windows 11:
Tested on Fedora Workstation 44 (GNOME, Wayland):
|
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.
Closes #1367.
What
Adds a Startup window state radio in Preferences → General that controls how the window appears when Grid Editor launches:
minimize()— sits in the taskbar/dockThis addresses the request to start the editor minimized/unobtrusively (useful when it auto-starts with the system). The "if already running, open the window" half was already handled by the single-instance lock and is hardened here.
How
startupWindowState("normal" | "taskbar" | "tray", default"normal") inapp-helper.store.ts, persisted via the existing app-settings machinery.Preferences.svelte: aMeltRadiomatching the adjacent "Run application in background" control.main.ts:show: falseand shown onready-to-show(also removes the white flash on normal launch); the chosen startup state is applied there.second-instancehandler now restores + shows + focuses the window on all platforms (previouslyshow()was skipped on macOS, and only minimized windows were restored), so a minimized/tray start is always recoverable by relaunching. The deeplink parse is guarded so a plain relaunch no longer throws onnew URL().Testing
npm run web-buildpasses.taskbar(minimize) andtray(hide) paths could not be visually verified on the dev machine's tiling window manager (no tray/taskbar/minimize support there). Please confirm on Windows and macOS that those two options land the window minimized/hidden as intended and that it restores correctly.🤖 Generated with Claude Code