Skip to content

Port setup#1

Merged
leaanthony merged 12 commits into
masterfrom
Port-Setup
Dec 23, 2018
Merged

Port setup#1
leaanthony merged 12 commits into
masterfrom
Port-Setup

Conversation

@leaanthony

Copy link
Copy Markdown
Member

No description provided.

@leaanthony leaanthony merged commit 0bb1107 into master Dec 23, 2018
@leaanthony leaanthony deleted the Port-Setup branch December 23, 2018 06:40
leaanthony pushed a commit that referenced this pull request Jul 30, 2019
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 27, 2021

Copy link
Copy Markdown

Deploying wails with  Cloudflare Pages  Cloudflare Pages

Latest commit: 78261f4
Status:🚫  Build failed.

View logs

@PylotLight PylotLight mentioned this pull request Nov 3, 2023
leaanthony pushed a commit that referenced this pull request Nov 14, 2025
This commit adds a comprehensive reproduction example for two macOS-specific
window behavior bugs in Wails v3 alpha:

Issue #1: Window.hide() removes tray icon
- On macOS, calling Window.hide() causes both the window and system tray
  icon to disappear, making the application inaccessible
- Expected behavior (as seen on Windows): tray icon should remain visible
- Related to NSApplicationActivationPolicy handling on macOS Sequoia

Issue #2: ToggleMaximise white flicker
- On macOS with Frameless=true, maximizing shows a white flash before
  the dark content appears
- Very noticeable with dark backgrounds
- Caused by NSWindow's default white background during zoom animation

The example includes:
- main.go: Application entry point with window configuration
- app.go: Window management methods demonstrating both bugs
- frontend/dist/index.html: Interactive UI to test both issues
- README.md: Overview and quick start guide
- REPRODUCTION_STEPS.md: Detailed step-by-step reproduction instructions
- TECHNICAL_ANALYSIS.md: Deep technical analysis of root causes and solutions
- go.mod, package.json: Project configuration

Tested on: macOS Sequoia 15.5, Apple M4, Wails v3.0.0-alpha.36

References:
- Issue: #4650
- Investigation commits: 7b9cfa0, 9d6e894
leaanthony pushed a commit that referenced this pull request Nov 14, 2025
This test application demonstrates and validates the fixes for both
macOS window behavior issues reported in #4650:

Test Features:
- Issue #1 Testing: Hide/Show window controls with system tray
  verification. Uses ActivationPolicyAccessory to replicate the
  exact conditions from the original issue report.

- Issue #2 Testing: Maximize/Restore window controls with dark
  background (#1e1e1e) to make any white flicker clearly visible.

- Real-time status display showing window visibility and maximized state

- System tray integration with menu and click handlers

- Detailed testing instructions in both the UI and README

Usage:
  cd v3/examples/macos-issue-4650-test
  go run .

The application provides clear visual feedback and step-by-step
testing instructions for both issues, making it easy to verify
the fixes work correctly on macOS.

Related to #4650
leaanthony pushed a commit that referenced this pull request Nov 14, 2025
This commit adds a comprehensive reproduction example for two macOS-specific
window behavior bugs in Wails v3 alpha:

Issue #1: Window.Hide() removes tray icon
- On macOS, calling Window.Hide() causes both the window and system tray
  icon to disappear, making the application inaccessible
- Expected behavior (as seen on Windows): tray icon should remain visible
- Related to NSApplicationActivationPolicy (ActivationPolicyAccessory)
  handling on macOS Sequoia

Issue #2: ToggleMaximise white flicker
- On macOS with Frameless=true, maximizing shows a white flash before
  the dark content appears
- Very noticeable with dark backgrounds
- Caused by NSWindow's default white background during zoom animation

The example includes:
- main.go: Application with systray, frameless window, and AppService
- assets/index.html: Interactive UI to test both issues
- README.md: Documentation with issue details and reproduction steps

Configuration triggering the bugs:
- Frameless: true
- ActivationPolicy: ActivationPolicyAccessory
- BackgroundColour: dark (RGB 30, 30, 30)
- MacBackdrop: MacBackdropTranslucent

Tested on: macOS Sequoia 15.5, Apple M4, Wails v3.0.0-alpha.36+

References:
- Issue: #4650
- Investigation commits: 7b9cfa0, 9d6e894
Copilot AI added a commit that referenced this pull request Mar 24, 2026
In dev mode with Vite, loadOptionalScript('/wails/custom.js') was causing
a 'SyntaxError: Unexpected token' error because Vite's SPA fallback
returns HTTP 200 with index.html content (Content-Type: text/html) when
the file doesn't exist.

Fix #1 (defence-in-depth): Add Content-Type check in loadOptionalScript.
Only load the script if the server responds with a JavaScript content
type (application/javascript or text/javascript). Updated the TypeScript
source (index.ts) and both pre-built bundles (runtime.debug.js and
runtime.js).

Fix #2 (server-side): Add a 404 handler for /wails/custom.js in the
asset server middleware (application.go). This intercepts the request
before it reaches the Vite dev server SPA fallback. custom.js is only
meaningful in server mode, which has its own HTTP mux handler for it.

Co-authored-by: leaanthony <1943904+leaanthony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/wailsapp/wails/sessions/13291f55-6fb5-4e7d-8728-e4ed5f7f6f90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant