Skip to content

docs: fix custom protocol association documentation - #4825

Merged
leaanthony merged 5 commits into
v3-alphafrom
fix-custom-protocol-docs
Dec 26, 2025
Merged

leaanthony merged 5 commits into
v3-alphafrom
fix-custom-protocol-docs

Conversation

@leaanthony

@leaanthony leaanthony commented Dec 22, 2025 •

Copy link
Copy Markdown
Member

Summary

The custom protocol association documentation was incorrect. It referenced wails.json with JSON format when the actual configuration file is build/config.yml using YAML format.

Issues Fixed:

  • Config file reference changed from wails.json to build/config.yml
  • Format changed from JSON to YAML in all code examples
  • Structure corrected: protocols is at root level, not nested under info
  • Template variable references fixed from {{.Info.Protocols}} to {{.Protocols}}
  • Info.plist example updated to show actual generated format (wails.com.scheme)
  • Added note about running wails3 task common:update:build-assets after modifying protocols

Verification:

The documentation now matches the actual implementation found in:

  • v3/internal/commands/build-assets.go - YAML config parsing with protocols at root level
  • v3/examples/custom-protocol-example/build/config.yml - Working example showing correct format
  • v3/internal/commands/updatable_build_assets/*/ - Templates using {{.Protocols}}

Test plan

  • Verify documentation renders correctly
  • Confirm YAML examples are valid
  • Cross-reference with working example in v3/examples/custom-protocol-example/

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for registering custom protocols in MSIX packages so apps can be invoked via protocol links.
  • Documentation

    • Removed an outdated custom-protocol guide and consolidated protocol guidance into the distribution docs.
    • Added Universal Links / Web-to-App linking guidance for macOS and Windows, with updated platform-specific setup, testing, and troubleshooting.
    • Clarified build asset regeneration and URL launch event behavior across platforms.

✏️ Tip: You can customize this high-level summary in your review settings.

The documentation was incorrectly referencing `wails.json` with JSON format
when the actual configuration file is `build/config.yml` using YAML format.

Changes:
- Update config file reference from `wails.json` to `build/config.yml`
- Change format from JSON to YAML in code examples
- Fix structure: `protocols` is at root level, not nested under `info`
- Correct template variable references from `{{.Info.Protocols}}` to `{{.Protocols}}`
- Update Info.plist example to show actual generated format (`wails.com.scheme`)
- Add note about running `wails3 task common:update:build-assets` after changes
- Clean up redundant file path references in platform-specific sections

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

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

coderabbitai Bot commented Dec 22, 2025 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Deleted the legacy custom-protocol-association guide, consolidated and expanded custom-protocol documentation (including Windows MSIX App URI Handler and macOS Universal Links), and added MSIX manifest template support for declared protocols. No runtime API signatures were changed.

Changes

Cohort / File(s) Change Summary
Removed guide
docs/src/content/docs/guides/custom-protocol-association.mdx
Deleted the entire legacy custom protocol association guide (deep linking, platform asset generation, example handlers).
Consolidated/expanded docs
docs/src/content/docs/guides/distribution/custom-protocols.mdx
Added Windows MSIX App URI Handler / Web-to-App linking instructions, macOS Universal Links steps (entitlements, NSUserActivityTypes, apple-app-site-association), testing/troubleshooting expansions, and imported Aside component.
Changelog
v3/UNRELEASED_CHANGELOG.md
Added entries for MSIX custom protocol support and consolidation of custom protocol documentation with Universal Links.
MSIX manifest template
v3/internal/commands/build_assets/windows/msix/app_manifest.xml.tmpl
Added uap3 namespace and templated emission of protocol uap:Extension entries for each configured .Protocols item to register windows.protocol entries in the MSIX manifest.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Builder as Build system
participant Template as MSIX manifest template
participant Packager as MSIX packager
participant OS as Windows installer/OS
Note over Builder,Template: Build-time: protocols declared in config
Builder->>Template: Provide .Protocols data (scheme, description)
Template->>Template: Render uap:Extension entries for each protocol
Template->>Packager: Emit completed app_manifest.xml
Packager->>OS: Install MSIX with manifest (protocols registered)
OS->>App: Launches app when protocol URL is opened

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Documentation, Windows, v3-alpha, size:L

Poem

🐰
I nibbled through the docs with glee,
Old guide gone, new links set free,
MSIX whispers protocols true,
macOS paths tie web to you,
A happy rabbit hops—hooray and wee! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete. It lacks the required PR structure: no issue reference (Fixes #), no type of change checklist, no testing details, and no verification of the checklist items. Add 'Fixes #' reference, complete the type of change checkboxes, specify testing details with platform checkboxes, and update the changelog reference checkbox.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing the custom protocol association documentation to match the actual implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db19d5c and a38e2c7.

📒 Files selected for processing (3)
  • docs/src/content/docs/guides/distribution/custom-protocols.mdx
  • v3/UNRELEASED_CHANGELOG.md
  • v3/internal/commands/build_assets/windows/msix/app_manifest.xml.tmpl

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 22, 2025 •

Copy link
Copy Markdown

Deploying wails with  Cloudflare Pages  Cloudflare Pages

Latest commit: a38e2c7
Status:⚡️  Build in progress...

View logs

@leaanthony
leaanthony requested a review from atterpac December 22, 2025 09:07
@jamalsa

jamalsa commented Dec 22, 2025

Copy link
Copy Markdown

There are two custom protocol documentation:

The first one is not listed in the sidebar, but the second one is. Should the second one be removed and the first one added to the sidebar so it is easier to find?

leaanthony and others added 2 commits December 25, 2025 20:53
- Remove duplicate custom-protocol-association.mdx
- Add Universal Links section to macOS tab
- Add Web-to-App Linking section to Windows tab
- Keep the more comprehensive distribution/custom-protocols.mdx

Addresses review comment about duplicate documentation.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add uap3 namespace and protocol extension to MSIX template
- Protocols defined in build/config.yml are now automatically
  registered when building MSIX packages
- Update docs with MSIX section and clarify Web-to-App linking
  requires manual manifest configuration

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

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

@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 (4)
docs/src/content/docs/guides/distribution/custom-protocols.mdx (4)

162-162: Avoid Apple-specific terminology for Windows feature.

The heading "Universal Links (Web-to-App Linking)" uses "Universal Links," which is Apple-specific branding. This could confuse readers since this section is about Windows. Consider changing to just "Web-to-App Linking" or "App URI Handlers" to match Microsoft's terminology.

🔎 Suggested heading change
-#### Universal Links (Web-to-App Linking)
+#### Web-to-App Linking

169-175: Add context about XML namespace declaration.

The XML example uses the uap3: namespace prefix, but in a complete MSIX manifest this requires a corresponding xmlns:uap3 declaration in the root <Package> element. Consider adding a brief note that this snippet must be added to the <Extensions> section of a properly configured MSIX manifest.

💡 Example note to add
 1. **Add App URI Handler in your MSIX manifest**:
+   Add this extension to the `<Extensions>` section of your manifest (ensure `xmlns:uap3` is declared in the root `<Package>` element):
    ```xml

177-177: Clarify windows-app-web-link file format.

The documentation mentions hosting a windows-app-web-link file but doesn't describe its format or provide an example. Consider adding a brief note about the JSON structure or linking to the relevant section in the Microsoft documentation.


221-250: Well-documented macOS Universal Links section with one recommended addition.

The code-signing requirement is properly emphasized with the caution aside, and the XML examples are correct. The documentation link is current and accessible.

Add a brief note that the apple-app-site-association file must be served over HTTPS with a valid SSL certificate. This is a key requirement that developers commonly overlook, especially when testing locally or with self-signed certificates.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 060c71a and db19d5c.

📒 Files selected for processing (3)
  • docs/src/content/docs/guides/custom-protocol-association.mdx
  • docs/src/content/docs/guides/distribution/custom-protocols.mdx
  • v3/UNRELEASED_CHANGELOG.md
💤 Files with no reviewable changes (1)
  • docs/src/content/docs/guides/custom-protocol-association.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • v3/UNRELEASED_CHANGELOG.md
⏰ 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). (3)
  • GitHub Check: Analyze (go)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
docs/src/content/docs/guides/distribution/custom-protocols.mdx (2)

8-8: LGTM!

The Aside import is correctly added and used in the macOS Universal Links section below.


166-166: The Microsoft documentation link is accessible and current.

@leaanthony

Copy link
Copy Markdown
Member Author

There are two custom protocol documentation:

The first one is not listed in the sidebar, but the second one is. Should the second one be removed and the first one added to the sidebar so it is easier to find?

Good call out! Looks like the Universal links docs were added to an older document. Consolidated and added windows support.

@leaanthony
leaanthony merged commit ab33eb5 into v3-alpha Dec 26, 2025
9 of 12 checks passed
@leaanthony
leaanthony deleted the fix-custom-protocol-docs branch December 26, 2025 22:52
@sonarqubecloud

Copy link
Copy Markdown

Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
* docs: fix custom protocol association documentation

The documentation was incorrectly referencing `wails.json` with JSON format
when the actual configuration file is `build/config.yml` using YAML format.

Changes:
- Update config file reference from `wails.json` to `build/config.yml`
- Change format from JSON to YAML in code examples
- Fix structure: `protocols` is at root level, not nested under `info`
- Correct template variable references from `{{.Info.Protocols}}` to `{{.Protocols}}`
- Update Info.plist example to show actual generated format (`wails.com.scheme`)
- Add note about running `wails3 task common:update:build-assets` after changes
- Clean up redundant file path references in platform-specific sections

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

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

* docs: consolidate custom protocol docs and add Universal Links

- Remove duplicate custom-protocol-association.mdx
- Add Universal Links section to macOS tab
- Add Web-to-App Linking section to Windows tab
- Keep the more comprehensive distribution/custom-protocols.mdx

Addresses review comment about duplicate documentation.

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

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

* feat(windows): add custom protocol support to MSIX packaging

- Add uap3 namespace and protocol extension to MSIX template
- Protocols defined in build/config.yml are now automatically
  registered when building MSIX packages
- Update docs with MSIX section and clarify Web-to-App linking
  requires manual manifest configuration

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants