Skip to content

Refactor to using Window interface - #4471

Merged
leaanthony merged 1 commit into
v3-alphafrom
v3-alpha-chore/refactor-window
Aug 9, 2025
Merged

leaanthony merged 1 commit into
v3-alphafrom
v3-alpha-chore/refactor-window

Conversation

@leaanthony

@leaanthony leaanthony commented Aug 3, 2025 •

Copy link
Copy Markdown
Member

Description

Removes hard-coded usage of WebviewWindow where appropriate and makes sure it all conforms with the Window interface.

Summary by CodeRabbit

  • New Features

    • Expanded the window interface with new capabilities, including visibility checks, bounds management, native handle access, enabling/disabling, flashing, printing, event hooks, and editing actions (cut, copy, paste, undo, redo, delete, select all).
  • Refactor

    • Generalized window-related APIs and callbacks to use a unified window interface instead of a specific window type across the application and examples.
    • Renamed and standardized native window handle access methods for improved consistency and safety.
    • Simplified native window handle retrieval and improved error handling across platforms.
    • Centralized parent window handle assignment in dialogs on Windows.
    • Improved type safety and removed unsafe type assertions in Linux implementations.
    • Updated system tray window positioning methods to use the generalized window interface.
    • Enhanced error handling in badge management on Windows.
    • Added helper functions to safely extract platform-specific window implementations.
  • Documentation

    • Updated the changelog to reflect the renaming of the native window handle method.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 3, 2025
@coderabbitai

coderabbitai Bot commented Aug 3, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This change generalizes window-related types throughout the codebase by replacing concrete *WebviewWindow pointers with the Window interface. It updates function signatures, struct fields, method implementations, and key binding callbacks to use the interface. Additionally, native window handle access is standardized via a new NativeWindow() method returning an unsafe.Pointer.

Changes

Cohort / File(s) Change Summary
Examples: Window API Generalization
v3/examples/build/main.go, v3/examples/events-bug/main.go, v3/examples/keybindings/main.go, v3/examples/systray-basic/main.go, v3/examples/systray-menu/main.go, v3/examples/window-menu/main.go, v3/examples/window/main.go, v3/internal/commands/appimage_testfiles/main.go
Replaced all usage of *WebviewWindow with Window interface in function parameters, callbacks, and variable declarations. Updated helper functions and key binding maps accordingly.
Application API: Key Bindings and Options
v3/pkg/application/application.go, v3/pkg/application/application_options.go, v3/pkg/application/webview_window_options.go, v3/pkg/application/key_binding_manager.go
Updated key binding maps and manager to use func(window Window) instead of func(window *WebviewWindow). Changed related struct fields and method signatures.
Dialogs API and Platform Implementations
v3/pkg/application/dialogs.go, v3/pkg/application/dialogs_darwin.go, v3/pkg/application/dialogs_linux.go, v3/pkg/application/dialogs_windows.go, v3/pkg/application/messageprocessor_dialog.go
Changed dialog structs and methods to use Window interface instead of *WebviewWindow. Standardized native window handle retrieval using NativeWindow(). Updated dialog attachment and file dialog logic.
System Tray and Platform Implementations
v3/pkg/application/systemtray.go, v3/pkg/application/systemtray_darwin.go, v3/pkg/application/systemtray_linux.go, v3/pkg/application/systemtray_windows.go
Generalized system tray window attachment and positioning methods to use Window interface. Adjusted platform-specific implementations to work with the new interface.
Window Interface and Implementation
v3/pkg/application/window.go, v3/pkg/application/window_manager.go, v3/pkg/application/webview_window.go, v3/pkg/application/webview_window_darwin.go, v3/pkg/application/webview_window_linux.go, v3/pkg/application/webview_window_windows.go, v3/pkg/application/webview_window_close_darwin.go
Extended Window interface with new methods for visibility, bounds, native handle, event hooks, and editing. Updated all concrete implementations and related methods to conform. Renamed and refactored native window handle access to NativeWindow() unsafe.Pointer.
Linux Platform Helpers
v3/pkg/application/linux_cgo.go, v3/pkg/application/linux_purego.go
Added helper for safe type assertion to platform-specific window type. Updated dialog and event handling to use NativeWindow() and avoid direct type assertions.
Windows Platform: Menu and Badge
v3/pkg/application/menu_windows.go, v3/pkg/application/popupmenu_windows.go, v3/pkg/services/badge/badge_windows.go
Updated key binding callbacks to use Window interface. Standardized native window handle retrieval and error handling for badges. Improved error handling for menu icon setting.
Changelog
v3/UNRELEASED_CHANGELOG.md
Added a changelog entry documenting the renaming of NativeWindowHandle() to NativeWindow().

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant Window (interface)
    participant WebviewWindow (impl)
    participant PlatformDialog
    participant SystemTray

    App->>Window: Create or manage window (via interface)
    App->>Window: Register key binding (func(Window))
    Window->>WebviewWindow: (if concrete) method calls
    App->>PlatformDialog: AttachToWindow(Window)
    PlatformDialog->>Window: NativeWindow()
    App->>SystemTray: AttachWindow(Window)
    SystemTray->>Window: PositionWindow(Window, offset)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Suggested labels

size:M, lgtm

Poem

A window once was concrete, pointer-bound and shy,
Now it’s an interface—oh my, oh my!
Key bindings and dialogs, all join the parade,
With NativeWindow() pointers smartly relayed.
The rabbit hops on, abstraction in tow,
Waving its ears as the windows all grow!
🐇✨

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f12370f and 30545bc.

📒 Files selected for processing (34)
  • v3/UNRELEASED_CHANGELOG.md (1 hunks)
  • v3/examples/build/main.go (3 hunks)
  • v3/examples/events-bug/main.go (3 hunks)
  • v3/examples/keybindings/main.go (3 hunks)
  • v3/examples/systray-basic/main.go (1 hunks)
  • v3/examples/systray-menu/main.go (1 hunks)
  • v3/examples/window-menu/main.go (1 hunks)
  • v3/examples/window/main.go (6 hunks)
  • v3/internal/commands/appimage_testfiles/main.go (7 hunks)
  • v3/pkg/application/application.go (2 hunks)
  • v3/pkg/application/application_options.go (1 hunks)
  • v3/pkg/application/dialogs.go (8 hunks)
  • v3/pkg/application/dialogs_darwin.go (3 hunks)
  • v3/pkg/application/dialogs_linux.go (2 hunks)
  • v3/pkg/application/dialogs_windows.go (6 hunks)
  • v3/pkg/application/key_binding_manager.go (3 hunks)
  • v3/pkg/application/linux_cgo.go (5 hunks)
  • v3/pkg/application/linux_purego.go (1 hunks)
  • v3/pkg/application/menu_windows.go (2 hunks)
  • v3/pkg/application/messageprocessor_dialog.go (2 hunks)
  • v3/pkg/application/popupmenu_windows.go (2 hunks)
  • v3/pkg/application/systemtray.go (4 hunks)
  • v3/pkg/application/systemtray_darwin.go (1 hunks)
  • v3/pkg/application/systemtray_linux.go (1 hunks)
  • v3/pkg/application/systemtray_windows.go (1 hunks)
  • v3/pkg/application/webview_window.go (5 hunks)
  • v3/pkg/application/webview_window_close_darwin.go (1 hunks)
  • v3/pkg/application/webview_window_darwin.go (1 hunks)
  • v3/pkg/application/webview_window_linux.go (2 hunks)
  • v3/pkg/application/webview_window_options.go (1 hunks)
  • v3/pkg/application/webview_window_windows.go (1 hunks)
  • v3/pkg/application/window.go (2 hunks)
  • v3/pkg/application/window_manager.go (1 hunks)
  • v3/pkg/services/badge/badge_windows.go (5 hunks)
✅ Files skipped from review due to trivial changes (1)
  • v3/pkg/application/dialogs_darwin.go
🚧 Files skipped from review as they are similar to previous changes (33)
  • v3/pkg/application/webview_window_linux.go
  • v3/UNRELEASED_CHANGELOG.md
  • v3/pkg/application/application.go
  • v3/pkg/application/menu_windows.go
  • v3/examples/window-menu/main.go
  • v3/pkg/application/webview_window_close_darwin.go
  • v3/pkg/application/messageprocessor_dialog.go
  • v3/examples/keybindings/main.go
  • v3/pkg/application/window_manager.go
  • v3/examples/build/main.go
  • v3/pkg/application/dialogs_linux.go
  • v3/pkg/application/systemtray_windows.go
  • v3/pkg/application/webview_window_darwin.go
  • v3/pkg/application/application_options.go
  • v3/examples/systray-menu/main.go
  • v3/pkg/application/webview_window_options.go
  • v3/examples/systray-basic/main.go
  • v3/pkg/application/systemtray_darwin.go
  • v3/pkg/application/systemtray_linux.go
  • v3/pkg/application/webview_window_windows.go
  • v3/pkg/application/popupmenu_windows.go
  • v3/pkg/application/linux_purego.go
  • v3/internal/commands/appimage_testfiles/main.go
  • v3/examples/events-bug/main.go
  • v3/pkg/services/badge/badge_windows.go
  • v3/pkg/application/linux_cgo.go
  • v3/pkg/application/dialogs_windows.go
  • v3/pkg/application/key_binding_manager.go
  • v3/examples/window/main.go
  • v3/pkg/application/systemtray.go
  • v3/pkg/application/webview_window.go
  • v3/pkg/application/window.go
  • v3/pkg/application/dialogs.go
⏰ 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). (7)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: semgrep-cloud-platform/scan
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v3-alpha-chore/refactor-window

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot Bot added Enhancement New feature or request go Pull requests that update Go code labels Aug 3, 2025
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 3, 2025 •

Copy link
Copy Markdown

Deploying wails with  Cloudflare Pages  Cloudflare Pages

Latest commit: 30545bc
Status: ✅  Deploy successful!
Preview URL: https://e57fe048.wails.pages.dev
Branch Preview URL: https://v3-alpha-chore-refactor-wind.wails.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
v3/pkg/application/webview_window_close_darwin.go (1)

17-18: Consider adding type safety for the assertion.

The direct type assertion window.(*WebviewWindow) could panic if the window is not actually a *WebviewWindow. Consider adding a type check or documenting the assumption that all windows in this context are WebviewWindows.

