Commit graph

5,186 commits

Author SHA1 Message Date
github-actions[bot]
47af2d2d48 v3.0.0-alpha.24 2025-08-13 02:39:39 +00:00
Lea Anthony
fb664a7c48
[v3] Sanitise browser URL (#4500) v3.0.0-alpha.24
* Sanitise the browser urls!
2025-08-12 21:20:36 +10:00
Aldrich Asuncion
b7414a4303
[v3] Fix SetBackgroundColour on Windows (#4492)
* 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>
2025-08-12 20:45:24 +10:00
github-actions[bot]
fdff7e7b21 v3.0.0-alpha.22 2025-08-10 02:50:53 +00:00
Lea Anthony
bf805b4152
Update CLI to pass through variables (#4488) v3.0.0-alpha.22
* feat: Update CLI to pass parameters through to Task commands

- Modified build and package commands to accept otherArgs parameter
- Updated task wrapper to forward CLI variables to Task
- Enhanced task.go to properly parse and handle CLI variables (KEY=VALUE format)
- Fixes issue where 'wails3 build' and 'wails3 package' commands weren't forwarding parameters

Fixes #4422

* Update changelog

* Apply suggestion from @coderabbitai[bot]

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix cli.mdx

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-09 21:44:30 +10:00
Eugene Medvedev
c2ba85663f
Correct nfpm.yaml template package dependencies. (#4481)
* 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>
2025-08-09 18:29:31 +10:00
Lea Anthony
3f11d4e3fa
feat: Add Content Protection for Windows and macOS (#4485)
* 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>
2025-08-09 17:12:39 +10:00
Lea Anthony
fe717c42b5
Refactor to using Window interface (#4471)
Refactor window interface to eliminate type assertions and improve code maintainability
2025-08-09 15:28:08 +10:00
github-actions[bot]
1a03404983 v3.0.0-alpha.21 2025-08-07 02:49:31 +00:00
COD3HUNT3R
b3c01f4c67
[v3] fix linux .desktop file appicon variable (#4477) v3.0.0-alpha.21
* [v3] fix linux .desktop file appicon variable

* Update UNRELEASED_CHANGELOG.md

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-08-06 22:03:25 +10:00
Oussama Sethoum
26a18ef7a0
[v3] Fix WindowUnMinised event not fired when the window was Maxmised on Windows platform. (#4478)
* 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>
2025-08-06 22:00:56 +10:00
github-actions[bot]
69929c2c37 v3.0.0-alpha.20 2025-08-06 02:49:12 +00:00
Yules
c02ba8f5d6
[v3] update docs to reflect changes from Manager API Refactoring (#4476) v3.0.0-alpha.20
* (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
2025-08-05 23:59:45 +10:00
github-actions[bot]
1cf9042063 v3.0.0-alpha.19 2025-08-05 02:50:29 +00:00
Lea Anthony
d863e525e3
Fix Windows crash bug (#4460) v3.0.0-alpha.19
* ## 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
2025-08-04 20:45:01 +10:00
Atterpac
10447e6fcd
[V3] Drag-n-Drop Zones and improvements (#4318)
* 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>
2025-08-04 20:40:19 +10:00
hkhere
ca449a7706
[V3] Windows: fix(application): handle error and type assertion in save file dialog (#4284)
* 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>
2025-08-04 19:57:53 +10:00
mbaklor
9fe9c6647e
[V3] windows: fix html drag and drop (#4259)
* 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>
2025-08-04 19:29:47 +10:00
github-actions[bot]
1227f140b7 v3.0.0-alpha.18 2025-08-03 02:53:39 +00:00
Hudolus
4c70d4501e
Custom Windows Webview2 Args (#4467) v3.0.0-alpha.18
* 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>
2025-08-02 21:03:41 +10:00
Lea Anthony
ed81ab01e7
Support allowsBackForwardNavigationGestures (#4453)
* ## 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.
2025-08-02 21:02:52 +10:00
Lea Anthony
a9222b538d
Fix: Disabled menu item callback (#4469)
* 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>
2025-08-02 20:22:09 +10:00
Lea Anthony
b0871c19e1
[v3] Fix: Vite server not cleaned up when build fails (#4436)
* 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>
2025-08-02 17:48:01 +10:00
Lea Anthony
55277fd695
feature: V3 alpha feature/snapassist support (#4463)
* initial implementation

* Push missed files

* linux fix

* Update changelog, runtime and docs.
2025-08-02 16:59:49 +10:00
TDF
6539c80ba2
Add goModTidy function to clean up Go module dependencies during inst… (#4286)
* 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>
2025-08-02 15:51:30 +10:00
Lea Anthony
68c14d711b Prevent v3 workflow from running on PRs against master
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>
2025-08-02 14:03:23 +10:00
github-actions[bot]
afcdb15503 v3.0.0-alpha.17 2025-07-31 02:48:09 +00:00
Zach Botterman
48e3bd3dd4
[v3] bugfix/windows linux notifications (#4450) v3.0.0-alpha.17
* fix windows encoding

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-07-30 12:40:58 +00:00
Lea Anthony
8d999ba34d Fix pipeline error
https://github.com/wailsapp/wails/actions/runs/16568203492/job/46853333131?pr=4446
2025-07-28 22:15:09 +10:00
Lea Anthony
5f1c2ff6dc Fix pipelines compile error 2025-07-28 21:34:57 +10:00
Lea Anthony
d9a003b56c
Merge and remove test release files 2025-07-26 08:26:56 +10:00
Lea Anthony
4721add9b8
Remove test release-notes.txt file 2025-07-26 08:21:14 +10:00
github-actions[bot]
09e71d82b5 v3.0.0-alpha.16 2025-07-25 22:17:30 +00:00
Lea Anthony
c2f25131d7
Fix YAML syntax error - indent heredoc content v3.0.0-alpha.16 2025-07-26 08:15:03 +10:00
Lea Anthony
a412b70be5
Fix nightly release workflow issues
- Fix backtick command substitution error using here-document
- Add extra spacing before disclaimer section
- Simplify commit message to just version number
2025-07-26 08:13:20 +10:00
Lea Anthony
81d1459b68
Add tests and documentation for --create-release-notes flag
- 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
2025-07-26 07:55:23 +10:00
Lea Anthony
db5b0dcd4b
Add --create-release-notes flag to release script 2025-07-26 07:45:37 +10:00
Lea Anthony
67058c0923
Fix UNRELEASED_CHANGELOG.md path in release script
The file is located at v3/UNRELEASED_CHANGELOG.md, not at the repository root
2025-07-25 22:03:26 +10:00
Lea Anthony
6dc51420ac
Update release workflow 2025-07-25 21:56:28 +10:00
github-actions[bot]
7bd1b4911c 🤖 Automated nightly release v3.0.0-alpha.15
Generated with [Claude Code](https://claude.ai/code)

    Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 11:47:24 +00:00
ALMAS
33a9c05213
[V3] feat: add Windows getAccentColor implementation (#4427) v3.0.0-alpha.15
* [V3] feat: add Windows getAccentColor implementation

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-07-25 21:46:05 +10:00
Lea Anthony
9d6e6232d6
v3.0.0-alpha.14 2025-07-25 19:36:50 +10:00
Zach Botterman
23bf36d36f
[v3] improve service names for js/ts bindings (#4405) v3.0.0-alpha.13 v3.0.0-alpha.14
* name services

* update badge service with new app api

* update examples

* add dist dirs

* update changelog

* fix up examples

* Fix changelog

---------

Co-authored-by: Zach <zach@Zachs-MacBook-Pro-2.local>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-07-25 09:23:22 +10:00
Lea Anthony
906cd7003d
Fix TS error in runtime 2025-07-25 08:24:01 +10:00
Lea Anthony
f8e4eeb405
Fix build 2025-07-25 07:49:13 +10:00
Lea Anthony
9f2b992d36
Update changelog-validation-v3.yml 2025-07-25 07:43:59 +10:00
Lea Anthony
c08d2d72c3
Fix build 2025-07-25 07:31:29 +10:00
Lea Anthony
bf762699bd
Dark mode menus changelog 2025-07-25 06:41:28 +10:00
Lea Anthony
a29b4f0861
feat: Add full dark mode support for Windows menus 2025-07-25 06:31:46 +10:00
Atterpac
b5ef00fd42
Merge pull request #4289 from atterpac/v3/deeplink
V3 Deep-link (Port of v2 feature)
2025-07-23 15:24:59 -06:00