Commit graph

246 commits

Author SHA1 Message Date
Lea Anthony
0de429b8fc
feat(macos): add CollectionBehavior option to MacWindow (#4799)
* feat(macos): add CollectionBehavior option to MacWindow (#4756)

Add configurable NSWindowCollectionBehavior support for macOS windows,
allowing control over window behavior across Spaces and fullscreen.

New options include:
- MacWindowCollectionBehaviorCanJoinAllSpaces
- MacWindowCollectionBehaviorFullScreenAuxiliary
- MacWindowCollectionBehaviorMoveToActiveSpace
- And more...

This enables building Spotlight-like apps that appear on all Spaces
or overlay fullscreen applications.

Closes #4756

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Potential fix for code scanning alert no. 140: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 139: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat(examples): add spotlight example for CollectionBehavior

Demonstrates creating a Spotlight-like launcher window that:
- Appears on all macOS Spaces
- Floats above other windows
- Uses accessory activation policy (no Dock icon)
- Has frameless translucent design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(macos): support bitwise OR for CollectionBehavior options

Update CollectionBehavior to use actual NSWindowCollectionBehavior
bitmask values, allowing multiple behaviors to be combined:

```go
CollectionBehavior: application.MacWindowCollectionBehaviorCanJoinAllSpaces |
                    application.MacWindowCollectionBehaviorFullScreenAuxiliary,
```

Changes:
- Update Go constants to use actual bitmask values (1<<0, 1<<1, etc.)
- Simplify C function to pass through combined bitmask directly
- Add ParticipatesInCycle, IgnoresCycle, FullScreenDisallowsTiling options
- Update documentation with combined behavior examples
- Update spotlight example to demonstrate combining behaviors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-29 11:07:37 +11:00
Lea Anthony
efa82ec5f3 fix(ci): always run v3 tests for PRs targeting v3-alpha
Remove the paths filter that was causing v3 build and test jobs to be
skipped when PRs targeting v3-alpha didn't contain changes in the v3/
directory. This ensures all PRs to v3-alpha are properly tested.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 17:41:02 +11:00
Lea Anthony
7e21ce614a fix(docs): disable broken d2 diagram and fix installer 2025-11-24 21:33:15 +11:00
Lea Anthony
af2f054813 fix: Add path filters and fix env placement in docs workflow
- Add path filters to only trigger on docs/** changes
- Remove incorrectly placed GH_TOKEN env variable
- This should make the workflow trigger properly
2025-11-23 22:40:21 +11:00
Lea Anthony
c42b84f2e2 fix: Correct D2 binary path from ~/.local/bin to /usr/local/bin 2025-11-23 22:32:38 +11:00
Lea Anthony
11b63088fb fix: Update D2 installation in GitHub Actions workflow
- Use cp instead of mv to copy D2 binary
- Add version check to verify installation
- This should resolve the D2 installation failure
2025-11-23 21:32:16 +11:00
Lea Anthony
fc510586df fix: Add D2 installation to GitHub Pages workflow and remove temp dev file
- Install D2 binary in GitHub Actions before building docs
- Remove DEVELOPER_GUIDE.md temporary file from docs content
- This fixes the docs build failure on GitHub Pages
2025-11-23 21:28:46 +11:00
Ian VanSchooten
bbd5d99667
[v3] Typed Events, revisited (#4633)
* Add strong event typings

* Make `EmitEvent` take one data argument only

* Add event registration logic

* Report event cancellation to the emitter

* Prevent registration of system events

* Add support for typed event data initialisation

* Binding generation for events

* Tests for event bindings

* Add vite plugin for typed events

* Fix dev command execution order

Co-authored-by: Fabio Massaioli <fabio.massaioli@gmail.com>

* Propagate module path to templates

* Update templates

Co-authored-by: Ian VanSchooten <ian.vanschooten@gmail.com>

* Go mod tidy for examples

* Switch to tsconfig.json for jetbrains IDE support

* Replace jsconfig in example

* Convert vite plugin to typescript

* Downgrade vite for now

The templates all use 5.x

* Remove root plugins dir from npm files

It's now '/dist/plugins'

* Include types for Create

But keep out of the docs

* Assign a type for cancelAll results

* Restore variadic argument in EmitEvent methods

* Support registered events with void data

* Test cases for void alias support

* Support strict mode

* Support custom event hooks

* Update docs

* Update changelog

* Testdata for typed events

* Test data for void alias support

* fix webview_window emit event

* Update changelog.mdx

* Update events

* Fix generator test path normalization for cross-platform compatibility

The generator tests were failing on CI because they compared absolute file paths
in warning messages. These paths differ between development machines and CI environments.

Changes:
- Normalize file paths in warnings to be relative to testcases/ directory
- Handle both Unix and Windows path separators
- Use Unix line endings consistently in test output
- Update all test expectation files to use normalized paths

This ensures tests pass consistently across different environments including
Windows, macOS, Linux, and CI systems.

* Remove stale comment

* Handle errors returned from validation

* Restore variadic argument to Emit (fix bad rebase)

* Event emitters return a boolean

* Don't use `EmitEvent` in docs

Supposedly it's for internal use, according to comment

* Fix event docs (from rebase)

* Ensure all templates specify @wailsio/runtime: "latest"

* Fix Windows test failure due to CRLF line endings

The test was failing on Windows because:
1. Hardcoded "\n" was being used instead of render.Newline when writing
   warning logs, causing CRLF vs LF mismatch
2. The render package import was missing
3. .got.log files weren't being skipped when building expected file list

Changes:
- Add render package import
- Use render.Newline instead of hardcoded "\n" for cross-platform compatibility
- Skip .got.log files in test file walker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix template tests by using local runtime package

The template tests were failing because they were installing @wailsio/runtime@latest from npm, which doesn't have the new vite plugin yet. This change packs the local runtime and uses it in template tests instead.

Changes:
- Pack the runtime to a tarball in test_js job
- Upload the runtime package as an artifact
- Download and install the local runtime in template tests before building
- Update cleanup job to delete the runtime package artifact

* Apply suggestion from @leaanthony

* Fix: Install local runtime in frontend directory with correct path

The previous fix wasn't working because:
1. npm install was run in the project root, not in frontend/
2. wails3 build runs npm install again, which would reinstall from npm

Fixed by:
- Using npm pkg set to modify package.json to use file:// protocol
- This ensures subsequent npm install calls use the local tarball

* Fix Vue template syntax conflicts with Go template delimiters

The Vue templates were converted to .tmpl files to support dynamic module
paths, but Vue's template syntax {{ }} conflicts with Go's template syntax.

Fixed by escaping Vue template braces:
- {{ becomes {{"{{"}}
- }} becomes {{"}}"}}

This allows the Go template engine to output the literal {{ }} for Vue to process.

* Fix Vue template escaping and Windows shell compatibility

Two issues fixed:

1. Vue template escaping: Changed from {{"{{"}} to {{ "{{" }}
   - The previous syntax caused "missing value for command" error
   - Correct Go template syntax uses spaces between delimiters and strings

2. Windows PowerShell compatibility: Added 'shell: bash' to template generation step
   - The bash syntax (ls, head, $()) doesn't work in PowerShell
   - Git Bash is available on all GitHub runners including Windows

* Fix: test_templates depends on test_js for runtime package artifact

The runtime-package artifact is created in test_js job, not test_go.
Added test_js to the needs array so the artifact is available for download.

* Fix Windows path compatibility for runtime package artifact

Changed from absolute Unix path '/tmp/wails-runtime' to relative path
'wails-runtime-temp' which works cross-platform. Using realpath to
convert to absolute path for file:// URL in npm pkg set command.

* Fix realpath issue on Windows for runtime package

realpath on Windows Git Bash was producing malformed paths with duplicate
drive letters (D:\d\a\...). Replaced with portable solution using pwd
that works correctly across all platforms.

* Use pwd -W on Windows to get native Windows paths

Git Bash's pwd returns Unix-style paths (/d/a/wails/wails) which npm
then incorrectly resolves as D:/d/a/wails/wails. Using pwd -W returns
native Windows paths (D:\a\wails\wails) that npm can handle correctly.

This is the root cause of all the Windows path issues.

* Improve typechecking for Events.Emit()

* [docs] Clarify where `Events` is imported from in each example

* Add docs for runtime Events.Emit()

* Revert to v2-style Events.Emit (name, data)

* Update changelog

---------

Co-authored-by: Fabio Massaioli <fabio.massaioli@gmail.com>
Co-authored-by: Atterpac <Capretta.Michael@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-11 20:25:57 +11:00
Lea Anthony
3d1dc86079 Fix commit of npm package changes 2025-09-28 08:00:42 +10:00
Lea Anthony
cb76ef8c60 Bump npm version and fix pipeline 2025-09-28 07:50:55 +10:00
Lea Anthony
c6f6b0d054 Update nightly release script 2025-09-25 14:03:59 +10:00
Riad Afridi Shibly
da9fd9690d
fix: v3-alpha wails3 cli installation path (#4597)
* fix: v3-alpha wails3 cli installation path

* Update Changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-09-24 05:45:49 +00:00
Copilot
89ef7f7c55
Fix v3 release pipeline: correct git operation order to prevent version lag (#4546)
* Initial plan

* Fix v3 release pipeline: reorder git operations and add missing trigger workflow

Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>

* Potential fix for code scanning alert no. 159: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-09-02 20:39:21 +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
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
c2f25131d7
Fix YAML syntax error - indent heredoc content 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
6dc51420ac
Update release workflow 2025-07-25 21:56:28 +10:00
Lea Anthony
9d6e6232d6
v3.0.0-alpha.14 2025-07-25 19:36:50 +10:00
Lea Anthony
9f2b992d36
Update changelog-validation-v3.yml 2025-07-25 07:43:59 +10:00
Lea Anthony
4e2a3505bb
Update pull_request_template.md 2025-07-19 16:55:32 +10:00
Lea Anthony
fd89187c2f fix: remove branch restriction from nightly workflow job
The workflow now explicitly checks out v3-alpha branch, so the job-level
condition 'if: github.ref == refs/heads/v3-alpha' is no longer needed
and was preventing manual runs from other branches.
2025-07-18 14:44:12 +10:00
Lea Anthony
7a71836224 fix: explicitly checkout v3-alpha branch in nightly workflow
Ensures the workflow always checks out the v3-alpha branch regardless
of which branch triggers it (schedule from master or manual dispatch)
2025-07-17 06:59:29 +10:00
Lea Anthony
23e1f8923c Nightly release action 2025-07-17 06:28:19 +10:00
Lea Anthony
fb8f12aca9 Add minimal changelog workflow for testing 2025-07-13 11:04:37 +10:00
Lea Anthony
9668e348d8 Add simple test workflow to verify GitHub Actions recognition 2025-07-13 10:58:52 +10:00
Lea Anthony
b029a84fe4 Clean up changelog validation - single working workflow
Remove all test files, extra workflows, and artifacts.
Keep only:
- changelog-validation-v3.yml (main workflow)
- v3/scripts/validate-changelog.go (validation script)

Tested and working with act.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:55:04 +10:00
Lea Anthony
4532b625c9 Clean up changelog validation workflows
- Remove problematic large workflow files
- Add final clean 'Changelog Validation (v3)' workflow
- Tested and working with act
- Uses external Go script for maintainability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:53:09 +10:00
Lea Anthony
50fe8cb855 Add test workflow to verify changelog validation works
Successfully tested with act - validation script and PR diff detection working

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:37:04 +10:00
Lea Anthony
425c3469b2 Add clean v3 changelog validation workflow with external Go script
- Created external Go validation script in v3/scripts/
- Clean workflow file without embedded scripts (much smaller)
- Should properly show workflow_dispatch trigger in GitHub

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:33:00 +10:00
Lea Anthony
6a91656914 Add simplified v3 changelog validation workflow for testing
Testing if GitHub Actions accepts smaller workflow files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:23:46 +10:00
Lea Anthony
a3affdc963 Fix YAML multiline commit message - simplify to single line
Fixed line 422 YAML syntax error by using single-line commit message
Verified working with act dry-run test

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:17:18 +10:00
Lea Anthony
b8fdee2a3a Fix all YAML syntax errors in v3-check-changelog workflow
- Fixed multiline commit message formatting
- Fixed JavaScript template literals in GitHub Actions script sections
- Verified with act dry-run test

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:14:38 +10:00
Lea Anthony
cad1fae3e4 Fix YAML syntax error in v3-check-changelog workflow
Fixed multiline commit message using HEREDOC syntax on line 421

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:13:02 +10:00
Lea Anthony
52cd0d4cc7 Add v3 changelog validation workflow
This workflow validates changelog entries in PRs targeting v3-alpha branch:
- Detects entries added to already-released versions using diff analysis
- Automatically moves misplaced entries to [Unreleased] section
- Uses proper ### Category format for Keep a Changelog compliance
- Commits fixes back to PR with clear feedback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 10:11:01 +10:00
Lea Anthony
a25ea74d5c chore: Changelog checker 2025-07-13 09:57:57 +10:00
Lea Anthony
0bb90b421f fix: correct workflow schedule syntax 2025-07-06 11:19:16 +10:00
Lea Anthony
859e843d02 Add complete automated release workflow
- Detects changes in v2 and v3-alpha branches independently
- Runs release scripts and extracts changelog notes
- Creates GitHub releases with proper tags and release notes
- Supports dry-run mode for testing
- Authorization controls for release permissions
- Comprehensive change detection and summary reporting
- Currently disabled (no schedule) for safety
2025-07-06 09:50:45 +10:00
Lea Anthony
9b0c653948 Add test workflow for nightly releases
- Created test-nightly-releases.yml for safe testing
- Added local test scripts for changelog extraction and version logic
- Updated nightly-releases.yml with changelog integration
- Ready for dry-run testing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-06 06:59:28 +10:00
Lea Anthony
0fc13fee63 fix: restrict v3 workflow to only v3-alpha PRs with v3 changes
Add path filter to ensure Build + Test v3 workflow only runs on
PRs targeting v3-alpha branch that actually modify v3/ directory.
This prevents the workflow from running on master branch PRs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-02 20:24:58 +10:00
Lea Anthony
01ed7affc9
Update semgrep runner (#4356)
* Update semgrep workflow

---------

Co-authored-by: joshhardy <joshhardy@users.noreply.github.com>
2025-06-16 22:11:32 +10:00
Lea Anthony
2c99f9e43c
Update go test workflow 2025-05-31 07:52:19 +10:00
Lea Anthony
371e05cb1f
fix: Correct indentation for build_results job in build-and-test-v3.yml (must be under jobs:) 2025-05-31 07:37:34 +10:00
Lea Anthony
471ea9350b
Update workflows 2025-05-31 07:11:22 +10:00
Lea Anthony
323327b53f
Fix v3 workflow
(cherry picked from commit d3d87d09aa)
2025-05-30 08:22:19 +10:00
Lea Anthony
3716acaae4
Fix permissions issue for labeller 2025-05-15 06:35:41 +10:00
Lea Anthony
fe4e6c766b
More workflow updates
(cherry picked from commit 0c24aa4313)
2025-05-15 06:26:45 +10:00
Lea Anthony
44fcdf9ad7
Increase stale workflow operations limit 2025-05-14 20:55:08 +10:00
Lea Anthony
582ad826b8
Add GitHub Actions workflow for stale issue management 2025-05-14 20:53:27 +10:00