-	webviewWindow := window.(*WebviewWindow)
+	webviewWindow, ok := window.(*WebviewWindow)
+	if !ok {
+		globalApplication.debug("windowShouldUnconditionallyClose: window is not a WebviewWindow", "windowId", windowId)
+		return C.bool(false)
+	}

The method call to shouldUnconditionallyClose() is a good improvement for encapsulation.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1227f14 and 3a3eb23.

📒 Files selected for processing (34)
  • v3/examples/build/main.go (3 hunks)
  • v3/examples/events-bug/main.go (3 hunks)
  • v3/examples/keybindings/main.go (3 hunks)
  • v3/examples/systray-basic/main.go (1 hunks)
  • v3/examples/systray-menu/main.go (1 hunks)
  • v3/examples/window-menu/main.go (2 hunks)
  • v3/examples/window/main.go (6 hunks)
  • v3/internal/commands/appimage_testfiles/main.go (1 hunks)
  • v3/pkg/application/application.go (2 hunks)
  • v3/pkg/application/application_options.go (1 hunks)
  • v3/pkg/application/dialogs.go (8 hunks)
  • v3/pkg/application/dialogs_darwin.go (3 hunks)
  • v3/pkg/application/dialogs_linux.go (2 hunks)
  • v3/pkg/application/dialogs_windows.go (2 hunks)
  • v3/pkg/application/key_binding_manager.go (3 hunks)
  • v3/pkg/application/linux_cgo.go (3 hunks)
  • v3/pkg/application/linux_purego.go (1 hunks)
  • v3/pkg/application/messageprocessor_dialog.go (2 hunks)
  • v3/pkg/application/native_window_darwin.go (1 hunks)
  • v3/pkg/application/native_window_linux.go (1 hunks)
  • v3/pkg/application/native_window_windows.go (1 hunks)
  • v3/pkg/application/systemtray.go (4 hunks)
  • v3/pkg/application/systemtray_darwin.go (1 hunks)
  • v3/pkg/application/systemtray_linux.go (1 hunks)
  • v3/pkg/application/systemtray_windows.go (1 hunks)
  • v3/pkg/application/webview_window.go (4 hunks)
  • v3/pkg/application/webview_window_close_darwin.go (1 hunks)
  • v3/pkg/application/webview_window_darwin.go (1 hunks)
  • v3/pkg/application/webview_window_linux.go (1 hunks)
  • v3/pkg/application/webview_window_options.go (1 hunks)
  • v3/pkg/application/webview_window_windows.go (1 hunks)
  • v3/pkg/application/window.go (1 hunks)
  • v3/pkg/application/window_manager.go (1 hunks)
  • v3/pkg/services/badge/badge_windows.go (4 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/pkg/application/webview_window_bindings_darwin.h:0-0
Timestamp: 2024-09-21T13:34:24.145Z
Learning: In this codebase, typedefs for window references (like replacing `void *` with `WindowRef`) are not preferred; using `void *` is acceptable.
Learnt from: popaprozac
PR: wailsapp/wails#4098
File: v3/pkg/services/notifications/notifications_windows.go:0-0
Timestamp: 2025-03-24T06:54:22.127Z
Learning: popaprozac prefers to focus on getting the Notifications API functionality working first and may consider code cleanup/refactoring for payload encoding logic in notifications_windows.go at a later time.
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/examples/keybindings/main.go:16-17
Timestamp: 2024-09-20T23:34:29.841Z
Learning: In the codebase, `application.Options.KeyBindings` uses the `application.Window` type, whereas `application.WebviewWindowOptions.KeyBindings` uses `*application.WebviewWindow`. This is intentional and acceptable.
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/pkg/application/application_options.go:93-93
Timestamp: 2024-10-08T22:11:37.054Z
Learning: The `KeyBindings` property of `application.Option` uses the `application.Window` type, while `application.WebviewWindowOptions` still accepts `*application.WebviewWindow`, and this is intentional.
📚 Learning: in the codebase, `application.options.keybindings` uses the `application.window` type, whereas `appl...
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/examples/keybindings/main.go:16-17
Timestamp: 2024-09-20T23:34:29.841Z
Learning: In the codebase, `application.Options.KeyBindings` uses the `application.Window` type, whereas `application.WebviewWindowOptions.KeyBindings` uses `*application.WebviewWindow`. This is intentional and acceptable.

Applied to files:

  • v3/pkg/application/messageprocessor_dialog.go
  • v3/examples/keybindings/main.go
  • v3/pkg/application/native_window_windows.go
  • v3/pkg/application/native_window_darwin.go
  • v3/pkg/application/native_window_linux.go
  • v3/pkg/application/window_manager.go
  • v3/pkg/application/webview_window_linux.go
  • v3/internal/commands/appimage_testfiles/main.go
  • v3/pkg/application/webview_window_darwin.go
  • v3/pkg/application/dialogs_linux.go
  • v3/pkg/application/webview_window_windows.go
  • v3/examples/systray-menu/main.go
  • v3/pkg/application/systemtray_windows.go
  • v3/pkg/application/webview_window_close_darwin.go
  • v3/examples/events-bug/main.go
  • v3/pkg/application/application_options.go
  • v3/pkg/application/webview_window_options.go
  • v3/examples/build/main.go
  • v3/pkg/application/application.go
  • v3/pkg/application/systemtray_linux.go
  • v3/examples/systray-basic/main.go
  • v3/pkg/application/systemtray_darwin.go
  • v3/examples/window-menu/main.go
  • v3/pkg/application/linux_cgo.go
  • v3/pkg/application/linux_purego.go
  • v3/pkg/application/window.go
  • v3/pkg/application/key_binding_manager.go
  • v3/examples/window/main.go
  • v3/pkg/application/dialogs.go
  • v3/pkg/application/systemtray.go
  • v3/pkg/application/webview_window.go
📚 Learning: the `keybindings` property of `application.option` uses the `application.window` type, while `applic...
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/pkg/application/application_options.go:93-93
Timestamp: 2024-10-08T22:11:37.054Z
Learning: The `KeyBindings` property of `application.Option` uses the `application.Window` type, while `application.WebviewWindowOptions` still accepts `*application.WebviewWindow`, and this is intentional.

Applied to files:

  • v3/pkg/application/messageprocessor_dialog.go
  • v3/examples/keybindings/main.go
  • v3/pkg/application/webview_window_darwin.go
  • v3/pkg/application/dialogs_linux.go
  • v3/pkg/application/webview_window_windows.go
  • v3/examples/systray-menu/main.go
  • v3/pkg/application/systemtray_windows.go
  • v3/pkg/application/webview_window_close_darwin.go
  • v3/examples/events-bug/main.go
  • v3/pkg/application/application_options.go
  • v3/pkg/application/webview_window_options.go
  • v3/examples/build/main.go
  • v3/pkg/application/application.go
  • v3/examples/systray-basic/main.go
  • v3/pkg/application/systemtray_darwin.go
  • v3/examples/window-menu/main.go
  • v3/pkg/application/linux_cgo.go
  • v3/pkg/application/key_binding_manager.go
  • v3/examples/window/main.go
  • v3/pkg/application/dialogs.go
  • v3/pkg/application/systemtray.go
  • v3/pkg/application/webview_window.go
📚 Learning: in `v3/examples/window/main.go`, `time.sleep` is used within a goroutine and does not block the ui t...
Learnt from: leaanthony
PR: wailsapp/wails#3763
File: v3/examples/window/main.go:472-475
Timestamp: 2024-09-30T06:13:46.595Z
Learning: In `v3/examples/window/main.go`, `time.Sleep` is used within a goroutine and does not block the UI thread.

Applied to files:

  • v3/pkg/application/messageprocessor_dialog.go
  • v3/pkg/services/badge/badge_windows.go
  • v3/pkg/application/dialogs_darwin.go
  • v3/examples/keybindings/main.go
  • v3/pkg/application/native_window_windows.go
  • v3/pkg/application/native_window_darwin.go
  • v3/pkg/application/native_window_linux.go
  • v3/internal/commands/appimage_testfiles/main.go
  • v3/pkg/application/dialogs_linux.go
  • v3/examples/systray-menu/main.go
  • v3/pkg/application/systemtray_windows.go
  • v3/pkg/application/webview_window_close_darwin.go
  • v3/examples/events-bug/main.go
  • v3/examples/build/main.go
  • v3/pkg/application/dialogs_windows.go
  • v3/examples/systray-basic/main.go
  • v3/examples/window-menu/main.go
  • v3/pkg/application/linux_purego.go
  • v3/pkg/application/window.go
  • v3/examples/window/main.go
  • v3/pkg/application/systemtray.go
📚 Learning: in this codebase, typedefs for window references (like replacing `void *` with `windowref`) are not ...
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/pkg/application/webview_window_bindings_darwin.h:0-0
Timestamp: 2024-09-21T13:34:24.145Z
Learning: In this codebase, typedefs for window references (like replacing `void *` with `WindowRef`) are not preferred; using `void *` is acceptable.

Applied to files:

  • v3/pkg/application/messageprocessor_dialog.go
  • v3/pkg/services/badge/badge_windows.go
  • v3/pkg/application/dialogs_darwin.go
  • v3/examples/keybindings/main.go
  • v3/pkg/application/native_window_windows.go
  • v3/pkg/application/native_window_darwin.go
  • v3/pkg/application/webview_window_linux.go
  • v3/pkg/application/webview_window_darwin.go
  • v3/pkg/application/dialogs_linux.go
  • v3/pkg/application/webview_window_windows.go
  • v3/pkg/application/webview_window_close_darwin.go
  • v3/examples/events-bug/main.go
  • v3/pkg/application/application_options.go
  • v3/examples/build/main.go
  • v3/pkg/application/systemtray_darwin.go
  • v3/examples/window-menu/main.go
  • v3/pkg/application/linux_cgo.go
  • v3/examples/window/main.go
  • v3/pkg/application/dialogs.go
  • v3/pkg/application/systemtray.go
  • v3/pkg/application/webview_window.go
📚 Learning: in the notifications package, initialization of the `service` struct is handled through platform-spe...
Learnt from: popaprozac
PR: wailsapp/wails#4098
File: v3/pkg/services/notifications/notifications.go:46-55
Timestamp: 2025-03-24T20:22:56.233Z
Learning: In the notifications package, initialization of the `Service` struct is handled through platform-specific `New()` functions in each implementation file (darwin, windows, linux) rather than a generic constructor in the main package file.

Applied to files:

  • v3/pkg/application/native_window_darwin.go
📚 Learning: in the notifications package, initialization of the `service` struct is handled through platform-spe...
Learnt from: popaprozac
PR: wailsapp/wails#4098
File: v3/pkg/services/notifications/notifications.go:46-55
Timestamp: 2025-03-24T20:22:56.233Z
Learning: In the notifications package, initialization of the `Service` struct is handled through platform-specific `New()` functions in each implementation file (darwin, windows, linux) rather than a generic constructor in the main package file. Each platform implementation follows a singleton pattern using `notificationServiceOnce.Do()` and creates a global `NotificationService` variable that's accessed through a thread-safe `getNotificationService()` function.

Applied to files:

  • v3/pkg/application/native_window_darwin.go
📚 Learning: in `v3/internal/commands/appimage_testfiles/main.go`, `time.sleep` is used within a goroutine and do...
Learnt from: leaanthony
PR: wailsapp/wails#3763
File: v3/internal/commands/appimage_testfiles/main.go:295-299
Timestamp: 2024-09-30T06:14:32.602Z
Learning: In `v3/internal/commands/appimage_testfiles/main.go`, `time.Sleep` is used within a goroutine and does not block the UI thread.

Applied to files:

  • v3/internal/commands/appimage_testfiles/main.go
  • v3/examples/build/main.go
  • v3/pkg/application/linux_purego.go
  • v3/examples/window/main.go
📚 Learning: in the wails menu system (v3/pkg/application/menu.go), shared state between menus is intentionally d...
Learnt from: leaanthony
PR: wailsapp/wails#4031
File: v3/pkg/application/menu.go:199-202
Timestamp: 2025-01-24T22:41:18.566Z
Learning: In the Wails menu system (v3/pkg/application/menu.go), shared state between menus is intentionally designed and desirable. Methods like `Append()` and `Prepend()` should maintain shared references to menu items rather than creating deep copies.

Applied to files:

  • v3/examples/systray-menu/main.go
  • v3/examples/build/main.go
  • v3/examples/window-menu/main.go
  • v3/pkg/application/window.go
  • v3/examples/window/main.go
📚 Learning: safety checks for `p.nspanel` are performed in the `setfloating` method of `webviewpanel`, following...
Learnt from: nixpare
PR: wailsapp/wails#3763
File: v3/pkg/application/webview_panel_darwin.go:88-89
Timestamp: 2024-09-21T09:56:48.126Z
Learning: Safety checks for `p.nsPanel` are performed in the `SetFloating` method of `WebviewPanel`, following the `WebviewWindow` and `macosWebviewWindow` implementations and code style.

Applied to files:

  • v3/pkg/application/linux_cgo.go
  • v3/pkg/application/linux_purego.go
📚 Learning: in wails v2, unlike v3-alpha which has a `serviceshutdown` method for services, there is no standard...
Learnt from: popaprozac
PR: wailsapp/wails#4256
File: v2/internal/frontend/desktop/linux/notifications.go:27-28
Timestamp: 2025-04-29T23:54:07.488Z
Learning: In Wails v2, unlike v3-alpha which has a `ServiceShutdown` method for services, there is no standardized teardown pattern for frontend implementations. When implementing features that require cleanup (like goroutines or resources), add explicit cleanup methods (e.g., `CleanupNotifications()`) that handle resource release, context cancellation, and connection closure.

Applied to files:

  • v3/pkg/application/webview_window.go
📚 Learning: when dealing with fixed-length arrays in go structs, encoding/json automatically handles bounds chec...
Learnt from: fbbdev
PR: wailsapp/wails#4001
File: v3/internal/generator/testcases/no_bindings_here/person.go:9-9
Timestamp: 2025-01-15T22:30:08.796Z
Learning: When dealing with fixed-length arrays in Go structs, encoding/json automatically handles bounds checking during unmarshaling, returning an error if the JSON array length exceeds the Go array length. No additional runtime validation is needed.

Applied to files:

  • v3/pkg/application/webview_window.go
📚 Learning: in the wails v3 codebase, panic is used to catch invalid invocations that should never occur in prod...
Learnt from: fbbdev
PR: wailsapp/wails#4024
File: v3/pkg/application/services.go:38-51
Timestamp: 2025-01-18T21:19:47.778Z
Learning: In the Wails v3 codebase, panic is used to catch invalid invocations that should never occur in production (programming errors), while error returns are reserved for recoverable error conditions (runtime errors). For example, the `NewService` function in `v3/pkg/application/services.go` uses panic to handle the case where more than one `ServiceOptions` instance is provided, as this is considered an unrecoverable programming error.

Applied to files:

  • v3/pkg/application/webview_window.go
📚 Learning: in the wails v3 project, internal functions are designed to panic on nil parameters as they represen...
Learnt from: fbbdev
PR: wailsapp/wails#4045
File: v3/internal/generator/render/info.go:28-68
Timestamp: 2025-02-04T23:59:43.956Z
Learning: In the Wails v3 project, internal functions are designed to panic on nil parameters as they represent contract violations, rather than adding defensive nil checks.

Applied to files:

  • v3/pkg/application/webview_window.go
⏰ 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). (6)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (62)
v3/pkg/application/messageprocessor_dialog.go (1)

105-105: LGTM! Clean interface generalization.

The removal of type assertions aligns perfectly with the PR objective to use the Window interface instead of concrete WebviewWindow types. Both dialog option assignments now use the interface directly.

Also applies to: 147-147

v3/pkg/application/webview_window_darwin.go (1)

1329-1331: LGTM! Improved native window handle abstraction.

The method rename from nativeWindowHandle() to nativeWindow() with the new NativeWindow return type eliminates unnecessary uintptr conversions and aligns with the unified native window abstraction across platforms.

v3/pkg/application/native_window_linux.go (1)

1-13: LGTM! Clean platform-specific abstraction.

The NativeWindow type alias provides a clean abstraction for Linux GTK window handles, consistent with the unified native window handling approach across platforms.

v3/pkg/application/native_window_windows.go (1)

1-9: LGTM! Consistent platform abstraction.

The Windows NativeWindow type alias mirrors the approach used for other platforms, providing a unified interface for native window handles across the codebase.

v3/pkg/application/dialogs_darwin.go (1)

410-410: LGTM! Simplified native window access.

The replacement of NativeWindowHandle() calls with direct NativeWindow() calls eliminates unnecessary error handling and simplifies native window pointer retrieval across all dialog types.

Also applies to: 475-475, 555-555

v3/pkg/application/webview_window_linux.go (1)

379-381: LGTM! Improved type safety and consistency.

The method refactoring from nativeWindowHandle() uintptr to nativeWindow() NativeWindow improves type safety by returning the platform-specific NativeWindow type instead of a generic uintptr. This change standardizes native window handle access across platforms and aligns with the broader Window interface refactor.

v3/pkg/application/native_window_darwin.go (1)

1-12: LGTM! Well-structured platform-specific type definition.

The NativeWindow type alias is properly implemented with:

  • Correct build constraint for Darwin platform
  • Clear documentation indicating it represents NSWindow*
  • Appropriate use of unsafe.Pointer for native handles
  • Proper cgo import for Cocoa framework

This aligns with the codebase pattern where unsafe.Pointer is acceptable for native window references.

v3/internal/commands/appimage_testfiles/main.go (1)

35-35: LGTM! Appropriate type assertion for concrete type requirements.

The explicit type assertion to *application.WebviewWindow is correct here since the callback function parameter requires the concrete type rather than the Window interface. This maintains compatibility while allowing the broader codebase to use interface-based window handling.

v3/examples/keybindings/main.go (1)

16-20: LGTM! Perfect alignment with Window interface pattern.

The parameter type changes from *application.WebviewWindow to application.Window align perfectly with the retrieved learnings that indicate application.Options.KeyBindings should use the application.Window type. The callback methods (Center(), OpenDevTools()) are part of the Window interface, so this change improves type consistency without breaking functionality.

Also applies to: 27-31, 38-42

v3/pkg/application/systemtray_windows.go (1)

50-50: LGTM! Clean interface abstraction.

The method signature update from *WebviewWindow to Window interface aligns perfectly with the broader refactoring effort to use interface-based window handling throughout the codebase. The method implementation remains unchanged since it only uses methods available through the Window interface.

v3/pkg/application/webview_window_windows.go (1)

237-239: LGTM! Improved type safety for native window handles.

The method replacement from nativeWindowHandle() uintptr to nativeWindow() NativeWindow enhances type safety by using a platform-specific type alias instead of a raw integer. The unsafe.Pointer cast is appropriate for converting the Windows HWND handle to the abstracted NativeWindow type.

v3/pkg/application/window_manager.go (1)

73-82: LGTM! Interface-based return type with simplified implementation.

The method signature change from *WebviewWindow to Window interface aligns with the broader refactoring effort. The simplified implementation correctly returns the window directly from the map - if the window ID doesn't exist, returning nil is appropriate for the Window interface type.

v3/pkg/application/application.go (1)

335-335: LGTM! Consistent interface refactor.

The keyBindings field type change from *WebviewWindow to Window interface aligns perfectly with the PR objective to standardize on the Window interface. The initialization on line 418 correctly matches the new type signature.

Also applies to: 418-418

v3/examples/systray-menu/main.go (1)

40-44: LGTM! Example updated correctly for interface refactor.

The KeyBindings function signature change from *application.WebviewWindow to application.Window properly aligns with the interface refactor. The function body remains unchanged, which is correct since the Window interface provides the necessary abstraction.

v3/examples/systray-basic/main.go (1)

36-40: LGTM! Consistent example interface update.

The KeyBindings function signature change from *application.WebviewWindow to application.Window is consistent with the interface refactor pattern seen across the codebase. The function body correctly remains unchanged.

v3/pkg/application/webview_window_options.go (1)

134-134: LGTM! Interface standardization improves API consistency.

This change updates WebviewWindowOptions.KeyBindings to use the Window interface, making it consistent with Options.KeyBindings. This addresses the previous API inconsistency where different option structs used different types for key binding callbacks.

v3/pkg/application/application_options.go (1)

69-69: LGTM! Completing the interface standardization.

The KeyBindings field type change to use the Window interface completes the standardization across all configuration structs. This ensures consistent callback signatures throughout the key binding system.

v3/pkg/application/systemtray_linux.go (1)

227-227: LGTM! Successful generalization to Window interface.

The parameter type change from *WebviewWindow to Window interface aligns perfectly with the PR's refactor objective while maintaining identical functionality.

v3/pkg/application/dialogs_windows.go (2)

42-45: LGTM! Improved native window handle retrieval.

The change from NativeWindowHandle() to NativeWindow() with nil checking simplifies the code while maintaining the same functionality. The error handling removal is appropriate since we can directly check for nil.


114-117: LGTM! Consistent pattern applied.

Same improvement as in the message dialog - replacing error-prone NativeWindowHandle() with simpler NativeWindow() nil checking pattern.

v3/pkg/application/linux_purego.go (1)

1104-1109: LGTM! Excellent type safety improvement.

The explicit type assertions with ok checks prevent potential runtime panics and follow Go best practices for safe type casting. This defensive programming approach is much safer than direct type assertions.

v3/pkg/application/dialogs_linux.go (2)

7-10: LGTM! Consistent native window access pattern.

The change from NativeWindowHandle() to NativeWindow() with nil checking matches the pattern used in other platform implementations, improving consistency across the codebase.


33-36: LGTM! Consistent implementation.

Same improvement applied consistently - using the standardized NativeWindow() approach with proper nil checking.

v3/pkg/services/badge/badge_windows.go (4)

8-8: LGTM! Added necessary import for error handling.

The errors import is needed for the new error creation pattern used when native window is unavailable.


90-94: LGTM! Consistent native window handling with proper error messaging.

The change from NativeWindowHandle() to NativeWindow() follows the same pattern as dialog implementations. The custom error message "window native handle unavailable" provides clear feedback when the native window is not available.


131-135: LGTM! Consistent pattern applied.

Same improvement as in SetBadge - using the standardized native window access approach with appropriate error handling.


189-193: LGTM! Complete consistency across all badge methods.

All three badge methods now use the same native window access pattern, ensuring consistent behavior throughout the badge service.

v3/pkg/application/systemtray_darwin.go (1)

104-115: LGTM! Excellent interface abstraction with improved error handling.

The refactor from *WebviewWindow to Window interface follows good design principles. The addition of the nil check for the native window pointer and proper error handling makes this implementation more robust.

v3/pkg/application/linux_cgo.go (3)

1281-1284: LGTM! Good defensive programming with type assertion checks.

The addition of explicit type assertion checks with early returns prevents potential panics and makes the code more robust when working with the Window interface abstraction.


1468-1471: LGTM! Consistent type safety pattern.

The type assertion pattern is consistent with other functions in the file and provides necessary safety when working with the Window interface.


1509-1512: LGTM! Maintains consistent type safety across event handlers.

The type assertion pattern is consistent with the other event handlers in this file, ensuring robust handling of the Window interface abstraction.

v3/examples/events-bug/main.go (3)

16-17: LGTM! Proper interface abstraction in key bindings.

The change from *application.WebviewWindow to application.Window follows the interface abstraction pattern established throughout the codebase, improving modularity while maintaining functionality.


35-36: LGTM! Consistent interface usage across window-specific key bindings.

The interface abstraction is consistently applied to window-specific key bindings, maintaining the same pattern as the global application key bindings.


46-47: LGTM! Complete consistency in interface abstraction.

All key binding callbacks consistently use the application.Window interface, demonstrating proper application of the interface abstraction pattern throughout the example.

v3/examples/build/main.go (2)

32-35: LGTM! Clean interface abstraction with improved readability.

The refactor from *application.WebviewWindow to application.Window interface follows the established pattern. The local variable assignment before the nil check slightly improves readability while maintaining the same safety guarantees.


122-262: LGTM! Comprehensive and consistent interface refactor.

All usages of currentWindow have been consistently updated to work with the application.Window interface. The refactor is thorough and maintains all existing functionality while improving abstraction.

v3/pkg/application/window.go (1)

84-107: LGTM! Comprehensive interface expansion supporting the refactor objectives.

The addition of these methods significantly enhances the Window interface capabilities:

  • State management: IsVisible(), SetEnabled(), Flash() improve window control
  • Bounds handling: Bounds() and SetBounds() provide comprehensive positioning support
  • Platform integration: NativeWindow() offers safe access to native handles
  • Functionality: Print() and RegisterHook() add document and event capabilities
  • Editing support: Complete set of editing operations for text manipulation

These additions effectively support the refactor from concrete *WebviewWindow types to the interface-based approach, providing all necessary functionality through the abstraction layer.

v3/examples/window-menu/main.go (3)

47-57: LGTM: Proper interface abstraction in key bindings.

The refactoring correctly updates the KeyBindings map to use the Window interface instead of the concrete *WebviewWindow type. This improves abstraction while maintaining functionality through the key binding callbacks.


31-31: Appropriate type assertion for concrete method access.

The type assertion to *WebviewWindow is correctly used to access the HideMenuBar() method, which is specific to the concrete implementation and not available on the Window interface.


36-36: Correct type assertion pattern for WebviewWindow-specific methods.

The type assertion follows the established pattern for accessing concrete methods like SetURL() when working with the abstract Window interface.

v3/pkg/application/key_binding_manager.go (3)

16-16: LGTM: Interface abstraction improves flexibility.

The Add method now accepts a callback with Window interface parameter instead of concrete *WebviewWindow, improving the API's flexibility while maintaining backward compatibility.


30-30: Consistent interface usage in Process method.

The Process method parameter type correctly updated to match the interface abstraction pattern used throughout the refactoring.


45-45: KeyBinding struct properly updated.

The Callback field type correctly reflects the interface abstraction, maintaining consistency with the method signatures.

v3/examples/window/main.go (4)

91-91: LGTM: Variable type updated for interface consistency.

The hiddenWindows slice now uses the Window interface type, which is consistent with the broader refactoring and provides better abstraction.


93-99: Correct helper function signature update.

The currentWindow helper function parameter type correctly updated to accept functions that work with the Window interface. The nil check and debug message appropriately updated.


277-277: Proper variable declaration with interface type.

The explicit variable declaration var w application.Window correctly uses the interface type while allowing assignment from the concrete window creation method.


479-481: Consistent callback parameter types.

All the callback functions throughout the file properly use Window interface parameters, maintaining consistency with the refactoring pattern.

v3/pkg/application/systemtray.go (4)

38-38: Interface method signature properly updated.

The positionWindow method in the systemTrayImpl interface correctly uses the Window interface parameter, maintaining consistency with the refactoring.


124-131: PositionWindow method correctly generalized.

The public PositionWindow method properly accepts the Window interface, improving API flexibility while maintaining the same functionality.


260-260: WindowAttachConfig struct field updated appropriately.

The Window field in WindowAttachConfig struct correctly uses the interface type, allowing attachment of any window implementation.


281-284: AttachWindow method properly abstracted.

The AttachWindow method parameter correctly updated to use the Window interface, providing better abstraction for system tray window attachment.

v3/pkg/application/dialogs.go (6)

78-78: MessageDialogOptions struct field properly updated.

The window field correctly uses the Window interface type, allowing message dialogs to be attached to any window implementation.


135-137: AttachToWindow method parameter correctly generalized.

The AttachToWindow method for MessageDialog properly accepts the Window interface, improving API flexibility.


181-181: OpenFileDialogOptions Window field updated consistently.

The Window field in OpenFileDialogOptions struct correctly uses the interface type, maintaining consistency with other dialog options.


207-207: OpenFileDialogStruct window field properly abstracted.

The internal window field correctly uses the Window interface, allowing the dialog implementation to work with any window type.


248-250: File dialog AttachToWindow method correctly updated.

The method parameter properly uses the Window interface, maintaining consistency with the MessageDialog implementation.


375-375: SaveFileDialog consistently updated with interface types.

All SaveFileDialog-related structs and methods properly use the Window interface for window fields and attachment methods, maintaining consistency across all dialog types.

Also applies to: 392-392, 454-455

v3/pkg/application/webview_window.go (5)

80-80: LGTM: Interface method signature updated consistently.

The change from nativeWindowHandle() returning uintptr to nativeWindow() returning NativeWindow aligns with the broader refactor to use platform-specific type aliases for better type safety.


152-152: LGTM: Key binding callback signature updated to use Window interface.

The change from func(*WebviewWindow) to func(Window) is consistent with the refactor to use the Window interface instead of concrete types, improving abstraction.


244-250: LGTM: New native window method follows established patterns.

The NativeWindow() method implementation correctly:

  • Checks for nil implementation and destroyed state before proceeding
  • Returns nil for uninitialized/destroyed windows
  • Delegates to the platform-specific implementation
  • Follows the same defensive programming pattern used throughout the file

253-255: LGTM: Good encapsulation of atomic field access.

The shouldUnconditionallyClose() method provides a clean interface for checking the unconditional close flag, replacing direct atomic field access with proper encapsulation.


292-294: LGTM: Function signature updated consistently with interface refactor.

The processKeyBindingOptions function signature changes from concrete *WebviewWindow to Window interface are consistent with the broader refactor, maintaining the same functionality while improving abstraction.

@github-actions

github-actions Bot commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

8 similar comments
@github-actions

github-actions Bot commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions

github-actions Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@leaanthony

Copy link
Copy Markdown
Member Author

Tested and working on Windows

@github-actions

github-actions Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

1 similar comment
@github-actions

github-actions Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Aug 4, 2025
@leaanthony
leaanthony force-pushed the v3-alpha-chore/refactor-window branch from f12370f to 30545bc Compare August 9, 2025 05:19
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
30.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@leaanthony
leaanthony merged commit fe717c4 into v3-alpha Aug 9, 2025
@leaanthony
leaanthony deleted the v3-alpha-chore/refactor-window branch August 9, 2025 05:28
@coderabbitai coderabbitai Bot mentioned this pull request Nov 10, 2025
6 of 14 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Feb 22, 2026
2 of 15 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Mar 20, 2026
4 of 5 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Apr 3, 2026
Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
Refactor window interface to eliminate type assertions and improve code maintainability
@taliesin-ai taliesin-ai added v3 and removed v3-alpha labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Documentation Improvements or additions to documentation Enhancement New feature or request go Pull requests that update Go code Linux MacOS size:L This PR changes 100-499 lines, ignoring generated files. v3 Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants