* fix: compilation issue when using react+next application
When building with next, I got an error during the "collecting page data" step.
Cannot find module '/home/node/application/node_modules/@wailsio/runtime/dist/utils' imported from /home/node/application/node_modules/@wailsio/runtime/dist/contextmenu.js] {
code: 'ERR_MODULE_NOT_FOUND',
* doc: added fix in the changelog
* fix: updated UNRELEASED_CHANGELOG.md
* doc: follow naming convention
* Remove v2 changelog entry
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Check for empty buffers instead of nil in responsewriter
Use Case:
I am using a service that implements `http.Handler` to send streaming
video to the frontend. Reliably, when sending fragmented MP4 data on
MacOS, the app would panic because the buffer being sent through the
response passed a not-nil check but would panic when accessing the first
byte of the buffer.
This PR addresses that by checking if the buffer is not empty instead of
nil, accounting for the case where len(buf) == 0 and cap(buf) > 0, or
maybe where buf[0] == '\0' (I'm not sure how the nil checks work for
slices)
* Update UNRELEASED_CHANGELOG
* Update v3/internal/assetserver/webview/responsewriter_darwin.go
nil and len check
---------
Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
* fix(macOS): Use visibleFrame for window centering to exclude menu bar
The windowCenter() function was using [screen frame] which includes
the menu bar and dock areas, causing windows to appear positioned
too high on the screen when centered.
This change uses [screen visibleFrame] instead, which excludes the
menu bar and dock areas, resulting in proper visual centering.
Fixes vertical centering issue on macOS in Wails v3 alpha.
* Update v3/UNRELEASED_CHANGELOG.md
* Update changelog entry format
---------
Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* feat: Implement native Liquid Glass effect for macOS
feat: Add platform check for Liquid Glass demo
Show informative dialog on Windows/Linux explaining that the Liquid Glass
effect is a macOS-specific feature. The demo will exit gracefully on
non-macOS platforms.
docs: Add Liquid Glass feature to unreleased changelog
feat: Enhanced Liquid Glass effect with NSVisualEffectMaterial support
Major improvements to the Liquid Glass implementation for macOS:
- Added comprehensive NSVisualEffectMaterial support with 15+ material options
- Removed debug NSLog statements for cleaner production code
- Created multi-window demo showcasing 7 different glass effects:
* Light Style - Clean light appearance
* Dark Style - Dark themed glass
* Vibrant Style - Enhanced transparency
* Blue Tint - Custom RGBA tint color example
* Sheet Material - NSVisualEffectMaterialSheet
* HUD Window - Ultra-light HUD material
* Content Background - With warm tint color
- Added Material field to MacLiquidGlass struct for fine-grained control
- Improved demo design with proper Title Case and cleaner layout
- Fixed logo sizing to prevent blur
- All windows fully draggable with InvisibleTitleBarHeight
- Added comprehensive README documentation
The implementation now provides developers with complete control over the
glass effect appearance, supporting both native NSGlassEffectView (macOS 15.0+)
and NSVisualEffectView fallback for older systems.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
feat: Implement native Liquid Glass effect for macOS
- Add support for NSGlassEffectView on macOS 15.0+
- Implement runtime detection of native glass APIs
- Add fallback to enhanced NSVisualEffectView for older systems
- Update liquid glass demo with frameless windows for better visibility
- Support all NSGlassEffectView properties (cornerRadius, tintColor, style)
- Properly handle webview layering with glass effect
- Remove binary from version control
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Address CodeRabbit review feedback
- Comment out unimplemented ReduceMotion and StaticMode fields
- Remove overly broad draggable CSS properties
- Add corner radius validation
- Improve CSS with proper pointer-events and user-select
- Add clarifying comments about future features
* fix: Remove unimplemented ReduceMotion and StaticMode fields
Completely remove the commented-out performance optimization fields
as they are not implemented and have no timeline for implementation.
* fix: Update windowRemoveVisualEffects to also remove NSGlassEffectView instances
The cleanup function now properly removes both NSVisualEffectView and
NSGlassEffectView instances to prevent orphaned effect layers. Uses
NSClassFromString to avoid hard references to NSGlassEffectView which
is only available on macOS 15.0+.
* fix changelog
* Update v3/pkg/application/webview_window_darwin.m
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update v3/pkg/application/webview_window_darwin.m
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: Fix compilation errors in windowSetLiquidGlass
- Add missing NSGlassEffectViewStyle enum definition
- Fix undefined tintColor variable by creating NSColor before use
- Add autorelease to prevent memory leaks for allocated views
These issues were causing CI build failures while working locally due to different compiler settings.
* Update Taskfile.yaml
* feat: Implement groupID and groupSpacing for NSGlassEffectView
- Add runtime detection for groupIdentifier/groupName selectors
- Apply groupID via performSelector if supported
- Apply groupSpacing via KVC if supported
- Parameters are now functional when NSGlassEffectView supports them
- Maintains backward compatibility by checking selector availability
* test: Add liquid-glass example to test suite
- Add liquid-glass to EXAMPLEDIRS in Taskfile.yaml
- Ensures the example is tested during CI builds
- Validates compilation on different platforms
Addresses review comment about missing test coverage
* fix: Correct NSGlassEffectView availability to macOS 26.0
- Update @available checks from macOS 15.0 to 26.0 for NSGlassEffectView
- NSGlassEffectView is a private API introduced in macOS 26.0
- Update README to reflect correct version requirement
- Keep NSVisualEffectMaterial checks at 15.0 as those are different APIs
* fix: Prevent exceptions from unsafe WebView reparenting
- Remove early WebView addition to glassView.contentView
- Consolidate all WebView reparenting in one safe location
- Always call removeFromSuperview before adding to new parent
- Set frame and autoresizing mask after safe reparenting
- Prevents NSInternalInconsistencyException from multiple parents
* fix: Make WebView reparenting more robust and thread-safe
- Always call removeFromSuperview before adding to new parent
- Remove brittle superview check, always detach and reattach
- Check both webView and glassContentView are non-nil before operations
- Ensure all UI operations run on main thread with dispatch_sync
- Set frame and autoresizing mask after safe reparenting
* Tidy up
* Update changelog
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: make options in update build-assets override
Before this fix, if `-config` was passed to `wails3 update
build-assets`, the values in the config file, even if they were empty,
would be used. Now, we only use the config file value if the value was
not passed in on the command line (or is the zero value or default value
for the option).
I'll be honest, I feel a little dirty about this implementation since
I had to copy string constants out of struct tags. Not very DRY of me.
That said, there was no obvious way to get the default value of a given
option. If I missed something, happy to have this corrected, but I've
tested it and it seems to be doing the things it should be doing.
* Update v3 changelog
* Fix SetBackgroundColour on Windows
Update Chromium window color on calls to SetBackgroundColour.
* update changelog
* v3.0.0-alpha.23
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Correct nfpm.yaml template package dependencies.
As is, the `nfpm.yaml` template pulls in `-dev` versions of the packages the built Wails application actually relies on, in addition to `build-essential`. Which will work, but is way overkill. This PR corrects this.
I have tested this on an Ubuntu 22.04 VM and a Rocky Linux 10 VM, *(which actually necessitated attaching the EPEL repository)* but I did not verify Arch beyond looking up packages.
Additionally, it appears that the package name for RPM distro family is not in tune with the rest of them, referring to an earlier version of webkit2gtk, which has also been corrected.
**P.S.** Could we supply our own templates or updatable build files pretty please?
* Addressing points brought up.
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* feat: Add Content Protection for Windows and macOS
- Prevents window contents from being captured by screen recording/sharing software
- Windows: Uses WDA_EXCLUDEFROMCAPTURE on Windows 10 2004+, falls back to WDA_MONITOR
- macOS: Uses NSWindowSharingType to set window as read-only for screen sharing
- Added ContentProtectionEnabled option to WebviewWindowOptions
- Added SetContentProtection() method for runtime control
- Added comprehensive documentation and example usage
* fix changelog.mdx
* Misc fixes
* Misc fixes
* Update v3/pkg/w32/user32.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Remove debug line
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix: v3-alpha WindowUnMinimise not fired when window is maximized ( Windows )
* add fix to changelog.mdx
* Apply suggestion from @coderabbitai[bot]
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* (docs) installation.mdx: update required Go version to 1.24
* (docs) update for Manager API Refactoring https://github.com/wailsapp/wails/pull/4359
* add entry in UNRELEASED_CHANGELOG.md to satisfy github actions
* thx coderabbitai
* thx coderabbitai
* ## Summary
I've successfully fixed the nil pointer dereference bug in the Wails v3 system tray functionality on Windows. Here's what I addressed:
**Root Cause**: The bug occurred in `systemtray_windows.go:80` where `*trayBounds = PhysicalToDipRect(*trayBounds)` was dereferencing a potentially nil pointer without checking.
**Fixes Applied**:
1. **`positionWindow` method (lines 80-82)**: Added nil check for `trayBounds` before dereferencing
2. **`bounds` method (lines 121-123, 129-131)**: Added checks for uninitialized `hwnd` and nil return from `GetSystrayBounds`
3. **`iconIsInTrayBounds` method (lines 147-149, 155-157, 160-162)**: Added similar protective checks and taskbar position validation
4. **`getScreen` method (lines 173-175)**: Added `hwnd` initialization check
5. **`openMenu` method (lines 45-47)**: Added nil check for `trayBounds`
**Key Improvements**:
- Added proper initialization checks for `s.hwnd == 0`
- Added nil pointer checks for all Windows API return values
- Ensured graceful error handling instead of panics
- Maintained existing functionality while preventing race conditions
The fix addresses the race condition where system tray operations could be called before the tray was fully initialized, preventing the nil pointer dereference panic described in issue #4456.
* Update changelog
* new events
* macOS dnd improvements
* wailsio adds for dropzone
* update example
* sorta working
the top 300px of the window are not dropabble for some reason i suspect it has to do with the drag enter/drag leave xy as the performOperation needed to use the ContentView for appropriate X/Y
* implement attribute detection for data-wails-dropzone
* docs
* pass x/y dnd linux
* cleanup exmample
* changelog
* pass all attributes to golang on dragdrop
* filetree example
* fix dnd build windows
* Fix windows dnd
* update docs
* remove debug log
* appease the security bot
* Fix changelog
* Fix changelog
* Revert "Fix event generation issues."
This reverts commit ae4ed4fe
* Fix events
* Fix merge conflicts. Fix events generation formatting
* Update docs
* Fix duplicate bundledassets import causing build failures
Remove duplicate import of bundledassets package that was causing
compilation errors in PR #4318. The import was declared twice in
the same import block, causing "bundledassets redeclared" errors.
Fixes build issues in GitHub Actions for drag-and-drop zones feature.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace fmt.Printf debug statements with globalApplication.debug
Replace all fmt.Printf debug logging statements in drag-and-drop
functionality with proper globalApplication.debug calls. This provides:
- Consistent logging with the rest of the application
- Proper key-value structured logging
- Better integration with the application's logging system
- Cleaner debug output format
Changes:
- application_darwin.go: Replace 2 fmt.Printf calls
- webview_window.go: Replace 6 fmt.Printf calls
- webview_window_windows.go: Replace 13 fmt.Printf calls
- Remove unused fmt import from application_darwin.go
All debug messages maintain the same information but now use
structured logging with key-value pairs instead of printf formatting.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add nil checks to WindowEventContext methods
Ensure all WindowEventContext methods properly handle nil c.data
by initializing the map when it's nil. This prevents panics when
methods are called on contexts that haven't been properly initialized.
Changes:
- DroppedFiles(): Add nil check and map initialization
- setCoordinates(): Add nil check and map initialization
- setDropZoneDetails(): Add nil check and map initialization
- DropZoneDetails(): Add nil check and map initialization
All methods now follow the same pattern as setDroppedFiles()
where a nil data map is automatically initialized to prevent
runtime panics during drag-and-drop operations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update v3/pkg/application/webview_window_darwin.m
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* reinstate events docs.
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix(application): handle error and type assertion in save file dialog
---------
Co-authored-by: hkhere <hk@tinyclouds.cn>
Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* fix(windows): disable external drag only when EnableDragAndDrop is set
* update changelog for html dnd fix
* remove redundant commented out code for windows dnd
* Fix changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Atterpac <89053530+atterpac@users.noreply.github.com>
* Adding the ability to pass custom args to windows webview2
---------
Co-authored-by: Jason Gibson <jason@harbingerinteractive.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* ## Summary
I have successfully implemented support for `allowsBackForwardNavigationGestures` in Wails v3. Here's what I accomplished:
### Investigation Results
- **Issue Status**: The feature was **NOT** previously implemented in Wails v3
- **go-webview2**: This library is Windows-only and doesn't provide macOS WKWebView features
- **Need**: A native implementation was required specifically for macOS WKWebView
### Implementation Details
1. **Added new option**: `AllowsBackForwardNavigationGestures u.Bool` to `MacWebviewPreferences`
2. **Extended C bridge**: Updated the C struct to pass the preference to Objective-C code
3. **Implemented WKWebView setting**: Added code to set `webView.allowsBackForwardNavigationGestures` during initialization
4. **Updated preference processing**: Extended the Go code to handle the new preference
### Key Files Modified
- `v3/pkg/application/webview_window_options.go`: Added the preference option
- `v3/pkg/application/webview_window_darwin.go`: Implemented the C bridge and WKWebView configuration
### Usage Example
```go
window.SetOptions(application.WebviewWindowOptions{
Mac: application.MacWindow{
WebviewPreferences: application.MacWebviewPreferences{
AllowsBackForwardNavigationGestures: u.True(),
},
},
})
```
### Testing
- ✅ Code compiles successfully
- ✅ Created working example demonstrating the feature
- ✅ Follows existing Wails v3 patterns and conventions
### Benefits
- Provides native macOS two-finger swipe navigation
- Better performance than JavaScript alternatives
- Maintains accessibility features
- Seamless integration with existing Wails v3 API
The implementation is ready for testing and could be submitted as a PR to the Wails repository. The feature addresses the exact requirements from GitHub issue #1857 and provides both specific and API-consistent access to WKWebView's navigation gesture functionality.
* Perfect! I have:
1. ✅ Removed the `NAVIGATION_GESTURES_FEATURE.md` file
2. ✅ Removed the `example_navigation_gestures.go` file
3. ✅ Updated the `UNRELEASED_CHANGELOG.md` with a FIX entry
The changelog entry properly documents that this fix adds support for `allowsBackForwardNavigationGestures` in macOS WKWebView to enable two-finger swipe navigation gestures, referencing issue #1857.
The implementation is now clean and ready, with only the essential code changes remaining and the changelog properly updated to reflect the fix.
* Fix: macOS disabled menu item callback issue
Fixes bug where menu items that are initially disabled do not fire
their OnClick callbacks after being enabled via SetEnabled(true).
Problem:
- When creating disabled menu items, actions were not set
- When re-enabling, targets were not properly restored based on action type
- This caused callbacks to never fire for initially-disabled items
Solution:
1. Always set action during menu item creation regardless of disabled state
2. Set appropriate targets based on action type and disabled state
3. Enhanced setMenuItemDisabled to restore correct targets when re-enabling:
- Custom callbacks (@selector(handleClick)): target = menuItem
- Role-based actions (system selectors): target = nil (responder chain)
This ensures that menu items with OnClick callbacks work correctly
regardless of their initial disabled state.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update changelog
* Update changelog
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: properly clean up Vite server when build fails
Ensures the Vite server process is terminated when a build fails
during 'wails3 dev', preventing port conflicts on subsequent runs.
Fixes#4403🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: add defer for watcher cleanup and tidy up returns
- Add defer cleanup() to ensure resources are always freed
- Remove manual cleanup in error path since defer handles it
- Simplify error handling for better maintainability
Addresses feedback on PR #4436
* fix: prevent channel deadlock in watcher cleanup
- Separate cleanup logic from channel notification
- cleanup() only stops the engine
- signalCleanup() handles both cleanup and channel notification
- Prevents deadlock when function exits normally
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add goModTidy function to clean up Go module dependencies during installation (#4283)
* Add goModTidy function and update changelog for automatic execution after wails init (#4283)
* Update CLI documentation to clarify bypassing 'go mod tidy' during project initialization (#4283)
* Add -skipgomodtidy flag to CLI and update installation logic to conditionally run go mod tidy
* Update CLI documentation to reflect default value of -skipgomodtidy flag and clean up code (#4283)
* Update docs/src/content/docs/guides/cli.mdx
* fix changelog
---------
Co-authored-by: Triadmoko Denny Fatrosa <triadmoko.fatrosa@codemi.co.id>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Add explicit base_ref checks to ensure the v3 build and test workflow
only runs for PRs targeting the v3-alpha branch.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix backtick command substitution error using here-document
- Add extra spacing before disclaimer section
- Simplify commit message to just version number
- Add comprehensive test files for release notes creation
- Add edge case testing for empty changelogs and comments
- Add documentation explaining how the feature works
- Verify all functionality works as expected