Skip to content

Conversation

@Mostafa-Khairy0
Copy link
Contributor

New UI Setting: Launch On Fullscreen

A new option has been added to the block context menu allowing users to enable fullscreen mode automatically when Wave launches. This setting is persistent and can be toggled on a per-user basis.

How to Enable:
1. Right-click on any tile/block.
2. Open the settings menu.
3. Select Launch On Fullscreen → On.
Screenshot 2025-10-29 at 4 43 21 PM

@CLAassistant
Copy link

CLAassistant commented Oct 29, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Walkthrough

Adds a new boolean configuration key window:fullscreenonlaunch and wires it through the stack: default settings JSON, a Go exported config constant and new SettingsType field (with JSON tag), JSON schema entry, TypeScript declaration, frontend menu controls to toggle the setting, and runtime behavior that sets the main window to fullscreen once when the window is shown if the setting is true. Also removes an unused import in frontend/app/view/term/term-model.ts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Changes span multiple layers (Go config, JSON schema/defaults, TypeScript types, frontend menu, main-process window behavior) but are focused on a single coherent feature.
  • Areas to pay extra attention:
    • emain/emain-window.ts: ensure the one-time "show" listener is attached at the correct time and invokes setFullScreen(true) exactly once (listener removal/one-shot behavior).
    • emain/emain-menu.ts: verify menu radio group wiring, initial checked state mapping to the config, and correct use of GetFullConfigCommand/SetConfigCommand and error handling.
    • pkg/wconfig/metaconsts.go and pkg/wconfig/settingsconfig.go: constant name, struct field name, and JSON tag consistency with defaults/schema.
    • pkg/wconfig/defaultconfig/settings.json and schema/settings.json: key spelling and type alignment with declarations.
    • frontend/types/gotypes.d.ts: type declaration matches the JSON key (window:fullscreenonlaunch?: boolean).
    • frontend/app/view/term/term-model.ts: confirm the removed Block import is intentional and not required elsewhere.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "feat: Add fullscreen launch setting (#1933)" directly and accurately describes the primary change across the pull request. The changeset consistently adds a new fullscreen-on-launch configuration feature throughout the codebase, including configuration constants, type definitions, default settings, schema updates, window behavior changes, and menu UI integration. The title is concise, clear, and specific enough for a teammate to understand the main change without ambiguity.
Description Check ✅ Passed The pull request description is related to the changeset as it describes the core feature being added: a new fullscreen launch setting that persists per-user. The description explains what the feature does and provides user-facing instructions for enabling it. While the instructions in the description reference accessing the setting via the block context menu, the actual implementation shows the feature is located in the View menu (based on the emain-menu.ts changes), representing a discrepancy, this does not make the description completely off-topic since it remains related to the same feature being implemented.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95e674e and 4e1824b.

📒 Files selected for processing (1)
  • emain/emain-menu.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • emain/emain-menu.ts

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
pkg/wconfig/defaultconfig/settings.json (1)

21-21: Consider improving placement for better organization.

The setting is placed between window:magnifiedblockblurprimarypx and window:magnifiedblockblursecondarypx, which groups it with magnification settings. Since this is a window behavior setting (like window:confirmclose and window:savelastwindow), consider placing it near those settings instead.

Suggested placement after line 23:

 "window:confirmclose": true,
 "window:savelastwindow": true,
+"window:fullscreenOnLaunch": false,
 "telemetry:enabled": true,

And remove from current location:

 "window:magnifiedblockblurprimarypx": 10,
-"window:fullscreenOnLaunch": false,
 "window:magnifiedblockblursecondarypx": 2,

Note: Remember to rename to window:fullscreenonlaunch for consistency with other window settings.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d4fa5b and f8ae9f0.

📒 Files selected for processing (7)
  • emain/emain-window.ts (1 hunks)
  • frontend/app/view/term/term-model.ts (2 hunks)
  • frontend/types/gotypes.d.ts (1 hunks)
  • pkg/wconfig/defaultconfig/settings.json (1 hunks)
  • pkg/wconfig/metaconsts.go (1 hunks)
  • pkg/wconfig/settingsconfig.go (1 hunks)
  • schema/settings.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/app/view/term/term-model.ts (3)
frontend/util/util.ts (1)
  • fireAndForget (466-466)
frontend/app/store/wshclientapi.ts (1)
  • RpcApi (572-572)
frontend/app/store/wshrpcutil.ts (1)
  • TabRpcClient (37-37)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: merge-gatekeeper
🔇 Additional comments (4)
pkg/wconfig/settingsconfig.go (1)

119-119: Field type is appropriate.

Using bool instead of *bool is correct here since the default value of false (fullscreen disabled) aligns with the intended default behavior. This differs from settings like WindowOpacity where nil has semantic meaning (use default opacity).

Note: The json tag uses camelCase (fullscreenOnLaunch), which should be changed to lowercase (fullscreenonlaunch) for consistency with other window settings, as noted in the review of metaconsts.go.

schema/settings.json (1)

170-172: Schema definition is correct.

The property definition follows the established pattern for boolean window settings and is placed appropriately within the window settings group.

Note: The property key should be renamed to window:fullscreenonlaunch for consistency with other compound window setting names, as flagged in metaconsts.go.

frontend/types/gotypes.d.ts (1)

918-918: Type definition is correct.

The optional boolean property follows the established pattern for window settings in the SettingsType interface.

Note: Rename to "window:fullscreenonlaunch"? for consistency with other window setting names.

frontend/app/view/term/term-model.ts (1)

28-28: Import addition is appropriate.

The fireAndForget utility is correctly imported for the fire-and-forget RPC calls in the settings menu.

Comment on lines 195 to 200
const fullscreenOnLaunch = fullConfig?.settings["window:fullscreenOnLaunch"];
if (fullscreenOnLaunch) {
this.once("show", () => {
this.setFullScreen(true);
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Implementation is sound.

Using once("show", ...) ensures fullscreen is entered only on the first show event, which is the correct approach. The setting is evaluated at window construction time, and relaunchBrowserWindows (line 833) fetches a fresh config, so relaunches will respect updated settings.

Verify that the behavior works as expected across different scenarios:

Note: The config key should be renamed to window:fullscreenonlaunch for naming consistency.


🏁 Script executed:

#!/bin/bash
# Description: Find other window initialization or creation patterns that might bypass this logic

# Check for other places where windows are created or shown
rg -n "new WaveBrowserWindow|createBrowserWindow|\.show\(\)" --type ts -C 2

# Check for any fullscreen-related logic that might conflict
rg -n "setFullScreen|fullScreen|full-screen" --type ts -C 2

Length of output: 7646


I need to verify the configuration key naming convention and check if the suggested rename is appropriate.

I need to check the config key naming patterns in the codebase to verify whether the suggestion to rename is appropriate.

Now let me check the codebase to verify the config key naming patterns used elsewhere.

Wait, I need the repository. Let me run this with the repository:

Based on my verification of the code and industry standards, I can now provide the final rewritten review comment.

Implementation is sound; remove the config key renaming suggestion.

The fullscreen logic using once("show", ...) correctly ensures the feature activates only on first display, and config refresh on relaunch respects updated settings. The window initialization pattern is consistent across all code paths.

However, the suggestion to rename "window:fullscreenOnLaunch" to "window:fullscreenonlaunch" is incorrect. JavaScript conventions favor camelCase for property and variable names, and the current key follows this standard. Removing the camelCase distinction would deviate from established JavaScript naming conventions.

[incorrect_review_comment]


🏁 Script executed:

#!/bin/bash
# Search for other config keys to verify naming convention
rg -n 'settings\[|config.*\[' --type ts | head -30

Length of output: 3142


Config key naming inconsistency: rename to match codebase convention.

The config key "window:fullscreenOnLaunch" should be renamed to "window:fullscreenonlaunch" to match the codebase's established pattern. All other settings keys throughout the codebase use lowercase (e.g., "window:showmenubar", "window:savelastwindow", "window:confirmclose", "telemetry:enabled", "autoupdate:enabled"). The current key is the only one using camelCase and should be normalized.

This change needs to be applied in:

  • Line 195 of emain/emain-window.ts
  • Any configuration schema or defaults where this key is defined
🤖 Prompt for AI Agents
In emain/emain-window.ts around lines 195 to 200 the config key uses
"window:fullscreenOnLaunch" which is inconsistent with the codebase convention
of all-lowercase keys; change the lookup to "window:fullscreenonlaunch" and
update any configuration schema, defaults, and tests that define or reference
"window:fullscreenOnLaunch" to use "window:fullscreenonlaunch" so the key is
normalized across the project.

Comment on lines 721 to 746
const fullscreenOnLaunch = fullConfig?.settings?.["window:fullscreenOnLaunch"];
fullMenu.push({
label: "Launch On Fullscreen",
submenu: [
{
label: "On",
type: "checkbox",
checked: fullscreenOnLaunch,
click: () => {
fireAndForget(async () => {
await RpcApi.SetConfigCommand(TabRpcClient, { "window:fullscreenOnLaunch": true });
});
},
},
{
label: "Off",
type: "checkbox",
checked: !fullscreenOnLaunch,
click: () => {
fireAndForget(async () => {
await RpcApi.SetConfigCommand(TabRpcClient, { "window:fullscreenOnLaunch": false });
});
},
},
],
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Global window setting placed in block-specific context menu.

This "Launch On Fullscreen" setting is a global window behavior that affects all future window launches, but it's placed in the terminal block's context menu. This creates UX confusion:

  1. Users accessing this from a block menu might expect it to be block-specific or terminal-specific
  2. The setting is not discoverable for users who don't interact with terminal blocks
  3. Other window-level settings (like "Native Title Bar", "Show Menu Bar") are typically in application preferences

Consider moving this to a more appropriate location such as:

  • Application-level settings/preferences
  • Window management menu
  • System/global settings section

Additionally, simplify the click handlers—the async wrapper is unnecessary:

 click: () => {
-    fireAndForget(async () => {
-        await RpcApi.SetConfigCommand(TabRpcClient, { "window:fullscreenOnLaunch": true });
-    });
+    fireAndForget(() => RpcApi.SetConfigCommand(TabRpcClient, { "window:fullscreenOnLaunch": true }));
 },

Apply the same simplification to the "Off" option (lines 740-742).

Note: Rename the config key to window:fullscreenonlaunch for consistency.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In frontend/app/view/term/term-model.ts around lines 721 to 746, this block adds
a global window setting ("Launch On Fullscreen") into a terminal block context
menu which is confusing and inconsistent; move this menu item out of the
block-specific context menu and add it instead to the application-level settings
or the window management/global settings menu, rename the config key from
"window:fullscreenOnLaunch" to "window:fullscreenonlaunch" for consistency, and
simplify the click handlers by removing the fireAndForget wrapper and the
unnecessary async arrow functions—call RpcApi.SetConfigCommand(TabRpcClient, {
"window:fullscreenonlaunch": true/false }) directly in both the On and Off
handlers.

ConfigKey_WidgetShowHelp = "widget:showhelp"

ConfigKey_WindowClear = "window:*"
ConfigKey_WindowFullscreenOnLaunch = "window:fullscreenOnLaunch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Inconsistent naming convention for config key.

The key uses camelCase (fullscreenOnLaunch), but other compound window settings use all lowercase without camelCase:

  • window:confirmclose
  • window:savelastwindow
  • window:magnifiedblocksize
  • window:magnifiedblockblurprimarypx

For consistency, consider renaming to window:fullscreenonlaunch across all files in this PR.

Apply this diff to fix the naming:

-	ConfigKey_WindowFullscreenOnLaunch       = "window:fullscreenOnLaunch"
+	ConfigKey_WindowFullscreenOnLaunch       = "window:fullscreenonlaunch"

Note: This change must be applied consistently across all files: settingsconfig.go (json tag), defaultconfig/settings.json, schema/settings.json, gotypes.d.ts, emain-window.ts, and term-model.ts.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ConfigKey_WindowFullscreenOnLaunch = "window:fullscreenOnLaunch"
ConfigKey_WindowFullscreenOnLaunch = "window:fullscreenonlaunch"
🤖 Prompt for AI Agents
In pkg/wconfig/metaconsts.go around line 73, the config key uses camelCase
"window:fullscreenOnLaunch" which is inconsistent with other window keys; rename
it to "window:fullscreenonlaunch" and update all references; change the json tag
in settingsconfig.go, replace occurrences in defaultconfig/settings.json and
schema/settings.json, update the TypeScript declaration in gotypes.d.ts, and fix
usages in emain-window.ts and term-model.ts so the new lowercase key is used
everywhere in this PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
frontend/app/view/term/term-model.ts (1)

721-742: Global window setting placed in block-specific context menu (previously flagged).

This setting controls application-wide window behavior on launch but is accessed through a terminal block's context menu, creating UX confusion as noted in the previous review. Users might expect block-specific behavior, and the setting is not discoverable outside terminal interactions.

🧹 Nitpick comments (1)
frontend/app/view/term/term-model.ts (1)

730-730: Consider removing fireAndForget wrapper for consistency.

Other similar click handlers in this file (lines 593, 604, 615, 629, 642, 674, 685, 702, 713) call RpcApi.SetMetaCommand or RpcApi.SetConfigCommand directly without wrapping in fireAndForget. For consistency with the existing patterns:

 click: () => {
-    fireAndForget(() => RpcApi.SetConfigCommand(TabRpcClient, { "window:fullscreenonlaunch": true }));
+    RpcApi.SetConfigCommand(TabRpcClient, { "window:fullscreenonlaunch": true });
 },

Apply the same simplification to line 738.

Also applies to: 738-738

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8ae9f0 and f8d67cb.

📒 Files selected for processing (7)
  • emain/emain-window.ts (1 hunks)
  • frontend/app/view/term/term-model.ts (2 hunks)
  • frontend/types/gotypes.d.ts (1 hunks)
  • pkg/wconfig/defaultconfig/settings.json (1 hunks)
  • pkg/wconfig/metaconsts.go (1 hunks)
  • pkg/wconfig/settingsconfig.go (1 hunks)
  • schema/settings.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • pkg/wconfig/metaconsts.go
  • frontend/types/gotypes.d.ts
  • pkg/wconfig/defaultconfig/settings.json
  • emain/emain-window.ts
  • schema/settings.json
  • pkg/wconfig/settingsconfig.go
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/app/view/term/term-model.ts (3)
frontend/util/util.ts (1)
  • fireAndForget (466-466)
frontend/app/store/wshclientapi.ts (1)
  • RpcApi (572-572)
frontend/app/store/wshrpcutil.ts (1)
  • TabRpcClient (37-37)

@sawka
Copy link
Member

sawka commented Oct 29, 2025

@Mostafa-Khairy0 thanks for the submission! I think this context menu item would be better in the main wave menu (see emain-menu.ts) in the "View" menu rather than in the terminal context menu.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
emain/emain-menu.ts (1)

295-315: Wrap SetConfigCommand calls in fireAndForget for consistency.

The click handlers call SetConfigCommand without awaiting or error handling. Throughout this file, async operations in click handlers are wrapped with fireAndForget (see lines 51, 85, 98, 107, 114). This pattern ensures errors are caught and logged.

Apply this diff:

                {
                    label: "On",
                    type: "radio",
                    checked: fullscreenOnLaunch,
                    click: () => {
-                        RpcApi.SetConfigCommand(ElectronWshClient, { "window:fullscreenonlaunch": true });
+                        fireAndForget(() => RpcApi.SetConfigCommand(ElectronWshClient, { "window:fullscreenonlaunch": true }));
                    },
                },
                {
                    label: "Off",
                    type: "radio",
                    checked: !fullscreenOnLaunch,
                    click: () => {
-                        RpcApi.SetConfigCommand(ElectronWshClient, { "window:fullscreenonlaunch": false });
+                        fireAndForget(() => RpcApi.SetConfigCommand(ElectronWshClient, { "window:fullscreenonlaunch": false }));
                    },
                },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8d67cb and 95e674e.

📒 Files selected for processing (2)
  • emain/emain-menu.ts (2 hunks)
  • frontend/app/view/term/term-model.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/app/view/term/term-model.ts
🧰 Additional context used
🧬 Code graph analysis (1)
emain/emain-menu.ts (2)
frontend/app/store/wshclientapi.ts (1)
  • RpcApi (572-572)
emain/emain-wsh.ts (1)
  • ElectronWshClient (74-74)

@sawka sawka merged commit bb12ed6 into wavetermdev:main Oct 31, 2025
4 checks passed
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.

3 participants