-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[V3] Badging #4234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[V3] Badging #4234
Conversation
WalkthroughThis change introduces a comprehensive cross-platform badge service for desktop applications, adding both backend and frontend support. A new badge service is implemented for macOS and Windows, enabling applications to display badges on their dock or taskbar icons. The service is exposed via a clean interface and integrates with platform-specific APIs. Extensive documentation and example projects are provided, including build scripts, configuration files, frontend assets, and packaging support for macOS, Windows, and Linux. The changelog is updated to reflect these changes. No existing exported or public entities are modified. Changes
Sequence Diagram(s)sequenceDiagram
participant Frontend
participant Backend (Wails App)
participant BadgeService
participant PlatformBadge (macOS/Windows)
Frontend->>Backend (Wails App): SetBadge(label)
Backend (Wails App)->>BadgeService: SetBadge(label)
BadgeService->>PlatformBadge: SetBadge(label)
PlatformBadge-->>BadgeService: (Platform-specific badge set)
BadgeService-->>Backend (Wails App): (ack)
Backend (Wails App)-->>Frontend: (ack)
Frontend->>Backend (Wails App): RemoveBadge()
Backend (Wails App)->>BadgeService: RemoveBadge()
BadgeService->>PlatformBadge: RemoveBadge()
PlatformBadge-->>BadgeService: (Platform-specific badge removed)
BadgeService-->>Backend (Wails App): (ack)
Backend (Wails App)-->>Frontend: (ack)
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 12
🔭 Outside diff range comments (2)
v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseResolver.html (1)
64-64
: 💡 Verification agent🧩 Analysis chain
Source link updated to forked repository
The “Defined in” reference now correctly points tohttps://github.com/popaprozac/wails
instead ofwailsapp/wails
, matching the project’s new hosting location.To be certain no other generated docs still reference the old URL, you can run:
🏁 Script executed:
#!/bin/bash # Search all HTML docs for any lingering wailsapp/wails links rg -n "wailsapp/wails" -g "*.html"Length of output: 66090
Remaining HTML references to the old repo must be updated
Our search uncovered multiple generated HTML files still importing or linking togithub.com/wailsapp/wails
. These need to point to your fork (github.com/popaprozac/wails
) as well:
- v3/examples/services/assets/index.html (lines 9–12)
- v3/examples/cancel-async/assets/index.html (line 87)
- v3/examples/cancel-chaining/assets/index.html (line 87)
- v3/examples/binding/assets/index.html (lines 85–86)
- docs/src/assets/contributors.html (many
wailsapp/wails
links)Please update those occurrences (e.g. via a bulk replace or by patching the docs generator), then re-run:
rg -n "github.com/wailsapp/wails" -g "*.html"to verify all references now use
github.com/popaprozac/wails
.v3/examples/badge/README.md (1)
1-60
: 🛠️ Refactor suggestionImprove README with badge-specific information and formatting fixes
The README provides good general guidance for Wails3 projects but doesn't mention the badge functionality this example demonstrates.
Recommended improvements:
- Add a section explaining the badge feature and how it works on different platforms
- Specify languages in code blocks for better syntax highlighting
- Add sample screenshots showing badges on Windows and macOS
-# Welcome to Your New Wails3 Project! +# Badge Example for Wails3 -Congratulations on generating your Wails3 application! This README will guide you through the next steps to get your project up and running. +This example demonstrates how to use the badge feature in Wails3 to display notification badges on your application icon in the Windows taskbar and macOS dock. +## Badge Functionality + +- **Windows**: Displays an overlay icon on the taskbar +- **macOS**: Shows a badge on the dock icon + +See the badge in action by running the example and using the UI controls to set and clear badges. ## Getting Started 1. Navigate to your project directory in the terminal. 2. To run your application in development mode, use the following command: - ``` + ```bash wails3 dev ``` This will start your application and enable hot-reloading for both frontend and backend changes. 3. To build your application for production, use: - ``` + ```bash wails3 build ``` This will create a production-ready executable in the `build` directory.🧰 Tools
🪛 LanguageTool
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: -frontend/
: Contains your frontend code (HTML, CSS,...(UNLIKELY_OPENING_PUNCTUATION)
[style] ~59-~59: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2020 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...(EN_EXCESSIVE_EXCLAMATION)
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
♻️ Duplicate comments (1)
v3/examples/badge/build/linux/Taskfile.yml (1)
23-26
: 🛠️ Refactor suggestionSame missing default for
ARCH
as in Windows TaskfilePlease add an explicit fallback (
amd64
) to avoid emptyGOARCH
when the variable is unset.
🧹 Nitpick comments (28)
v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.SaveFile.html (1)
4-4
: Updated repository reference in source link
The<aside>
now correctly points to the forkedpopaprozac/wails
repository instead of the originalwailsapp/wails
.Consider updating your TypeDoc configuration (e.g.
sourceBaseUrl
orsourceLinkTemplate
) to automate these source‐link updates across all generated docs, rather than editing HTML output manually.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html (1)
1-34
: Consider switching to relative or templated source links.
Manually regenerating docs for a forked repository URL adds maintenance overhead. You could configure TypeDoc’ssourceLink
plugin to use a repository‐agnostic base URL or relative paths, so future repo migrations (or forks) won’t require a full docs regen.v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelError.html (2)
5-5
: Remove redundant empty comment wrapper
The inserted<div class="tsd-comment tsd-typography"></div>
at the end of the comment panel is empty and does not render any content. It can be safely removed to reduce HTML noise. Ideally, update the TypeDoc template or generation script to avoid emitting empty comment blocks.@@ -1, +1 @@ -</div><div class="tsd-comment tsd-typography"></div></section> +</div></section>
13-13
: Eliminate extraneous placeholder comment block
Similar to the above, this empty<div class="tsd-comment tsd-typography"></div>
under the parameter section adds no value. Removing it will clean up the generated HTML.@@ -1, +1 @@ -</div><div class="tsd-comment tsd-typography"></div></li> +</div></li>v3/examples/badge/build/linux/nfpm/scripts/preremove.sh (1)
1-2
: Empty pre-removal script: consider adding instructions or removing file
Thispreremove.sh
is currently empty except for the shebang. If no pre-removal steps are required, you can either remove this script or add a clarifying comment (e.g.,# No-op
) to indicate intentional no-op behavior.v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh (1)
1-2
: Empty pre-installation script: clarify use or remove
Similar topreremove.sh
, this script currently contains only a shebang. Consider adding a no-op comment, implementing necessary pre-install steps, or removing the file if it’s not needed.v3/examples/badge/build/linux/nfpm/scripts/postremove.sh (1)
1-2
: Add documentation to clarify script purpose.This post-removal script is currently empty. While this may be intentional if no post-removal actions are needed, it would be helpful to add a comment explaining the script's purpose and why it's empty.
#!/bin/bash + +# Post-removal script for the badge example app +# Currently no actions are needed after package removalv3/examples/badge/build/linux/nfpm/scripts/postinstall.sh (1)
1-2
: Add documentation to clarify script purpose.This post-installation script is currently empty. While this may be intentional if no post-installation actions are needed, it would be helpful to add a comment explaining the script's purpose and why it's empty.
#!/bin/bash + +# Post-installation script for the badge example app +# Currently no actions are needed after package installationv3/examples/badge/frontend/src/main.ts (2)
9-12
: Remove redundant type assertion and validate input.The code has a redundant type assertion for
labelElement
since it's already typed. Also, consider validating the input value before setting the badge.setButton.addEventListener('click', () => { - let label = (labelElement as HTMLInputElement).value - SetBadge(label); + let label = labelElement.value.trim(); + if (label) { + SetBadge(label); + } else { + console.warn('Empty badge label provided'); + } });
18-20
: Consider error handling for the time event data.The code directly sets the event data to the element's innerText without validation. Consider adding error handling to ensure the data exists and is in the expected format.
Events.On('time', (time: {data: any}) => { - timeElement.innerText = time.data; + if (time && time.data !== undefined) { + timeElement.innerText = String(time.data); + } else { + console.warn('Received invalid time data', time); + } });v3/examples/badge/build/windows/info.json (1)
8-12
: Replace placeholder metadata with real values.The Windows resource metadata uses generic placeholders like
"My Company"
and"My Product"
. For an illustrative example, update these fields to match the badge demo (e.g.,"Wails Badge Example"
). For example:- "CompanyName": "My Company", - "FileDescription": "My Product Description", - "LegalCopyright": "© now, My Company", - "ProductName": "My Product", + "CompanyName": "Wails Badge Example", + "FileDescription": "Demo application showcasing Wails badge API", + "LegalCopyright": "© 2025 Wails Badge Example", + "ProductName": "Wails Badge Example",v3/examples/badge/frontend/package.json (2)
4-4
: Align frontend version with example.Using
"version": "0.0.0"
is valid for local examples, but consider bumping to a more meaningful version ("0.1.0"
) to match your backend and example AppImage versioning.
16-16
: Pin@wailsio/runtime
to a specific semver range.Relying on
"latest"
can introduce breaking changes unexpectedly. Consider using a fixed version, for example:- "@wailsio/runtime": "latest" + "@wailsio/runtime": "^3.0.0"v3/examples/badge/frontend/index.html (3)
8-8
: Customize document title for badge example.The
<title>
is still"Wails App"
. Update it to reflect the badge demo:- <title>Wails App</title> + <title>Wails Badge Example</title>
20-20
: Update heading to clarify purpose.Change the
<h1>
from a generic label to something like:- <h1>Wails + Typescript</h1> + <h1>Wails Badge Demo</h1>
23-26
: Add accessible label for badge input.For improved accessibility, wrap the input in a
<label>
or addaria-label
. Example:- <div class="input-box" id="input"> - <input class="input" id="label" type="text" autocomplete="off"/> + <div class="input-box" id="input"> + <label for="label" class="visually-hidden">Badge Label</label> + <input class="input" id="label" type="text" autocomplete="off" aria-label="Badge Label"/>v3/examples/badge/build/linux/appimage/build.sh (1)
34-35
: Clean up downloaded AppImage after packaging.Remove the
linuxdeploy-*.AppImage
file once the AppImage is created to avoid clutter:mv "${APP_NAME}*.AppImage" "${APP_NAME}.AppImage" + rm -f linuxdeploy-*.AppImage
v3/examples/badge/main.go (2)
4-6
: Remove redundant import statementThe
_ "embed"
import on line 5 is redundant since"embed"
is already imported directly on line 4.import ( "embed" - _ "embed" "log" "time"
62-68
: Consider demonstrating badge functionality in time event loopThe example emits a "time" event every second, but it doesn't demonstrate setting or updating a badge. Consider enhancing the example by adding badge updates based on time or counters.
go func() { + counter := 0 for { now := time.Now().Format(time.RFC1123) app.EmitEvent("time", now) + // Demonstrate badge update every 5 seconds + counter++ + if counter % 5 == 0 { + // Get the badge service + badgeService := app.Services.GetService[*badge.Service]() + // Set the badge with the counter value + badgeService.SetBadge(fmt.Sprintf("%d", counter/5)) + } time.Sleep(time.Second) } }()This would require adding
"fmt"
to your imports.v3/examples/badge/build/linux/nfpm/nfpm.yaml (1)
31-50
: Uncomment relevant package scripts sectionsThe commented scripts section could be useful for the badge feature if there are any platform-specific setup or cleanup requirements. Consider uncommenting and implementing relevant scripts.
-# scripts: -# preinstall: ./build/linux/nfpm/scripts/preinstall.sh -# postinstall: ./build/linux/nfpm/scripts/postinstall.sh -# preremove: ./build/linux/nfpm/scripts/preremove.sh -# postremove: ./build/linux/nfpm/scripts/postremove.sh +scripts: + preinstall: ./build/linux/nfpm/scripts/preinstall.sh + postinstall: ./build/linux/nfpm/scripts/postinstall.sh + preremove: ./build/linux/nfpm/scripts/preremove.sh + postremove: ./build/linux/nfpm/scripts/postremove.shAlso, you should uncomment and update the
depends
section if there are any Linux-specific dependencies required for the badge functionality.v3/examples/badge/build/darwin/Info.dev.plist (2)
6-7
: Placeholders should be customized for the example.
TheCFBundleName
,CFBundleGetInfoString
, andNSHumanReadableCopyright
values
("My Product"
,"This is a comment"
,"© now, My Company"
) appear to be generic placeholders.
Please replace them with meaningful values reflecting thebadge
example (e.g.,"Badge Example"
,
a descriptive info string, and accurate copyright).Also applies to: 14-15, 24-25
26-30
: Indentation consistency in the NSAppTransportSecurity block.
The<dict>
and its children underNSAppTransportSecurity
are not indented to match the rest of the file.
For readability, align nested elements (e.g., use 12 spaces for the<dict>
and its contents).v3/examples/badge/build/darwin/Info.plist (2)
6-7
: Customize placeholder metadata.
As with the dev plist, theCFBundleName
,CFBundleGetInfoString
, andNSHumanReadableCopyright
entries
are generic. Update these to reflect the actual badge example’s application name, info string, and copyright.Also applies to: 14-15, 24-25
26-27
: Consider adding NSAppTransportSecurity if needed.
The development plist explicitly allows local networking viaNSAppTransportSecurity
.
If the production build requires similar permissions (e.g., remote asset fetching, debugging),
you may want to include that block here as well.v3/examples/badge/build/config.yml (1)
63-63
: Missing newline at end of file.Add a newline character at the end of the file to follow YAML best practices and fix the static analysis warning.
- name: My Other Data +
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
v3/examples/badge/build/Taskfile.yml (1)
52-55
:generate:bindings
input list excludes the entire frontendThe exclusion rule
frontend/**/*
removes all TS/JS files underfrontend
, yet those are the ones that typically import the generated bindings and should trigger regeneration. If the goal was only to exclude thefrontend/bindings
sub-folder, narrow the pattern:- - exclude: frontend/**/* + - exclude: frontend/bindings/**/*v3/examples/badge/build/linux/Taskfile.yml (1)
109-115
: Unused variableOUTPUTFILE
OUTPUTFILE
is declared but never interpolated. Either remove it or pass it to the-outputfile
flag to keep the task declarative and self-documenting.v3/examples/badge/build/windows/nsis/wails_tools.nsh (1)
145-176
: Handle WebView2 bootstrapper failure
ExecWait
ignores the exit code ofMicrosoftEdgeWebview2Setup.exe
. If the runtime fails to install (e.g., offline machine), the installer still reports success and the resulting app crashes on first run. Capture and validate the exit status:- ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install' + ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install' $0 + ${If} $0 != 0 + MessageBox MB_OK|MB_ICONSTOP "WebView2 Runtime installation failed (error $0). Please install it manually and re-run the setup." + Quit + ${EndIf}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
v3/examples/badge/build/appicon.png
is excluded by!**/*.png
v3/examples/badge/build/windows/icon.ico
is excluded by!**/*.ico
v3/examples/badge/frontend/public/Inter-Medium.ttf
is excluded by!**/*.ttf
v3/examples/badge/frontend/public/typescript.svg
is excluded by!**/*.svg
v3/examples/badge/frontend/public/wails.png
is excluded by!**/*.png
v3/internal/runtime/desktop/@wailsio/runtime/package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (91)
docs/src/content/docs/changelog.mdx
(2 hunks)docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/examples/badge/README.md
(1 hunks)v3/examples/badge/Taskfile.yml
(1 hunks)v3/examples/badge/build/Taskfile.yml
(1 hunks)v3/examples/badge/build/config.yml
(1 hunks)v3/examples/badge/build/darwin/Info.dev.plist
(1 hunks)v3/examples/badge/build/darwin/Info.plist
(1 hunks)v3/examples/badge/build/darwin/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/appimage/build.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/nfpm.yaml
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
(1 hunks)v3/examples/badge/build/windows/Taskfile.yml
(1 hunks)v3/examples/badge/build/windows/info.json
(1 hunks)v3/examples/badge/build/windows/nsis/project.nsi
(1 hunks)v3/examples/badge/build/windows/nsis/wails_tools.nsh
(1 hunks)v3/examples/badge/build/windows/wails.exe.manifest
(1 hunks)v3/examples/badge/frontend/Inter Font License.txt
(1 hunks)v3/examples/badge/frontend/index.html
(1 hunks)v3/examples/badge/frontend/package.json
(1 hunks)v3/examples/badge/frontend/public/style.css
(1 hunks)v3/examples/badge/frontend/src/main.ts
(1 hunks)v3/examples/badge/frontend/src/vite-env.d.ts
(1 hunks)v3/examples/badge/frontend/tsconfig.json
(1 hunks)v3/examples/badge/main.go
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Call.RuntimeError.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelError.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelledRejectionError.html
(2 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Events.WailsEvent.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Hide.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Show.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Browser.OpenURL.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByID.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByName.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.Call.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.SetText.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.Text.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Info.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.OpenFile.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Question.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.SaveFile.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Warning.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Emit.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Off.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OffAll.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.On.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OnMultiple.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Once.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Flags.GetFlag.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetAll.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetCurrent.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetPrimary.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Capabilities.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Environment.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsAMD64.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM64.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDarkMode.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDebug.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsLinux.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsMac.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsWindows.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.invoke.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Enable.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Reload.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseLike.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseWithResolvers.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.Button.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.FileFilter.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.OpenFileDialogOptions.html
(2 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html
(2 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Rect.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Screen.html
(2 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Size.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.EnvironmentInfo.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.OSInfo.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Position.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Size.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/types/Call.CallOptions.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/types/Events.Callback.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseCanceller.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseExecutor.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseRejector.html
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseResolver.html
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html (1)
Learnt from: fbbdev
PR: wailsapp/wails#4100
File: v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.ts:222-228
Timestamp: 2025-02-25T17:13:05.652Z
Learning: The user has chosen to maintain the function name `Error` in the dialogs module despite it shadowing the global Error constructor. This is a deliberate choice due to documentation generator compatibility concerns, and the risk is mitigated by using `window.Error` when referencing the global constructor and by the strictly type-checked modular nature of the code.
🪛 YAMLlint (1.35.1)
v3/examples/badge/build/config.yml
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~101-~101: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
v3/examples/badge/README.md
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~59-~59: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2020 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...
(EN_EXCESSIVE_EXCLAMATION)
v3/examples/badge/frontend/Inter Font License.txt
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...
(DASH_RULE)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge/README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🔇 Additional comments (91)
v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.Call.html (1)
9-9
: Source link updated correctly
The “Defined in” link now consistently points to the forked repository (popaprozac/wails
), matching other docs updates.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.SetText.html (1)
4-4
: Approve documentation source link updateThe "Defined in" link has been correctly updated to point to the
popaprozac/wails
repository. This change is consistent with the other documentation updates and does not affect any API content.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Emit.html (1)
4-4
: Consistent Documentation Source Link UpdateThe "Defined in" link target has been correctly updated from the original
wailsapp/wails
repository to thepopaprozac/wails
fork, matching the pattern applied across other docs in this PR. This is purely editorial and does not affect any public API or runtime behavior.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDarkMode.html (1)
3-3
: Approve documentation link updateThe "Defined in" source URL has been correctly updated from
wailsapp/wails
to your forkedpopaprozac/wails
repository. This aligns with the PR’s overall documentation refactoring and does not impact functionality.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDebug.html (1)
3-3
: Approve updated documentation source linkThe
<aside class="tsd-sources">
link has been correctly updated to point to thepopaprozac/wails
repository, aligning with the other documentation migrations in this PR.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.Text.html (1)
3-3
: Approve: Documentation source link correctly updated
The HTML doc now references thepopaprozac
fork (github.com/popaprozac/wails
) instead of the original Wails repo. This aligns with the PR-wide editorial update, and the rest of the content remains unchanged.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsWindows.html (1)
3-3
: Consistent repository link update
The source reference has been correctly changed from the originalwailsapp/wails
repo to your forkpopaprozac/wails
, and it points to the properv3-alpha
branch path.v3/internal/runtime/desktop/@wailsio/runtime/docs/types/Call.CallOptions.html (1)
9-9
: Approve: Documentation source link updated to forked repository
The “Defined in” link now correctly points to thepopaprozac/wails
fork, matching the PR’s intention to redirect docs to the new repo. No further changes needed.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM64.html (1)
3-3
: Verify documentation source link points to the correct repository.
The “Defined in” link now referencesgithub.com/popaprozac/wails/...
. Please confirm this is intentional—user-facing docs typically point to the officialwailsapp/wails
repository rather than a personal fork.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OffAll.html (1)
2-2
: Documentation source link updated
The “Defined in” hyperlink now points to thepopaprozac/wails
repository (v3-alpha
branch) instead of the originalwailsapp/wails
. This aligns with the PR’s goal to redirect docs to the fork. Please verify that thev3-alpha
tag (or the intended branch) and the file path (src/events.ts#L123
) exist in thepopaprozac/wails
repo and are consistent across all mirrored documentation entries.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Capabilities.html (1)
3-3
: Verify the updated “Defined in” link
The source reference now points tohttps://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/system.ts#L52
. Please confirm that this URL correctly resolves to the intended file path and line in thev3-alpha
branch of the forked repository.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Warning.html (1)
4-4
: Consistent source link update
The "Defined in" footer link now correctly points to thepopaprozac/wails
fork, aligning with the repository migration across all generated docs.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Question.html (1)
4-4
: Consistent source link update
The "Defined in" footer link has been updated to reference thepopaprozac/wails
fork, ensuring consistency with other documentation pages.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html (1)
4-4
: Consistent source link update
The "Defined in" footer link now correctly references thepopaprozac/wails
repository, matching the pattern applied throughout the runtime docs.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Info.html (1)
4-4
: Consistent source link update
The "Defined in" footer link has been updated to point at thepopaprozac/wails
fork, maintaining uniform documentation references.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM.html (1)
3-3
: Updated source link reference
The “Defined in” link forIsARM
now points to thepopaprozac/wails
fork instead of the originalwailsapp/wails
repo. This aligns with your PR objective to reference the new hosting location. Please verify that this change is intentional and consistently applied across all@wailsio/runtime/docs/functions/
HTML files.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Environment.html (1)
3-3
: Approve editorial update for source link.The updated documentation source link now correctly points to the
popaprozac
fork forsystem.ts
. This change is purely editorial and aligns with the PR’s broader documentation reference updates.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Show.html (1)
2-2
: Correct HTML structure for Returns section
Moving the closing</div>
to wrap only the function description and placing the<h4 class="tsd-returns-title">
outside restores valid HTML semantics and isolates the Returns header correctly.v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Call.RuntimeError.html (2)
3-3
: Approve structural HTML nesting fix.
The repositioned<div class="tsd-comment tsd-typography"></div>
and closing</section>
ensure the constructor comment block is properly closed before the hierarchy panel.
11-11
: Approve empty comment container adjustment.
Moving the empty<div class="tsd-comment tsd-typography"></div>
here aligns with the surrounding parameter documentation, maintaining consistent HTML structure.v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseCanceller.html (1)
1-1
: Verify updated “Defined in” repository link
The “Defined in” anchor has been updated to point to thepopaprozac/wails
fork on branchv3-alpha
. Please confirm that this URL exists, the branch name is correct, and it navigates to line 66 ofsrc/cancellable.ts
.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Screen.html (1)
1-25
: Approve generated documentation updates
This HTML file is entirely autogenerated by TypeDoc. The only modifications are updates to the embedded source‐code links, which now correctly point topopaprozac/wails
on thev3-alpha
branch. There are no semantic changes to theScreen
interface or its properties.v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelledRejectionError.html (3)
9-9
: Approve: Updated source link to popaprozac repository.The GitHub URL for the class definition has been correctly updated to point to
popaprozac/wails
. No other content was affected.
20-20
: Approve: Updated constructor source link.The source link for the constructor override now correctly references the
popaprozac/wails
repository.
21-21
: Approve: Updated property source reference.The
promise
property’s source code link has been updated to the new repository location.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsLinux.html (1)
3-3
: Verified updated source reference URLThe “Defined in” link has been correctly updated to point to your forked repository (
popaprozac/wails
), aligning with the other documentation updates in this PR.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetPrimary.html (1)
3-3
: Approve updated GitHub source reference. The documentation now correctly points to thepopaprozac/wails
fork for theGetPrimary
function’s source link.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.OpenFile.html (3)
4-4
: Approve formatting adjustment
The inserted empty<div class="tsd-comment tsd-typography"></div>
serves as a placeholder for consistent vertical spacing before the source link aside, matching the pattern in other generated docs.
7-7
: Approve formatting adjustment
This blank comment container is intentional to preserve uniform layout in the second overload’s documentation section.
10-10
: Approve formatting adjustment
Adding this empty<div>
ensures the third overload block aligns stylistically with the others, maintaining consistent spacing before the source reference.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.OSInfo.html (1)
1-1
: Approve documentation link updates
All<aside>
source links have been correctly updated to point to the newpopaprozac/wails
repository (v3-alpha
branch) instead of the oldwailsapp/wails
. This maintains accurate source references in the generated docs.Also applies to: 6-9
v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.FileFilter.html (2)
4-4
: Confirm updated source reference URL for DisplayName
The “Defined in” link now points tohttps://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.ts#L124
. Verify that the branch (v3-alpha
) and repository (popaprozac/wails
) are correct and align with your release workflow and directory structure.
5-5
: Confirm updated source reference URL for Pattern
The “Defined in” link now points tohttps://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/dialogs.ts#L126
. Ensure this is the intended branch and repo path for thePattern
property inDialogs.FileFilter
.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsAMD64.html (1)
3-3
: Incorrect documentation source link: Refers to fork instead of official repository.The “Defined in” link now points to
https://github.com/popaprozac/wails/blob/v3-alpha/...
, which is your personal fork. For published docs, links should reference the officialwailsapp/wails
repository (and correct branch or tag) so users aren’t directed to a transient fork. Please adjust your TypeDoc or documentation generation settings (e.g.,gitRemote
/gitBranch
in your config) and regenerate this file so the link targetshttps://github.com/wailsapp/wails/blob/v3-alpha/...
instead.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.On.html (1)
5-5
:✅ Verification successful
Confirm updated source link.
The documentation’s “Defined in” link now points to the
popaprozac
fork (github.com/popaprozac/wails
) instead of the original Wails repo. This aligns with the PR’s intent, but please ensure all other generated docs in@wailsio/runtime
have been updated similarly.You can verify consistency by running:
🏁 Script executed:
#!/bin/bash # Search for any remaining links to the original Wails repo in the docs rg -l 'github\.com/wailsapp/wails/blob/' v3/internal/runtime/desktop/@wailsio/runtime/docsLength of output: 92
All documentation links updated to popaprozac fork
I ran a search across
v3/internal/runtime/desktop/@wailsio/runtime/docs
and found no remaining references togithub.com/wailsapp/wails
. All “Defined in” links now consistently point to thepopaprozac
fork—no further changes needed.v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Events.WailsEvent.html (1)
2-10
: Updated documentation source links
AllDefined in
references have been updated to point from the originalwailsapp/wails
repository to the newpopaprozac/wails
fork, as intended by this PR. These are purely documentation updates with no changes to the API surface or behavior.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.invoke.html (1)
1-1
: Approve documentation link update
The "Defined in" hyperlink has been correctly updated to reference thepopaprozac/wails
repository instead ofwailsapp/wails
. No further changes are required.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseWithResolvers.html (2)
3-3
: Approve: HTML structural clean-up for comment panel
The inserted empty<div class="tsd-comment tsd-typography"></div>
ensures consistent wrapping of comment sections without altering any content.
7-7
: Approve: Corrected closing tags in index panel
The updated closing tag sequence properly nests and terminates the index section, improving HTML validity with no effect on the public API.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Position.html (3)
2-2
: Approve updated TypeDoc reference URL for interface definition.The "Defined in" link now correctly points to the
popaprozac/wails
fork at the proper line insrc/window.ts
. This aligns with the repository URL migration and matches the pattern applied across other documentation files.
5-5
: Approve updated TypeDoc reference URL for propertyx
.The source link for the
x
property has been updated to reference the new fork underpopaprozac/wails
, replacing the oldwailsapp
path. This ensures consistency in the documentation.
6-6
: Approve updated TypeDoc reference URL for propertyy
.The
y
property now correctly links to thepopaprozac/wails
repository. This change is consistent with the overall documentation update strategy.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Flags.GetFlag.html (1)
4-4
: Confirm updated source link and branch name
The<aside class="tsd-sources">
link now points togithub.com/popaprozac/wails
on branchv3-alpha
. Please verify that thev3-alpha
branch exists and is the intended target for these docs—if the primary branch has moved tov3
ormain
, update the URL accordingly.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Hide.html (1)
2-2
: Ensure correct HTML nesting for the Returns section
The closing</div>
for the description block has been moved immediately before the<h4 class="tsd-returns-title">
element. This change prevents the Returns heading and its content from being treated as part of the comment block and maintains proper HTML structure.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Off.html (1)
3-3
: Approve updated source URL reference
The documentation source link has been correctly updated to point at thepopaprozac/wails
fork (branchv3-alpha
) for theOff
function’s implementation.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.OpenFileDialogOptions.html (1)
18-33
: Verify repository links in generated documentationAll the
Defined in
source links have been switched from the officialwailsapp/wails
repository to the forkpopaprozac/wails
, yet the interface signatures themselves remain untouched. Please confirm whether redirecting end-users to your personal fork is intentional. If not, consider restoring these URLs to point back to the upstream repository or update your TypeDoc configuration accordingly.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html (2)
2-2
: Validate HTML structure adjustment for Returns section.
The closing</div>
tag has been correctly moved before the<h4 class="tsd-returns-title">
so that the Returns heading and its content are properly outside the description block. This fixes the panel nesting without altering functionality.
2-2
:✅ Verification successful
Verify updated GitHub source link.
The hyperlink now points to thepopaprozac/wails
repository at tagv3-alpha
. Please confirm this URL is accurate and returns a successful response.
🏁 Script executed:
#!/bin/bash # Check that the GitHub link for the Quit function is reachable curl -I "https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/application.ts#L35" | head -n 1Length of output: 468
GitHub source link verified
The hyperlink inv3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html
now points to the correctv3-alpha
tag on thepopaprozac/wails
repo and returns HTTP 200. No further action needed.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.EnvironmentInfo.html (1)
1-12
: Purely editorial changes approved
All “Defined in” source links have been consistently updated to point to the newpopaprozac/wails
repository on thev3-alpha
branch. Since this is a regenerated HTML docs file with no API or behavioral changes, these updates look correct.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseLike.html (3)
24-24
: Approve update to interface source link
The<aside class="tsd-sources">
reference has been correctly updated to point to thepopaprozac/wails
repository on thev3-alpha
branch (source line#L69
). This aligns with the rest of the docs.
48-48
: Approve update tocancel
method source link
The documentation now references thecancel
implementation inpopaprozac/wails
(#L71
). This change is consistent and requires no further action.
82-82
: Approve update tothen
method source link
The<aside>
for thethen
method correctly points topopaprozac/wails
(#L70
). No API or signature changes were made.v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseRejector.html (1)
34-34
: Approve documentation source link update
The "Defined in" anchor has been updated to referencepopaprozac/wails
instead ofwailsapp/wails
, aligning this doc with the rest of the regenerated HTML files. No further action needed.v3/internal/runtime/desktop/@wailsio/runtime/docs/types/Events.Callback.html (1)
2-2
: Improve HTML container structure for the comment section.By moving the closing
</div>
to wrap just the comment block (tsd-comment tsd-typography
), the comment is now correctly scoped and separated from the subsequent “Type declaration” section. This enhances the document’s markup hierarchy and prevents potential styling or accessibility issues.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.Button.html (4)
1-1
: Approve HTML header update.
The updated DOCTYPE and<html>
attributes remain consistent with other documentation pages and correctly reference the base path. No issues detected.
5-5
: Approve source link update forIsCancel
.
The “Defined in” URL now correctly points to thepopaprozac/wails
repository (line 117). This is an editorial change only.
6-6
: Approve source link update forIsDefault
.
The “Defined in” URL now correctly points to thepopaprozac/wails
repository (line 119). This is an editorial change only.
7-7
: Approve source link update forLabel
.
The “Defined in” URL now correctly points to thepopaprozac/wails
repository (line 115). This is an editorial change only.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Reload.html (1)
2-2
: Approve documentation formatting and link update
The change refines the closing HTML structure and correctly points the “Defined in” source link to thepopaprozac/wails
v3-alpha branch. This is purely a documentation update with no impact on runtime behavior.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByID.html (1)
6-6
:❓ Verification inconclusive
Ensure updated source link is correct and reachable
The documentation footer now points to thepopaprozac/wails
fork on thev3-alpha
branch. Confirm this aligns with your documentation hosting strategy and that the link resolves properly in all generated outputs.You can verify the HTTP status code of the new link with:
🏁 Script executed:
curl -o /dev/null -s -w "%{http_code}\n" https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L231
Length of output: 159
Footer link resolves successfully (HTTP 200)
- Verified via
curl -o /dev/null -s -w "%{http_code}\n" https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L231
- No broken links detected in the generated documentation
Please confirm that pointing to the
popaprozac/wails
fork on thev3-alpha
branch is intentional and aligns with your documentation hosting strategy.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Browser.OpenURL.html (1)
3-3
: Auto-generated Template Change – No action required.The inserted empty
<div class="tsd-comment tsd-typography"></div>
is part of the standard TypeDoc output and does not affect functionality or styling in practice.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html (2)
15-17
: Updated source link for interface definition is correct.
TheDefined in
hyperlink now points to thepopaprozac/wails
fork at the correct path and line number.
18-33
: All property source links have been consistently updated.
Each property'sDefined in
link references the new repository URL. Please verify there are no remaining references towailsapp/wails
in this file or its sibling docs.Would you like a shell script to scan for any occurrences of the old URL in the
v3/internal/runtime/desktop/@wailsio/runtime/docs
directory?v3/internal/runtime/desktop/@wailsio/runtime/docs/types/_internal_.CancellablePromiseExecutor.html (1)
1-1
: Docs: Updated “Defined in” source URL
The “Defined in” anchor has been correctly updated to point to the newpopaprozac/wails
repository, reflecting the project’s fork. No semantic changes to the API doc itself—this aligns with the migration.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Size.html (3)
2-2
: Approve HTML structure adjustment for interface comment block.
The insertion of an empty<div class="tsd-comment tsd-typography"></div>
ensures proper closure and alignment of the TypeDoc-generated comment sections without altering semantic content.
5-5
: Approve comment wrapper fix forheight
property.
The added empty<div class="tsd-comment tsd-typography"></div>
correctly encapsulates the comment block boundaries for theheight
property.
6-6
: Approve comment wrapper fix forwidth
property.
Likewise, this ensures the structural consistency of the comment section around thewidth
property.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetAll.html (1)
3-3
:✅ Verification successful
Verify updated source link
The documentation’s “Defined in” link has been updated to point topopaprozac/wails
on branchv3-alpha
. Please confirm that:
- The file
src/screens.ts
exists at line 68 in that fork/branch.- All other HTML docs follow the same repository/branch convention.
🏁 Script executed:
#!/bin/bash # Description: Ensure the updated link returns HTTP 200 curl -o /dev/null -s -w "%{http_code}" https://raw.githubusercontent.com/popaprozac/wails/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.tsLength of output: 164
🏁 Script executed:
#!/bin/bash # 1. Verify that src/screens.ts on branch v3-alpha contains at least 68 lines echo "screens.ts line count:" curl -s https://raw.githubusercontent.com/popaprozac/wails/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.ts | wc -l # 2. Check all generated HTML docs under docs/functions for inconsistent “Defined in” links echo "Checking for any docs/functions HTML that do NOT reference popaprozac/wails/v3-alpha:" grep -R "raw.githubusercontent.com" v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/*.html \ | grep -v "popaprozac/wails/v3-alpha" || echo "→ All docs/functions links are consistent with popaprozac/wails/v3-alpha"Length of output: 3639
All “Defined in” Links Verified
src/screens.ts
on branchv3-alpha
contains 88 lines, so line 68 exists as expected.- Every HTML file in
v3/internal/runtime/desktop/@wailsio/runtime/docs/functions
references thepopaprozac/wails/v3-alpha
branch.No changes required.
v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Rect.html (1)
1-10
:✅ Verification successful
Validate updated GitHub source links
All embedded source references have been updated fromwailsapp/wails
topopaprozac/wails
on thev3-alpha
branch (e.g.,.../blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/screens.ts#L18
,#L26
,#L24
,#L20
,#L22
). Ensure there are no remaining stale links pointing towailsapp/wails
and that all line numbers correctly reflect the source.To verify across the docs directory, run:
🏁 Script executed:
#!/bin/bash # Search for any outdated wailsapp links in the docs rg -n "github\\.com/wailsapp/wails" v3/internal/runtime/desktop/@wailsio/runtime/docs # Confirm all links now point to popaprozac rg -n "github\\.com/popaprozac/wails" v3/internal/runtime/desktop/@wailsio/runtime/docsLength of output: 127825
All GitHub source links correctly updated
- No occurrences of
github.com/wailsapp/wails
found inv3/internal/runtime/desktop/@wailsio/runtime/docs
- All references now point to
github.com/popaprozac/wails
on thev3-alpha
branchNo stale links remain—no further action required.
v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Size.html (3)
1-1
: Approve regenerated documentation header
The HTML page has been fully regenerated to reflect the new repository URL without altering any API surface. The DOCTYPE and asset references remain intact and valid.
4-4
: Approve updated “Defined in” link for Height
The source link for theHeight
property now correctly points tohttps://github.com/popaprozac/wails/.../src/screens.ts#L15
. No obsoletewailsapp/wails
references remain.
5-5
: Approve updated “Defined in” link for Width
The source link for theWidth
property now correctly points tohttps://github.com/popaprozac/wails/.../src/screens.ts#L13
. Consistent with the PR’s bulk URL updates.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Enable.html (1)
2-2
: Documentation source link updated to forked repository
No functional or descriptive changes—only the “Defined in” URL was changed fromwailsapp/wails
topopaprozac/wails
. This is consistent with the PR’s mass documentation link updates.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Once.html (1)
5-5
: Documentation source link updated to forked repository
Verified that only the source reference was redirected topopaprozac/wails
with no modifications to the API signature or description.v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetCurrent.html (1)
3-3
: Documentation source link updated to forked repository
The “Defined in” link now points at thepopaprozac/wails
fork. No other content was altered.v3/examples/badge/frontend/src/vite-env.d.ts (1)
1-2
: LGTM! TypeScript declaration looks correct.The TypeScript declaration file correctly references Vite client types, which is necessary for TypeScript support in a Vite project.
v3/examples/badge/main.go (2)
30-42
: Badge service initialization looks goodThe badge service is properly initialized in the application setup, which is essential for the new badging feature to work on both Windows and macOS.
49-58
: Window configuration is appropriately set up for the badge demonstrationThe window is configured with proper styling and a dark background color. The macOS-specific configurations look good for showcasing the badge functionality in the dock.
v3/examples/badge/frontend/tsconfig.json (1)
1-20
: TypeScript configuration looks appropriate for the badge exampleThe TypeScript configuration is well-structured with modern settings. The ESNext target is appropriate for current browsers, and the strict mode will help catch type errors.
Two settings to consider adjusting for better code quality:
noImplicitAny: false
- Consider enabling this to enforce stricter type checkingnoUnusedParameters: false
- Consider enabling this to identify unused parametersThese are optional improvements that would strengthen type safety in your frontend code.
v3/examples/badge/build/darwin/Info.plist (1)
1-27
: Overall structure is valid.
The XML elements and key ordering follow standard Apple plist conventions, and versioning metadata looks correct.v3/examples/badge/build/windows/wails.exe.manifest (1)
1-15
: Windows manifest correctly configures assembly identity and DPI awareness.
The common controls dependency and per-monitor DPI settings are properly declared.
No issues detected.v3/examples/badge/Taskfile.yml (1)
1-34
: Taskfile.yml is well-structured and delegates to OS-specific tasks.
Variables, includes, and task definitions align with the project’s conventions.
Thebuild
,package
,run
, anddev
tasks are correctly wired to their platform subtasks.docs/src/content/docs/learn/badges.mdx (1)
1-123
: Documentation is comprehensive and clear.
The new "Badges" page thoroughly covers service initialization, badge operations, platform-specific behaviors,
best practices, and API reference. Formatting and layout are consistent with existing guides.🧰 Tools
🪛 LanguageTool
[uncategorized] ~101-~101: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
v3/examples/badge/build/config.yml (1)
1-63
: Good configuration setup for the badge example application.The configuration file provides a well-structured setup for the badge example project with appropriate development mode settings and command execution flow. The commented file associations section provides helpful examples for future implementation.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
v3/examples/badge/build/windows/nsis/project.nsi (1)
1-113
: Well-structured NSIS installer script.The script properly configures a Windows installer with appropriate Unicode support, HiDPI awareness, WebView2 runtime installation, and proper uninstallation cleanup. The documentation comments are thorough and helpful for both automated and manual use cases.
v3/examples/badge/frontend/public/style.css (2)
116-129
: LGTM - Good responsive design approach.The media query for light color scheme is well implemented, properly adjusting the colors for better contrast and readability in light mode.
131-157
: LGTM - Well-structured input styling.The CSS for input elements properly handles different states (default, hover, focus) with appropriate visual feedback.
v3/examples/badge/frontend/Inter Font License.txt (1)
1-94
: Proper font licensing inclusion.The SIL Open Font License is correctly included for the Inter font, which is an important legal requirement when bundling third-party fonts in applications.
🧰 Tools
🪛 LanguageTool
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...(DASH_RULE)
v3/examples/badge/build/windows/Taskfile.yml (1)
26-27
: Re-evaluateCGO_ENABLED=0
Wails on Windows usually links against
webview2loader.dll
; building withCGO_ENABLED=0
can lead to runtime errors (blank window or crash) if CGO stubs are still referenced. Please confirm the app starts correctly on a clean Windows VM.v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html (2)
6-9
: No actionable changes here—these closing tags and unchanged comment paragraphs were swept up by the full-file regeneration.
1-1
:✅ Verification successful
Verify GitHub source links and asset references.
This document has been regenerated to update all
wailsapp/wails
links topopaprozac/wails
. Please confirm that:
- No residual references to
github.com/wailsapp/wails
remain.- All new links correctly point to
github.com/popaprozac/wails
.- The relative paths to assets (e.g.,
../assets/style.css
,../assets/main.js
) still resolve without errors.
🏁 Script executed:
#!/bin/bash # Check for outdated repo links rg -n "github\.com/wailsapp/wails" -- . # Verify new repo links rg -n "github\.com/popaprozac/wails" -- . # Confirm asset references in this file grep -R "../assets/" v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.htmlLength of output: 117736
Could you scope the checks to just the generated HTML file to confirm its links and asset paths?
🏁 Script executed:
#!/bin/bash FILE="v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html" # 1. Ensure no old wailsapp/wails links grep -n "github\\.com/wailsapp/wails" "$FILE" # 2. Verify new popaprozac/wails links grep -n "github\\.com/popaprozac/wails" "$FILE" # 3. Confirm asset references are present grep -n "\\.\\./assets/" "$FILE"Length of output: 25269
No broken links or missing assets detected
All checks passed forDialogs.MessageDialogOptions.html
:
- No occurrences of
github.com/wailsapp/wails
remain.- All source links point to
github.com/popaprozac/wails
.- Relative
../assets/
paths for CSS and JS files are present and correct.
@@ -3,4 +3,4 @@ | |||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">callback</span>: <a href="../types/Events.Callback.html" class="tsd-signature-type tsd-kind-type-alias">Callback</a></span><div class="tsd-comment tsd-typography"><p>The callback function to be called when the event is triggered.</p> | |||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">maxCallbacks</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The maximum number of times the callback can be called for the event. Once the maximum number is reached, the callback will no longer be called.</p> | |||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></h4><p>A function that, when called, will unregister the callback from the event.</p> | |||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/wailsapp/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/events.ts#L81">src/events.ts:81</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> | |||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/events.ts#L81">src/events.ts:81</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Documentation links should reference the official Wails repository
It appears the source link was updated to point at your personal fork (popaprozac/wails
) rather than the upstream wailsapp/wails
repo. This can confuse readers and break consistency across the docs. Please revert these links or update your TypeDoc base URL/template to always use the official repository.
@@ -1,3 +1,3 @@ | |||
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IsMac | @wailsio/runtime</title><meta name="description" content="Documentation for @wailsio/runtime"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@wailsio/runtime</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@wailsio/runtime</a></li><li><a href="../modules/System.html">System</a></li><li><a href="System.IsMac.html">IsMac</a></li></ul><h1>Function IsMac</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="ismac" class="tsd-anchor"></a><span class="tsd-kind-call-signature">IsMac</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#ismac" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Checks if the current environment is a macOS operating system.</p> | |||
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True if the environment is macOS, false otherwise.</p> | |||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/wailsapp/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/system.ts#L117">src/system.ts:117</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> | |||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/system.ts#L117">src/system.ts:117</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect documentation source link
The "Defined in" anchor now points to the forked repository (github.com/popaprozac/wails
) instead of the official Wails repository (github.com/wailsapp/wails
). This will mislead users and break source references in the published docs. Please revert this link to the official repository or adjust the documentation generator configuration accordingly.
@@ -3,4 +3,4 @@ | |||
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">methodName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The name of the method in the format 'package.struct.method'.</p> | |||
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The arguments to pass to the method.</p> | |||
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../classes/CancellablePromise.html" class="tsd-signature-type tsd-kind-class">CancellablePromise</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>The result of the method call.</p> | |||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/wailsapp/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> | |||
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document linking to forked repository; revert to official source.
The “Defined in” hyperlink now points to github.com/popaprozac/wails
, which is a personal fork. This can confuse users and break docs if the fork diverges or is deleted. Please update it to the official Wails repository URL to ensure permanence and consistency.
Diff to apply:
-<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside>
+<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/wailsapp/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside>
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@wailsio/runtime</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> | |
<!-- file: v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByName.html --> | |
<div class="tsd-comment tsd-typography"></div> | |
-<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/popaprozac/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside> | |
+<aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/wailsapp/wails/blob/v3-alpha/v3/internal/runtime/desktop/@wailsio/runtime/src/calls.ts#L219">src/calls.ts:219</a></li></ul></aside> | |
</div></li></ul></section></div> |
const setButton = document.getElementById('set')! as HTMLButtonElement; | ||
const removeButton = document.getElementById('remove')! as HTMLButtonElement; | ||
const labelElement : HTMLInputElement = document.getElementById('label')! as HTMLInputElement; | ||
const timeElement = document.getElementById('time')! as HTMLDivElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error handling for DOM element selection.
The code uses non-null assertions (!) which assumes the elements will always exist in the DOM. Consider adding error handling to gracefully handle cases when elements aren't found.
-const setButton = document.getElementById('set')! as HTMLButtonElement;
-const removeButton = document.getElementById('remove')! as HTMLButtonElement;
-const labelElement : HTMLInputElement = document.getElementById('label')! as HTMLInputElement;
-const timeElement = document.getElementById('time')! as HTMLDivElement;
+const setButton = document.getElementById('set');
+const removeButton = document.getElementById('remove');
+const labelElement = document.getElementById('label') as HTMLInputElement;
+const timeElement = document.getElementById('time');
+
+if (!setButton || !removeButton || !labelElement || !timeElement) {
+ console.error('Required UI elements not found in DOM');
+}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const setButton = document.getElementById('set')! as HTMLButtonElement; | |
const removeButton = document.getElementById('remove')! as HTMLButtonElement; | |
const labelElement : HTMLInputElement = document.getElementById('label')! as HTMLInputElement; | |
const timeElement = document.getElementById('time')! as HTMLDivElement; | |
const setButton = document.getElementById('set'); | |
const removeButton = document.getElementById('remove'); | |
const labelElement = document.getElementById('label') as HTMLInputElement; | |
const timeElement = document.getElementById('time'); | |
if (!setButton || !removeButton || !labelElement || !timeElement) { | |
console.error('Required UI elements not found in DOM'); | |
} |
docs/src/content/docs/changelog.mdx
Outdated
- Add File Association support for mac by [@wimaha](https://github.com/wimaha) in [#4177](https://github.com/wailsapp/wails/pull/4177) | ||
- Add `wails3 tool version` for semantic version bumping by [@leaanthony](https://github.com/leaanthony) | ||
- Add badging support for macOS and Windows by [@popaprozac](https://github.com/popaprozac) in [#]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fill in missing PR reference for badging entry.
The entry for badging support has an empty PR placeholder ([#]()
). Please update it to reference PR #4234:
- - Add badging support for macOS and Windows by [@popaprozac](https://github.com/popaprozac) in [#]()
+ - Add badging support for macOS and Windows by [@popaprozac](https://github.com/popaprozac) in [#4234](https://github.com/wailsapp/wails/pull/4234)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- Add badging support for macOS and Windows by [@popaprozac](https://github.com/popaprozac) in [#]() | |
- Add badging support for macOS and Windows by [@popaprozac](https://github.com/popaprozac) in [#4234](https://github.com/wailsapp/wails/pull/4234) |
depends: | ||
- gtk3 | ||
- libwebkit2gtk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Consider the badge functionality limitation on Linux
The badge implementation is noted to support Windows and macOS in the PR description, but there isn't a mention of Linux support. It might be helpful to document this limitation in comments.
🏁 Script executed:
#!/bin/bash
# Check if there's any Linux-specific badge implementation in the codebase
rg -i "linux.*badge" --type go
Length of output: 32
To ensure we haven’t missed any Linux‐specific badge implementation, let’s list all OS‐tagged Go files:
🏁 Script executed:
#!/bin/bash
# List Go files with OS-specific build tags
echo "=== Windows-tagged files ==="
rg -l "//go:build windows" --type go || echo " (none found)"
echo
echo "=== Darwin-tagged files ==="
rg -l "//go:build darwin" --type go || echo " (none found)"
echo
echo "=== Linux-tagged files ==="
rg -l "//go:build linux" --type go || echo " (none found)"
Length of output: 13281
Document Linux badge limitation
The badge service is implemented only for Windows (badge_windows.go
) and macOS (badge_darwin.go
); there is no badge_linux.go
. Please add a note in the Linux build manifest to clarify that badge functionality isn’t supported on Linux:
• File: v3/examples/badge/build/linux/nfpm/nfpm.yaml
# badge is currently supported on Windows and macOS only; Linux support is pending
depends:
- gtk3
- libwebkit2gtk
.result { | ||
height: 20px; | ||
line-height: 20px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Duplicate .result
selector with different properties.
There are two separate CSS rule sets for the .result
class with different properties. This could lead to unexpected styling behavior or confusion during maintenance.
Consolidate these rules into a single declaration:
-
-.result {
- height: 20px;
- line-height: 20px;
-}
-
-/* ...other styles... */
-
.result {
height: 20px;
line-height: 20px;
+ margin: 1.5rem auto;
+ text-align: center;
}
Also applies to: 103-108
GOARCH: '{{.ARCH | default ARCH}}' | ||
PRODUCTION: '{{.PRODUCTION | default "false"}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Provide a deterministic default for ARCH
{{.ARCH | default ARCH}}
resolves to the environment variable ARCH
, but if neither the CLI nor the environment defines it, the value passed to go build
(and wails3 generate syso
) will be empty, producing an “unknown GOARCH” error.
- GOARCH: '{{.ARCH | default ARCH}}'
+ GOARCH: '{{default .ARCH "amd64"}}' # Fallback to the mainstream Windows target
(Apply the same pattern to generate:syso:vars.ARCH
.)
Committable suggestion skipped: line range outside the PR's diff.
- sh: npm version | ||
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" | ||
cmds: | ||
- npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Wrong command used to probe for npm
npm version
bumps the package’s semantic version; to just test for npm presence use npm --version
.
- - sh: npm version
+ - sh: npm --version
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- sh: npm version | |
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" | |
cmds: | |
- npm install | |
- sh: npm --version | |
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" | |
cmds: | |
- npm install |
summary: Builds darwin universal binary (arm64 + amd64) | ||
deps: | ||
- task: build | ||
vars: | ||
ARCH: amd64 | ||
OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" | ||
- task: build | ||
vars: | ||
ARCH: arm64 | ||
OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" | ||
cmds: | ||
- lipo -create -output "{{.BIN_DIR}}/{{.APP_NAME}}" "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Universal build is non-production by default
build:universal
calls build
twice without PRODUCTION: "true"
. As a result, the assembled universal binary is built with debug flags (-gcflags=all="-l"
), but the package step assumes a release build.
- - task: build
+ - task: build
vars:
ARCH: amd64
+ PRODUCTION: "true"
...
- - task: build
+ - task: build
vars:
ARCH: arm64
+ PRODUCTION: "true"
Also propagate PRODUCTION: "true"
into package:universal
to keep consistency with Windows/Linux tasks.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
summary: Builds darwin universal binary (arm64 + amd64) | |
deps: | |
- task: build | |
vars: | |
ARCH: amd64 | |
OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" | |
- task: build | |
vars: | |
ARCH: arm64 | |
OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" | |
cmds: | |
- lipo -create -output "{{.BIN_DIR}}/{{.APP_NAME}}" "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" | |
summary: Builds darwin universal binary (arm64 + amd64) | |
deps: | |
- task: build | |
vars: | |
ARCH: amd64 | |
PRODUCTION: "true" | |
OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" | |
- task: build | |
vars: | |
ARCH: arm64 | |
PRODUCTION: "true" | |
OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" | |
cmds: | |
- lipo -create -output "{{.BIN_DIR}}/{{.APP_NAME}}" "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
v3/examples/badge/build/config.yml (2)
47-47
: Update URL placeholder with proper documentation link.The URL "https://v3.wails.io/noit/done/yet" appears to be a placeholder. This should be updated with the actual documentation URL once available.
-# More information at: https://v3.wails.io/noit/done/yet +# More information at: https://v3.wails.io/docs/reference/file-associations
63-63
: Add a newline at the end of file.Missing a newline character at the end of the file, which is a common convention for configuration files.
- - name: My Other Data + - name: My Other Data +🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
v3/examples/badge/README.md (2)
11-13
: Specify language in code blocks for better syntax highlighting.Adding language specifiers to code blocks enhances readability with syntax highlighting.
- ``` + ```bash wails3 dev ```Similarly update the other code blocks at lines 19-21 and 33-35.
Also applies to: 19-21, 33-35
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
47-50
: Consider using a bulleted list with consistent formatting.The project structure section would benefit from consistent formatting. There's a potential issue with the loose punctuation mark in line 47.
-Take a moment to familiarize yourself with your project structure: -- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) -- `main.go`: The entry point of your Go backend -- `app.go`: Define your application structure and methods here -- `wails.json`: Configuration file for your Wails project +Take a moment to familiarize yourself with your project structure: + +- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) +- `main.go`: The entry point of your Go backend +- `app.go`: Define your application structure and methods here +- `wails.json`: Configuration file for your Wails project🧰 Tools
🪛 LanguageTool
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: -frontend/
: Contains your frontend code (HTML, CSS,...(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (7)
v3/examples/badge/build/appicon.png
is excluded by!**/*.png
v3/examples/badge/build/windows/icon.ico
is excluded by!**/*.ico
v3/examples/badge/frontend/public/Inter-Medium.ttf
is excluded by!**/*.ttf
v3/examples/badge/frontend/public/typescript.svg
is excluded by!**/*.svg
v3/examples/badge/frontend/public/wails.png
is excluded by!**/*.png
v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/icons.svg
is excluded by!**/*.svg
v3/internal/runtime/desktop/@wailsio/runtime/package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (107)
docs/src/content/docs/changelog.mdx
(2 hunks)docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/examples/badge/README.md
(1 hunks)v3/examples/badge/Taskfile.yml
(1 hunks)v3/examples/badge/build/Taskfile.yml
(1 hunks)v3/examples/badge/build/config.yml
(1 hunks)v3/examples/badge/build/darwin/Info.dev.plist
(1 hunks)v3/examples/badge/build/darwin/Info.plist
(1 hunks)v3/examples/badge/build/darwin/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/appimage/build.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/nfpm.yaml
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
(1 hunks)v3/examples/badge/build/windows/Taskfile.yml
(1 hunks)v3/examples/badge/build/windows/info.json
(1 hunks)v3/examples/badge/build/windows/nsis/project.nsi
(1 hunks)v3/examples/badge/build/windows/nsis/wails_tools.nsh
(1 hunks)v3/examples/badge/build/windows/wails.exe.manifest
(1 hunks)v3/examples/badge/frontend/Inter Font License.txt
(1 hunks)v3/examples/badge/frontend/index.html
(1 hunks)v3/examples/badge/frontend/package.json
(1 hunks)v3/examples/badge/frontend/public/style.css
(1 hunks)v3/examples/badge/frontend/src/main.ts
(1 hunks)v3/examples/badge/frontend/src/vite-env.d.ts
(1 hunks)v3/examples/badge/frontend/tsconfig.json
(1 hunks)v3/examples/badge/main.go
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/.nojekyll
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/hierarchy.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/highlight.css
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/icons.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/main.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/navigation.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/search.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/style.css
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Call.RuntimeError.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelError.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelledRejectionError.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Events.WailsEvent.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Hide.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Show.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Browser.OpenURL.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByID.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByName.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.Call.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.SetText.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.Text.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Info.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.OpenFile.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Question.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.SaveFile.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Warning.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Emit.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Off.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OffAll.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.On.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OnMultiple.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Once.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Flags.GetFlag.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetAll.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetCurrent.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetPrimary.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Capabilities.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Environment.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsAMD64.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM64.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDarkMode.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDebug.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsLinux.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsMac.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsWindows.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.invoke.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Enable.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Reload.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/hierarchy.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/index.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseLike.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseWithResolvers.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.Button.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.FileFilter.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.OpenFileDialogOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Rect.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Screen.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Size.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.EnvironmentInfo.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.OSInfo.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.AddEventListenerOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.ArrayBufferView.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Blob.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.BlobPropertyBag.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.ErrorOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Event.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventInit.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventListener.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventListenerObject.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventListenerOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventTarget.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Iterable.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.MediaSource.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.MediaSourceEventMap.html
(0 hunks)
⛔ Files not processed due to max files limit (2)
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Position.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.PromiseFulfilledResult.html
💤 Files with no reviewable changes (78)
- v3/internal/runtime/desktop/@wailsio/runtime/docs/.nojekyll
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/hierarchy.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.Text.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Emit.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.SaveFile.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM64.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Capabilities.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Reload.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDarkMode.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Environment.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsMac.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.Button.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Enable.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.invoke.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Hide.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventInit.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OffAll.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsWindows.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.ArrayBufferView.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Question.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByName.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.SetText.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/highlight.css
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.MediaSourceEventMap.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/search.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetPrimary.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventListenerOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Info.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Browser.OpenURL.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.Call.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/index.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.OpenFile.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.AddEventListenerOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Once.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseWithResolvers.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Warning.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsAMD64.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Size.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Iterable.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.EnvironmentInfo.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventListenerObject.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.On.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Call.RuntimeError.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseLike.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByID.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/hierarchy.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Blob.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelledRejectionError.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.FileFilter.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDebug.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.BlobPropertyBag.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.OSInfo.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventListener.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.MediaSource.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Event.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.ErrorOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Off.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Show.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Rect.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsLinux.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetAll.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Screen.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetCurrent.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OnMultiple.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Flags.GetFlag.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/navigation.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Events.WailsEvent.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.OpenFileDialogOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/icons.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventTarget.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/style.css
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/main.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelError.html
✅ Files skipped from review due to trivial changes (4)
- v3/examples/badge/frontend/src/main.ts
- v3/examples/badge/build/linux/appimage/build.sh
- docs/src/content/docs/changelog.mdx
- v3/examples/badge/build/darwin/Taskfile.yml
🚧 Files skipped from review as they are similar to previous changes (21)
- v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
- v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
- v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
- v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
- v3/examples/badge/build/windows/info.json
- v3/examples/badge/build/darwin/Info.plist
- v3/examples/badge/Taskfile.yml
- v3/examples/badge/build/windows/wails.exe.manifest
- v3/examples/badge/frontend/src/vite-env.d.ts
- docs/src/content/docs/learn/badges.mdx
- v3/examples/badge/main.go
- v3/examples/badge/build/linux/nfpm/nfpm.yaml
- v3/examples/badge/build/darwin/Info.dev.plist
- v3/examples/badge/build/Taskfile.yml
- v3/examples/badge/frontend/public/style.css
- v3/examples/badge/frontend/index.html
- v3/examples/badge/frontend/tsconfig.json
- v3/examples/badge/frontend/package.json
- v3/examples/badge/build/windows/Taskfile.yml
- v3/examples/badge/build/linux/Taskfile.yml
- v3/examples/badge/build/windows/nsis/wails_tools.nsh
🧰 Additional context used
🪛 LanguageTool
v3/examples/badge/README.md
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~59-~59: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2020 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...
(EN_EXCESSIVE_EXCLAMATION)
v3/examples/badge/frontend/Inter Font License.txt
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...
(DASH_RULE)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge/README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 YAMLlint (1.35.1)
v3/examples/badge/build/config.yml
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (2)
v3/examples/badge/frontend/Inter Font License.txt (1)
1-94
: License file looks good.The SIL Open Font License is properly included for the Inter font used in the frontend. This ensures proper legal compliance for font usage in the application.
🧰 Tools
🪛 LanguageTool
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...(DASH_RULE)
v3/examples/badge/build/windows/nsis/project.nsi (1)
1-113
: NSIS installer configuration is well structured.The installer script includes comprehensive documentation, proper version information, WebView2 runtime handling, and follows Windows installer best practices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
v3/examples/badge/README.md (1)
39-39
: Update documentation URL to v3-specific site
Per previous feedback, the README should point to the Wails v3 alpha documentation rather than the generic v3 site.- 3. **Explore the documentation**: Visit the [Wails3 documentation](https://v3.wails.io/) for in-depth guides and API references. + 3. **Explore the documentation**: Visit the [Wails v3 documentation](https://v3alpha.wails.io/) for in-depth guides and API references.
🧹 Nitpick comments (2)
v3/examples/badge/build/config.yml (1)
63-63
: Add newline at end of file
YAML files should end with a single newline character to satisfy POSIX standards and avoid warnings from tools likeyamllint
.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
v3/examples/badge/README.md (1)
11-13
: Specify fenced code block languages
Markdown code fences should include a language specifier (e.g.,bash or
shell) to enable proper syntax highlighting and improve readability.Also applies to: 19-21, 33-35
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (7)
v3/examples/badge/build/appicon.png
is excluded by!**/*.png
v3/examples/badge/build/windows/icon.ico
is excluded by!**/*.ico
v3/examples/badge/frontend/public/Inter-Medium.ttf
is excluded by!**/*.ttf
v3/examples/badge/frontend/public/typescript.svg
is excluded by!**/*.svg
v3/examples/badge/frontend/public/wails.png
is excluded by!**/*.png
v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/icons.svg
is excluded by!**/*.svg
v3/internal/runtime/desktop/@wailsio/runtime/package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (107)
docs/src/content/docs/changelog.mdx
(2 hunks)docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/examples/badge/README.md
(1 hunks)v3/examples/badge/Taskfile.yml
(1 hunks)v3/examples/badge/build/Taskfile.yml
(1 hunks)v3/examples/badge/build/config.yml
(1 hunks)v3/examples/badge/build/darwin/Info.dev.plist
(1 hunks)v3/examples/badge/build/darwin/Info.plist
(1 hunks)v3/examples/badge/build/darwin/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/appimage/build.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/nfpm.yaml
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
(1 hunks)v3/examples/badge/build/windows/Taskfile.yml
(1 hunks)v3/examples/badge/build/windows/info.json
(1 hunks)v3/examples/badge/build/windows/nsis/project.nsi
(1 hunks)v3/examples/badge/build/windows/nsis/wails_tools.nsh
(1 hunks)v3/examples/badge/build/windows/wails.exe.manifest
(1 hunks)v3/examples/badge/frontend/Inter Font License.txt
(1 hunks)v3/examples/badge/frontend/index.html
(1 hunks)v3/examples/badge/frontend/package.json
(1 hunks)v3/examples/badge/frontend/public/style.css
(1 hunks)v3/examples/badge/frontend/src/main.ts
(1 hunks)v3/examples/badge/frontend/src/vite-env.d.ts
(1 hunks)v3/examples/badge/frontend/tsconfig.json
(1 hunks)v3/examples/badge/main.go
(1 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/.nojekyll
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/hierarchy.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/highlight.css
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/icons.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/main.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/navigation.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/search.js
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/style.css
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Call.RuntimeError.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelError.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelledRejectionError.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Events.WailsEvent.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Hide.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Show.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Browser.OpenURL.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByID.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByName.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.Call.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.SetText.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.Text.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Info.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.OpenFile.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Question.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.SaveFile.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Warning.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Emit.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Off.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OffAll.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.On.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OnMultiple.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Once.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Flags.GetFlag.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetAll.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetCurrent.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetPrimary.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Capabilities.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Environment.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsAMD64.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM64.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDarkMode.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDebug.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsLinux.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsMac.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsWindows.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.invoke.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Enable.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Reload.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/hierarchy.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/index.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseLike.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseWithResolvers.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.Button.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.FileFilter.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.OpenFileDialogOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Rect.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Screen.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Size.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.EnvironmentInfo.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.OSInfo.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.AddEventListenerOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.ArrayBufferView.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Blob.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.BlobPropertyBag.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.ErrorOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Event.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventInit.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventListener.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventListenerObject.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventListenerOptions.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.EventTarget.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.Iterable.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.MediaSource.html
(0 hunks)v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/_internal_.MediaSourceEventMap.html
(0 hunks)
⛔ Files not processed due to max files limit (2)
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Position.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.PromiseFulfilledResult.html
💤 Files with no reviewable changes (78)
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/hierarchy.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetCurrent.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Reload.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsMac.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.MediaSourceEventMap.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.MessageDialogOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventTarget.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/.nojekyll
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.AddEventListenerOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OffAll.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Iterable.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.OpenFile.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsAMD64.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Flags.GetFlag.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.Text.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Once.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.invoke.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Quit.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM64.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseWithResolvers.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsARM.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetPrimary.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Error.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.EnvironmentInfo.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.On.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Emit.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/search.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Show.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsLinux.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDebug.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.OnMultiple.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Screens.GetAll.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/navigation.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/System.OSInfo.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/highlight.css
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Info.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Warning.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.ArrayBufferView.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Capabilities.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.Environment.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Clipboard.SetText.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventInit.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventListener.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Events.Off.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventListenerObject.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.Call.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/CancellablePromiseLike.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByID.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.Question.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Screen.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/style.css
- v3/internal/runtime/desktop/@wailsio/runtime/docs/hierarchy.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Browser.OpenURL.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.Button.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelError.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.MediaSource.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Application.Hide.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Call.ByName.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsWindows.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/Dialogs.SaveFile.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/WML.Enable.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Blob.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.EventListenerOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.SaveFileDialogOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.FileFilter.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Call.RuntimeError.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/functions/System.IsDarkMode.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Size.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/CancelledRejectionError.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.BlobPropertyBag.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/main.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/classes/Events.WailsEvent.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.ErrorOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/index.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/internal.Event.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/assets/icons.js
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Dialogs.OpenFileDialogOptions.html
- v3/internal/runtime/desktop/@wailsio/runtime/docs/interfaces/Screens.Rect.html
✅ Files skipped from review due to trivial changes (3)
- v3/examples/badge/build/darwin/Info.plist
- v3/examples/badge/build/windows/Taskfile.yml
- v3/examples/badge/build/windows/nsis/wails_tools.nsh
🚧 Files skipped from review as they are similar to previous changes (22)
- v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
- v3/examples/badge/main.go
- v3/examples/badge/frontend/src/main.ts
- v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
- v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
- v3/examples/badge/build/windows/info.json
- v3/examples/badge/Taskfile.yml
- v3/examples/badge/build/windows/wails.exe.manifest
- v3/examples/badge/frontend/src/vite-env.d.ts
- v3/examples/badge/build/linux/appimage/build.sh
- v3/examples/badge/frontend/index.html
- docs/src/content/docs/changelog.mdx
- v3/examples/badge/frontend/public/style.css
- v3/examples/badge/build/darwin/Info.dev.plist
- v3/examples/badge/frontend/tsconfig.json
- v3/examples/badge/frontend/package.json
- v3/examples/badge/build/darwin/Taskfile.yml
- v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
- v3/examples/badge/build/linux/nfpm/nfpm.yaml
- v3/examples/badge/build/windows/nsis/project.nsi
- v3/examples/badge/build/Taskfile.yml
- v3/examples/badge/build/linux/Taskfile.yml
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~101-~101: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
v3/examples/badge/README.md
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~59-~59: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2020 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...
(EN_EXCESSIVE_EXCLAMATION)
v3/examples/badge/frontend/Inter Font License.txt
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...
(DASH_RULE)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge/README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 YAMLlint (1.35.1)
v3/examples/badge/build/config.yml
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (3)
v3/examples/badge/build/config.yml (1)
8-10
: Verify and customize placeholder metadata
Fields likecompanyName
,productName
, andproductIdentifier
are generic placeholders. Ensure these are updated to match the actual example application’s identity before using this config in a real project.v3/examples/badge/frontend/Inter Font License.txt (1)
1-94
: License file content approved
The SIL Open Font License text is correctly included and should remain unmodified to preserve legal requirements.🧰 Tools
🪛 LanguageTool
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...(DASH_RULE)
docs/src/content/docs/learn/badges.mdx (1)
1-123
: LGTM! Documentation is clear and comprehensive.
The new "Badges" page effectively covers initialization, usage, platform considerations, best practices, and API reference for the badge service.🧰 Tools
🪛 LanguageTool
[uncategorized] ~101-~101: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (2)
v3/examples/badge/build/config.yml (1)
47-48
: Remove or update placeholder URL.The comment
# More information at: https://v3.wails.io/noit/done/yet
references a non-existent or placeholder path. Please correct or remove it to avoid confusion.
v3/examples/badge/README.md (1)
39-39
: Update Wails v3 documentation URLThe documentation URL needs to be updated to the v3-specific site.
-3. **Explore the documentation**: Visit the [Wails3 documentation](https://v3.wails.io/) for in-depth guides and API references. +3. **Explore the documentation**: Visit the [Wails v3 documentation](https://v3alpha.wails.io/) for in-depth guides and API references.
🧹 Nitpick comments (10)
v3/examples/badge/build/config.yml (3)
7-15
: Customize project metadata for the badge example.The fields under
info:
still contain generic placeholders (e.g.,"My Company"
,"My Product"
,"com.mycompany.myproduct"
, description, comments, version). To make the example self-contained and meaningful, please update these values to reflect the actual badge example project’s name, identifier, description, and version.
61-63
: Remove unused placeholder section.If the
other:
section (and itsMy Other Data
entry) isn’t actually consumed by any build or tooling step, consider removing it to clean up dead configuration.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
63-63
: Add newline at end of file.Ensure the file ends with a newline character to satisfy POSIX conventions and avoid YAML lint errors.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
v3/examples/badge/README.md (4)
11-13
: Add a language specifier to the code block.Adding a language specifier improves syntax highlighting and readability.
- ``` + ```bash🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
19-21
: Add a language specifier to the code block.Adding a language specifier improves syntax highlighting and readability.
- ``` + ```bash🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
19-19: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
33-35
: Add a language specifier to the code block.Adding a language specifier improves syntax highlighting and readability.
- ``` + ```bash🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
33-33: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
47-48
: Fix consistent formatting in project structure.Ensure consistent formatting in the project structure section by fixing the extra space at the end of line 47.
-- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) +- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript)🧰 Tools
🪛 LanguageTool
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: -frontend/
: Contains your frontend code (HTML, CSS,...(UNLIKELY_OPENING_PUNCTUATION)
v3/pkg/services/badge/badge_darwin.go (1)
12-14
: Fix inconsistent indentation in C code.The C code block uses inconsistent indentation (mix of tabs and spaces). Line 12 uses a tab while surrounding lines use spaces.
#import <Cocoa/Cocoa.h> static void setBadge(const char *label) { NSString *nsLabel = nil; - if (label != NULL) { - nsLabel = [NSString stringWithUTF8String:label]; - } + if (label != NULL) { + nsLabel = [NSString stringWithUTF8String:label]; + } [[NSApp dockTile] setBadgeLabel:nsLabel]; [[NSApp dockTile] display]; }v3/pkg/services/badge/badge.go (1)
18-18
: Fix incorrect service description in comment.The comment incorrectly describes this as a notifications service, but it's actually a badge service.
-// Service represents the notifications service +// Service represents the badge servicev3/pkg/services/badge/badge_windows.go (1)
116-139
:label
argument is silently ignored on Windows – document or validate.The API allows callers to set an arbitrary label, but Windows overlay icons can only display an icon, not text. Silently discarding the label may confuse users.
Options:
- Document the limitation clearly in the public interface.
- Return an error on Windows if a non-empty label is supplied, signalling unsupported functionality.
- Render the label into the generated icon (mini text render) for partial fidelity.
At minimum, a comment + doc update is recommended.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
v3/examples/badge/build/appicon.png
is excluded by!**/*.png
v3/examples/badge/build/windows/icon.ico
is excluded by!**/*.ico
v3/examples/badge/frontend/public/Inter-Medium.ttf
is excluded by!**/*.ttf
v3/examples/badge/frontend/public/typescript.svg
is excluded by!**/*.svg
v3/examples/badge/frontend/public/wails.png
is excluded by!**/*.png
📒 Files selected for processing (32)
docs/src/content/docs/changelog.mdx
(2 hunks)docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/examples/badge/README.md
(1 hunks)v3/examples/badge/Taskfile.yml
(1 hunks)v3/examples/badge/build/Taskfile.yml
(1 hunks)v3/examples/badge/build/config.yml
(1 hunks)v3/examples/badge/build/darwin/Info.dev.plist
(1 hunks)v3/examples/badge/build/darwin/Info.plist
(1 hunks)v3/examples/badge/build/darwin/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/Taskfile.yml
(1 hunks)v3/examples/badge/build/linux/appimage/build.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/nfpm.yaml
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
(1 hunks)v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
(1 hunks)v3/examples/badge/build/windows/Taskfile.yml
(1 hunks)v3/examples/badge/build/windows/info.json
(1 hunks)v3/examples/badge/build/windows/nsis/project.nsi
(1 hunks)v3/examples/badge/build/windows/nsis/wails_tools.nsh
(1 hunks)v3/examples/badge/build/windows/wails.exe.manifest
(1 hunks)v3/examples/badge/frontend/Inter Font License.txt
(1 hunks)v3/examples/badge/frontend/index.html
(1 hunks)v3/examples/badge/frontend/package.json
(1 hunks)v3/examples/badge/frontend/public/style.css
(1 hunks)v3/examples/badge/frontend/src/main.ts
(1 hunks)v3/examples/badge/frontend/src/vite-env.d.ts
(1 hunks)v3/examples/badge/frontend/tsconfig.json
(1 hunks)v3/examples/badge/main.go
(1 hunks)v3/pkg/services/badge/badge.go
(1 hunks)v3/pkg/services/badge/badge_darwin.go
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (25)
- v3/examples/badge/build/linux/nfpm/scripts/preinstall.sh
- v3/examples/badge/build/windows/info.json
- v3/examples/badge/frontend/src/main.ts
- v3/examples/badge/build/linux/nfpm/scripts/postremove.sh
- v3/examples/badge/build/linux/nfpm/scripts/postinstall.sh
- v3/examples/badge/frontend/src/vite-env.d.ts
- v3/examples/badge/frontend/tsconfig.json
- v3/examples/badge/build/linux/nfpm/scripts/preremove.sh
- docs/src/content/docs/changelog.mdx
- v3/examples/badge/build/darwin/Info.plist
- v3/examples/badge/Taskfile.yml
- v3/examples/badge/main.go
- v3/examples/badge/frontend/index.html
- v3/examples/badge/build/windows/wails.exe.manifest
- v3/examples/badge/build/linux/appimage/build.sh
- v3/examples/badge/build/linux/nfpm/nfpm.yaml
- v3/examples/badge/build/windows/nsis/project.nsi
- v3/examples/badge/frontend/package.json
- v3/examples/badge/build/darwin/Info.dev.plist
- v3/examples/badge/frontend/public/style.css
- v3/examples/badge/build/windows/Taskfile.yml
- v3/examples/badge/build/linux/Taskfile.yml
- v3/examples/badge/build/Taskfile.yml
- v3/examples/badge/build/darwin/Taskfile.yml
- v3/examples/badge/build/windows/nsis/wails_tools.nsh
🧰 Additional context used
🧬 Code Graph Analysis (1)
v3/pkg/services/badge/badge.go (1)
v3/pkg/application/services.go (4)
ServiceOptions
(17-40)ServiceName
(73-75)ServiceStartup
(98-100)ServiceShutdown
(118-120)
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~101-~101: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
v3/examples/badge/README.md
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~59-~59: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2020 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...
(EN_EXCESSIVE_EXCLAMATION)
v3/examples/badge/frontend/Inter Font License.txt
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...
(DASH_RULE)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge/README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 YAMLlint (1.35.1)
v3/examples/badge/build/config.yml
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (6)
v3/examples/badge/frontend/Inter Font License.txt (1)
1-94
: Approve addition of the SIL Open Font License text
This file correctly includes the verbatim SIL Open Font License (OFL) Version 1.1, ensuring proper attribution and legal compliance for the Inter font used in the badge example frontend. As this is a standard license, no alterations should be made to its content or formatting.🧰 Tools
🪛 LanguageTool
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...(DASH_RULE)
v3/examples/badge/build/config.yml (2)
17-33
: Dev mode configuration looks good.The
dev_mode
settings—includingroot_path
, ignore patterns, and watched extensions—are well-structured and consistent with other examples in the repo.
34-44
: Approve development commands sequence.The
executes
block installs frontend dependencies, runs builds, and starts the application in the correct order. This matches existing conventions and should ensure a smooth dev workflow.docs/src/content/docs/learn/badges.mdx (1)
1-123
: Well-structured and comprehensive documentation.The badges documentation is well-organized with clear explanations, code examples, platform-specific details, and API references. The use of tabs for platform-specific information makes it easy to navigate.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~101-~101: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
v3/pkg/services/badge/badge_darwin.go (1)
1-57
: Well-implemented macOS badge service.The macOS badge implementation correctly interfaces with Cocoa to manipulate the dock tile badge. Memory management for C strings is properly handled with deferred
free()
calls.v3/pkg/services/badge/badge.go (1)
9-45
: Well-designed badge service abstraction.The badge service implementation follows a clean architecture with proper interface separation. The platform-agnostic
Service
struct delegates to platform-specific implementations through theplatformBadge
interface, allowing for different implementations on different platforms while maintaining a consistent API.
There was a problem hiding this comment.
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 (6)
v3/examples/badge/README.md (6)
11-13
: Specify a language for the fenced code block
Adding a language identifier enhances syntax highlighting for users.Apply this diff:
- ``` + ```bash wails3 dev - ``` + ```bash🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
19-21
: Specify a language for the fenced code block
Please add a language specifier for the build command snippet.- ``` + ```bash wails3 build - ``` + ```bash🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
19-19: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
33-35
: Specify a language for the fenced code block
Include a language identifier for the example run command.- ``` + ```bash go run . - ``` + ```bash🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
33-33: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
29-29
: Simplify redundant path reference
The phrase “examples
directory in thev3/examples
directory” is repetitive. Consider collapsing it to a single path.- Visit the `examples` directory in the `v3/examples` directory to see various sample applications. + Visit the `v3/examples` directory to see various sample applications.
23-24
: Add note about Linux support
The PR indicates Linux wasn’t tested; it’s helpful to call out current platform coverage.@@ - This will create a production-ready executable in the `build` directory. + This will create a production-ready executable in the `build` directory. + + **Supported Platforms:** macOS, Windows (Linux support coming soon)
58-58
: Tone down the exclamation
Reducing exclamation marks makes the tone more professional.- Happy coding with Wails3! If you encounter any issues or have questions, don't hesitate to consult the documentation or reach out to the Wails community. + Happy coding with Wails3. If you encounter any issues or have questions, don't hesitate to consult the documentation or reach out to the Wails community.🧰 Tools
🪛 LanguageTool
[style] ~58-~58: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2026 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...(EN_EXCESSIVE_EXCLAMATION)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
v3/examples/badge/README.md
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- v3/pkg/services/badge/badge_windows.go
🧰 Additional context used
🪛 LanguageTool
v3/examples/badge/README.md
[uncategorized] ~46-~46: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~58-~58: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2026 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...
(EN_EXCESSIVE_EXCLAMATION)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge/README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
v3/pkg/services/badge/badge_windows.go (4)
141-178
: Consider caching badge images for performanceThe current implementation recreates the badge image on every call to
SetBadge()
. For frequently updated badges with the same content, this could be inefficient.Consider caching created badge images by label to avoid regenerating identical badges:
type windowsBadge struct { taskbar *ITaskbarList3 badgeImg *image.RGBA badgeSize int + badgeCache map[string]w32.HICON } func New() *Service { return &Service{ - impl: &windowsBadge{}, + impl: &windowsBadge{ + badgeCache: make(map[string]w32.HICON), + }, } } func (w *windowsBadge) SetBadge(label string) error { // ... + // Check cache first + if icon, exists := w.badgeCache[label]; exists { + return w.taskbar.SetOverlayIcon(syscall.Handle(hwnd), syscall.Handle(icon), nil) + } // ...create icon as before... + + // Cache the icon for future use + w.badgeCache[label] = hicon + // Don't destroy the icon when using from cache - defer w32.DestroyIcon(hicon) return w.taskbar.SetOverlayIcon(syscall.Handle(hwnd), syscall.Handle(hicon), nil) } // Add cleanup in Shutdown func (w *windowsBadge) Shutdown() error { if w.taskbar != nil { syscall.SyscallN(w.taskbar.lpVtbl.Release, uintptr(unsafe.Pointer(w.taskbar))) ole32.NewProc("CoUninitialize").Call() } + + // Clean up cached icons + for _, icon := range w.badgeCache { + w32.DestroyIcon(icon) + } + w.badgeCache = nil return nil }This optimization would be most beneficial in applications that frequently toggle between a small set of badge states.
180-201
: Reduce code duplication for window and handle retrievalThis method shares significant code duplication with
SetBadge()
for retrieving the application window and handle.Consider extracting the duplicate code into a helper method:
+func (w *windowsBadge) getWindowHandle() (syscall.Handle, error) { + app := application.Get() + if app == nil { + return 0, nil + } + + window := app.CurrentWindow() + if window == nil { + return 0, nil + } + + hwnd, err := window.NativeWindowHandle() + if err != nil { + return 0, err + } + + return syscall.Handle(hwnd), nil +} func (w *windowsBadge) RemoveBadge() error { if w.taskbar == nil { return nil } - app := application.Get() - if app == nil { - return nil - } - - window := app.CurrentWindow() - if window == nil { - return nil - } - - hwnd, err := window.NativeWindowHandle() - if err != nil { - return err - } + hwnd, err := w.getWindowHandle() + if err != nil { + return err + } + if hwnd == 0 { + return nil + } - return w.taskbar.SetOverlayIcon(syscall.Handle(hwnd), 0, nil) + return w.taskbar.SetOverlayIcon(hwnd, 0, nil) }Then update
SetBadge()
to use this helper method as well.
229-240
: Consider caching font path lookupThe font path search occurs for every badge creation with text, which could be inefficient.
Consider caching the font path at initialization time:
type windowsBadge struct { taskbar *ITaskbarList3 badgeImg *image.RGBA badgeSize int + fontPath string } func (w *windowsBadge) Startup(ctx context.Context, options application.ServiceOptions) error { taskbar, err := newTaskbarList3() if err != nil { return err } w.taskbar = taskbar + + // Find and cache font path + for _, path := range findfont.List() { + if strings.Contains(strings.ToLower(path), "segoeuib.ttf") || // Segoe UI Bold + strings.Contains(strings.ToLower(path), "arialbd.ttf") { + w.fontPath = path + break + } + } return nil } func (w *windowsBadge) createBadgeIconWithText(label string) (w32.HICON, error) { - fontPath := "" - for _, path := range findfont.List() { - if strings.Contains(strings.ToLower(path), "segoeuib.ttf") || // Segoe UI Bold - strings.Contains(strings.ToLower(path), "arialbd.ttf") { - fontPath = path - break - } - } - if fontPath == "" { + if w.fontPath == "" { return w.createBadgeIcon() }
252-255
: Improve font size adjustment for better readabilityThe current font size adjustment is very basic (only two sizes based on label length).
Consider a more graduated approach for better readability:
- fontSize := 18.0 - if len(label) > 1 { - fontSize = 14.0 - } + // More graduated font sizing based on text length + fontSize := 18.0 + switch { + case len(label) <= 1: + fontSize = 18.0 + case len(label) <= 2: + fontSize = 16.0 + case len(label) <= 3: + fontSize = 14.0 + case len(label) <= 4: + fontSize = 12.0 + default: + fontSize = 10.0 + }This provides better visual scaling for different label lengths and improves readability.
docs/src/content/docs/learn/badges.mdx (1)
93-102
: Improve grammar in best practices sectionThere's a minor grammatical issue in the best practices section.
Fix the grammar by adding a preposition:
1. Use badges sparingly: - Too many badge updates can distract users - - Reserve badges for important notifications + - Reserve badges for important notifications onlyThis small change improves the clarity and completeness of the sentence.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~97-~97: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
v3/go.sum
is excluded by!**/*.sum
📒 Files selected for processing (4)
docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/go.mod
(1 hunks)v3/pkg/services/badge/badge_darwin.go
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- v3/go.mod
🚧 Files skipped from review as they are similar to previous changes (1)
- v3/pkg/services/badge/badge_darwin.go
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~97-~97: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
🔇 Additional comments (9)
v3/pkg/services/badge/badge_windows.go (6)
1-2
: LGTM: Appropriate build constraintThe build constraint correctly limits this file to Windows platforms, which is essential since this code uses Windows-specific APIs.
5-22
: Imports look goodAll necessary imports are present for Windows badge implementation using COM interfaces and image manipulation.
24-27
: LGTM: Clean DLL loadingDLL loading implementation has been improved from a previous version, removing unused
shobjidl
reference.
33-36
: LGTM: Well-defined Windows interface identifiersGUIDs for TaskbarList and ITaskbarList3 interfaces are correctly defined.
66-94
: COM initialization and cleanup properly implementedThe COM initialization includes proper error handling and cleanup. This implementation addresses previous review comments about COM initialization and interface lifecycle.
110-130
: LGTM: Service structure and initializationService implementation correctly follows the platform interface pattern and properly initializes the COM interface.
docs/src/content/docs/learn/badges.mdx (3)
5-10
: LGTM: Well-structured documentation introductionThe introduction clearly explains the purpose and use case for badges in desktop applications.
59-91
: LGTM: Clear platform-specific documentationThe platform-specific sections clearly document the behavior and limitations for each supported platform.
105-114
: LGTM: Clear API reference documentationThe API reference documentation clearly defines all methods available in the badge service.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
docs/src/content/docs/learn/badges.mdx (3)
1-6
: Consider enriching frontmatter for SEO and context.The current frontmatter only specifies the title. Many documentation pages include a
description
field to improve SEO and provide a brief summary for internal navigation.
93-99
: Refine Best Practices phrasing.Line 95 reads “- Reserve badges for important notifications”. Consider rephrasing to “- Reserve badges to indicate important notifications” for added clarity.
- - Reserve badges for important notifications + - Reserve badges to indicate important notifications🧰 Tools
🪛 LanguageTool
[uncategorized] ~95-~95: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
115-117
: Minor grammatical tweak in Structs and Types.Consider adjusting “beyond the standard error return types” to singular “type,” since there is only one error return type.
-This service doesn't define any specific structs or types beyond the standard error return types. +This service doesn't define any specific structs or types beyond the standard error return type.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/src/content/docs/learn/badges.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~95-~95: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
🔇 Additional comments (4)
docs/src/content/docs/learn/badges.mdx (4)
36-45
: Verify the behavior ofSetBadge("")
as the “default badge.”The docs show using an empty string (
SetBadge("")
) to set a “default badge.” On some platforms (notably macOS), an empty label may clear the badge instead of applying a default marker. Please confirm that this matches the implementation or clarify the intended behavior.
49-53
: Set up clear badge removal example.The
RemoveBadge
snippet is concise and correctly formatted. The code fence uses thego
language tag, which aligns with the rest of the document.
57-89
: Platform considerations are comprehensive.The macOS, Windows, and Linux tabs clearly explain supported features and limitations. The structure using
<Tabs>
and<TabItem>
is consistent with other documentation pages.
104-113
: API Reference looks accurate.The
New()
,SetBadge(label string) error
, andRemoveBadge() error
entries match the service interface, and the table formatting is correct.
There was a problem hiding this comment.
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 (2)
docs/src/content/docs/learn/badges.mdx (2)
38-47
: Badge setting snippet demonstrates usage clearly.
Consider adding minimal error handling aroundSetBadge
since it returns anerror
. For example:- badgeService.SetBadge("3") + if err := badgeService.SetBadge("3"); err != nil { + // handle error + }This will help readers adopt best practices when integrating the API.
53-55
: Badge removal snippet is clear.
Similarly, sinceRemoveBadge()
returns anerror
, you may want to mirror the error-handling pattern to keep examples consistent.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/src/content/docs/learn/badges.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~97-~97: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
🔇 Additional comments (7)
docs/src/content/docs/learn/badges.mdx (7)
1-3
: Frontmatter metadata is well-defined.
Thetitle
frontmatter is set correctly, and the YAML block properly delimits the MDX content.
5-5
: Import components for tabbed UI.
Tabs
andTabItem
are correctly imported from@astrojs/starlight/components
and used in the Platform Considerations section below.
17-30
: Service initialization example is accurate and well-formatted.
The Go snippet correctly importsapplication
andbadge
, demonstratesbadge.New()
, and shows registration viaapplication.Options
. Code fences with thego
language hint are applied properly.
59-91
: Platform Considerations are comprehensive.
The behaviors for macOS, Windows, and Linux are accurately described—covering styling, theme adaptation, overflow handling, and window requirements. This will help users understand platform limitations and capabilities.
93-102
: Best Practices section is concise and actionable.
The guidelines on sparing use and keeping badge text short are clear and precise.🧰 Tools
🪛 LanguageTool
[uncategorized] ~97-~97: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
104-115
: API Reference table is accurate.
Method signatures (New()
,SetBadge(label string) error
,RemoveBadge() error
) and descriptions align with the implementation.
116-118
: Structs and Types section is clear.
It's correct that no additional structs beyond the standard error return types are defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (3)
v3/examples/badge/main.go (1)
80-86
: Prefertime.Ticker
over manualfor{Sleep}
loopUsing a
time.Ticker
makes intent explicit, avoids time-drift on long-running apps, and allows a cleanStop()
when the app exits.- go func() { - for { - now := time.Now().Format(time.RFC1123) - app.EmitEvent("time", now) - time.Sleep(time.Second) - } - }() + ticker := time.NewTicker(time.Second) + go func() { + defer ticker.Stop() + for now := range ticker.C { + app.EmitEvent("time", now.Format(time.RFC1123)) + } + }()This also eliminates a potential goroutine leak in case
app.Run()
returns unexpectedly.v3/pkg/services/badge/font.go (2)
24-27
: Environment variable names should match Windows conventionAlthough Windows env-vars are case-insensitive, using canonical names avoids surprises in edge cases (e.g., when running through Wine or exotic shells).
- filepath.Join(os.Getenv("windir"), "Fonts"), - filepath.Join(os.Getenv("localappdata"), "Microsoft", "Windows", "Fonts"), + filepath.Join(os.Getenv("WINDIR"), "Fonts"), + filepath.Join(os.Getenv("LOCALAPPDATA"), "Microsoft", "Windows", "Fonts"),A fallback to
C:\Windows\Fonts
whenWINDIR
is empty would make the lookup even more robust.
65-71
: Skip non-existent font directories early to save I/O
fileExists()
on a path like\Fonts\foo.ttf
whenWINDIR
was empty always returns an error. Guarding once per directory avoids a stat per call and keeps the hot path fast.for _, dir := range fm.fontDirs { - fontPath := filepath.Join(dir, fontFilename) - if fileExists(fontPath) { - return fontPath, nil - } + if dirExists(dir) { + fontPath := filepath.Join(dir, fontFilename) + if fileExists(fontPath) { + return fontPath, nil + } + } }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
v3/examples/badge/frontend/dist/assets/index-sXwpgKSV.js
is excluded by!**/dist/**
v3/examples/badge/frontend/dist/index.html
is excluded by!**/dist/**
v3/examples/badge/frontend/dist/style.css
is excluded by!**/dist/**
v3/examples/dev/go.sum
is excluded by!**/*.sum
📒 Files selected for processing (8)
v3/examples/badge/frontend/index.html
(1 hunks)v3/examples/badge/frontend/public/style.css
(1 hunks)v3/examples/badge/frontend/src/main.ts
(1 hunks)v3/examples/badge/main.go
(1 hunks)v3/examples/dev/go.mod
(1 hunks)v3/go.mod
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)v3/pkg/services/badge/font.go
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- v3/examples/dev/go.mod
- v3/go.mod
🚧 Files skipped from review as they are similar to previous changes (3)
- v3/examples/badge/frontend/index.html
- v3/examples/badge/frontend/src/main.ts
- v3/examples/badge/frontend/public/style.css
🔇 Additional comments (1)
v3/pkg/services/badge/badge_windows.go (1)
125-134
: Potential cross-thread COM usage
Startup
createsITaskbarList3
and stores the pointer. Later,SetBadge
/RemoveBadge
are triggered by Wails events, which may run on different goroutines/threads.
ITaskbarList3
is an STA interface; calling it from a thread other than the one that created it is undefined behaviour and can crash.Mitigations:
- Marshal the interface with
CoMarshalInterThreadInterfaceInStream
and unmarshal on each calling thread, or- Execute all badge operations on the same goroutine that called
Startup
(e.g., via a dedicated worker channel).Please verify Wails’ service threading guarantees; if they do not match STA requirements, add marshaling.
app.OnEvent("set:badge", func(event *application.CustomEvent) { | ||
text := event.Data.(string) | ||
err := badgeService.SetBadge(text) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard against panic when asserting event.Data.(string)
event.Data
is any
; if the frontend accidentally sends null
, an object instead of a string, or forgets the payload altogether, the type assertion will panic and kill the entire application.
- text := event.Data.(string)
+ text, ok := event.Data.(string)
+ if !ok {
+ log.Printf("set:badge event ignored – expected string payload, got %T", event.Data)
+ return
+ }
Consider returning an error to the frontend as well.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
app.OnEvent("set:badge", func(event *application.CustomEvent) { | |
text := event.Data.(string) | |
err := badgeService.SetBadge(text) | |
if err != nil { | |
log.Fatal(err) | |
} | |
}) | |
app.OnEvent("set:badge", func(event *application.CustomEvent) { | |
text, ok := event.Data.(string) | |
if !ok { | |
log.Printf("set:badge event ignored – expected string payload, got %T", event.Data) | |
return | |
} | |
err := badgeService.SetBadge(text) | |
if err != nil { | |
log.Fatal(err) | |
} | |
}) |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (2)
v3/pkg/services/badge/badge_windows.go (2)
126-126
:⚠️ Potential issueUnused context parameter
The
ctx
parameter is unused and will cause a Go compilation error. Either use the parameter or rename it to underscore to explicitly indicate it's unused.-func (w *windowsBadge) Startup(ctx context.Context, options application.ServiceOptions) error { +func (w *windowsBadge) Startup(_ context.Context, options application.ServiceOptions) error {
236-248
: 🛠️ Refactor suggestionImprove font fallback logic
The current implementation doesn't properly handle font fallback. If the primary font lookup fails, the error is returned immediately without trying the fallback font.
- fontPath, err = w.fontManager.FindFont("segoeuib.ttf") - if err != nil { - return 0, err - } - if fontPath == "" { - fontPath, err = w.fontManager.FindFont("arialbd.ttf") - if err != nil { - return 0, err - } - } + fontPath, _ = w.fontManager.FindFont("segoeuib.ttf") + if fontPath == "" { + fontPath, _ = w.fontManager.FindFont("arialbd.ttf") + }This change allows the code to try the fallback font even if the primary font isn't found, improving resilience on non-English Windows systems.
🧹 Nitpick comments (2)
v3/pkg/services/badge/badge_windows.go (2)
146-183
: Add theme support for the badge colorThe badge currently uses a fixed red color, which may not be appropriate for all application themes. Consider detecting the system theme and adjusting the badge color accordingly.
You could use the Windows Registry to detect the current theme:
// Add to imports import "golang.org/x/sys/windows/registry" // Add to SetBadge method func (w *windowsBadge) SetBadge(label string) error { // Existing code... // Determine if dark mode is enabled isDarkMode := false k, err := registry.OpenKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\Themes\Personalize`, registry.QUERY_VALUE) if err == nil { defer k.Close() if val, _, err := k.GetIntegerValue("AppsUseDarkTheme"); err == nil && val == 1 { isDarkMode = true } } // Create badge with theme-aware color w.createBadge(isDarkMode) // Rest of existing code... } // Update createBadge to accept theme parameter func (w *windowsBadge) createBadge(isDarkMode bool) { w.badgeSize = 32 img := image.NewRGBA(image.Rect(0, 0, w.badgeSize, w.badgeSize)) // Choose color based on theme var badgeColor color.RGBA if isDarkMode { badgeColor = color.RGBA{220, 0, 0, 255} // Slightly darker red for dark mode } else { badgeColor = color.RGBA{255, 0, 0, 255} // Bright red for light mode } // Rest of existing drawing code... }
413-430
: Optimize helper functionsThe helper functions at the end of the file could be made more efficient.
func contains(slice []string, item string) bool { + // Use a map for O(1) lookup performance with large collections + seen := make(map[string]struct{}, len(slice)) for _, s := range slice { - if strings.EqualFold(s, item) { - return true - } + seen[strings.ToLower(s)] = struct{}{} } - return false + _, exists := seen[strings.ToLower(item)] + return exists }This optimization would be especially beneficial if the font collection is large, as map lookups are O(1) instead of O(n) for slice iteration.
return err | ||
} | ||
|
||
w.createBadge() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Potential memory leak: badge image creation
The createBadge()
method is called every time SetBadge()
is called, resulting in a new image allocation. This could lead to memory pressure under frequent badge updates.
Consider caching the badge image and only recreating it when necessary:
- w.createBadge()
+ // Only create the badge image if it doesn't exist
+ if w.badgeImg == nil {
+ w.createBadge()
+ }
if err := png.Encode(&buf, w.badgeImg); err != nil { | ||
return 0, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Missing error handling for fallback to default badge
If PNG encoding fails, the function should fall back to the default badge icon for better error resilience.
var buf bytes.Buffer
if err := png.Encode(&buf, w.badgeImg); err != nil {
- return 0, err
+ return w.createBadgeIcon()
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if err := png.Encode(&buf, w.badgeImg); err != nil { | |
return 0, err | |
} | |
var buf bytes.Buffer | |
if err := png.Encode(&buf, w.badgeImg); err != nil { | |
return w.createBadgeIcon() | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 10
🔭 Outside diff range comments (1)
v3/examples/badge-custom/build/Taskfile.yml (1)
82-87
: 🛠️ Refactor suggestion
APP_NAME
is referenced but never defined – task will fail at runtime
update:build-assets
expands the variables{{.APP_NAME}}
and{{.APP_NAME}}
, yet the Taskfile declares no root-levelvars:
block (nor do the imported Taskfiles in this directory).
Whentask update:build-assets
runs, Task will substitute an empty string, producing an invalid command such as:wails3 update build-assets -name "" -binaryname "" ...
and exit with
Error: flag needs an argument
.Add the variable at the top-level (before
tasks:
) or inline-default it in the command:-version: '3' +# ------------------------------------------------------------ +# Global configuration +# ------------------------------------------------------------ +version: '3' + +vars: + APP_NAME: badge # <-- required by update:build-assets + BUILD_FLAGS: "" # prevents nil reference in generate:bindings
♻️ Duplicate comments (4)
v3/pkg/services/badge/badge_windows.go (4)
264-266
: Fallback to default badge still missing (repeated from previous review)Reading the font file can legitimately fail (missing font, restricted path, etc.).
Instead of aborting the whole overlay update, fall back tocreateBadgeIcon()
as discussed earlier:- fontBytes, err := os.ReadFile(fontPath) - if err != nil { - return 0, err + fontBytes, err := os.ReadFile(fontPath) + if err != nil { + return w.createBadgeIcon() }
268-271
: Still no graceful degradation when font parsing failsThe same graceful-fallback pattern should be applied here:
- ttf, err := opentype.Parse(fontBytes) - if err != nil { - return 0, err + ttf, err := opentype.Parse(fontBytes) + if err != nil { + return w.createBadgeIcon() }
282-289
: Creating the font face: fall back instead of bailing out- face, err := opentype.NewFace(ttf, &opentype.FaceOptions{ + face, err := opentype.NewFace(ttf, &opentype.FaceOptions{ Size: fontSize, DPI: float64(dpi), Hinting: font.HintingFull, }) if err != nil { - return 0, err + return w.createBadgeIcon() }
302-305
: PNG encoding failure should degrade gracefully (network / memory errors)- if err := png.Encode(&buf, w.badgeImg); err != nil { - return 0, err + if err := png.Encode(&buf, w.badgeImg); err != nil { + return w.createBadgeIcon() }
🧹 Nitpick comments (13)
v3/examples/badge-custom/build/linux/appimage/build.sh (1)
17-31
: Add cleanup for downloaded AppImage toolsThe script downloads linuxdeploy AppImage tools but doesn't clean them up after use, which could leave unnecessary files in the build directory.
Consider adding cleanup at the end of the script:
# Rename the generated AppImage mv ${APP_NAME}*.AppImage "${APP_NAME}.AppImage" +# Clean up +rm -f linuxdeploy-*.AppImagev3/examples/badge-custom/frontend/src/main.ts (3)
20-26
: Remove unnecessaryvoid
operatorThe
void
operator before Events.Emit is unnecessary since you're not using the return value.setButtonUsingGo.addEventListener('click', () => { let label = (labelElement as HTMLInputElement).value - void Events.Emit({ + Events.Emit({ name: "set:badge", data: label, }) })
28-30
: Remove unnecessaryvoid
operator and improve readabilitySimilar to the previous comment, the
void
operator is unnecessary. Also, consider formatting the event emission for better readability.removeButtonUsingGo.addEventListener('click', () => { - void Events.Emit({name:"remove:badge", data: null}) + Events.Emit({ + name: "remove:badge", + data: null + }) })
32-34
: Type the event data more specificallyThe event handler uses a generic type
{data: any}
which could be more specifically typed to ensure type safety.-Events.On('time', (time: {data: any}) => { +Events.On('time', (time: {data: string}) => { timeElement.innerText = time.data; });v3/examples/badge-custom/README.md (3)
11-13
: Add language specifier to code blocksCode blocks should specify the language for proper syntax highlighting.
- ``` + ```bash wails3 dev ```🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
19-21
: Add language specifier to code blocksCode blocks should specify the language for proper syntax highlighting.
- ``` + ```bash wails3 build ```🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
19-19: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
33-35
: Add language specifier to code blocksCode blocks should specify the language for proper syntax highlighting.
- ``` + ```bash go run . ```🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
33-33: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
v3/examples/badge-custom/build/windows/Taskfile.yml (1)
33-37
: Packaging task doesn't specify PRODUCTION flag.The package task depends on create:nsis:installer but doesn't pass the PRODUCTION flag explicitly, though create:nsis:installer passes it to the build. Consider making this explicit for clarity.
package: summary: Packages a production build of the application into a `.exe` bundle cmds: - - task: create:nsis:installer + - task: create:nsis:installer + vars: + PRODUCTION: "true"v3/examples/badge-custom/build/config.yml (1)
61-63
: Missing newline at end of file.The file is missing a newline character at the end, which was flagged by the static analysis tool.
other: - name: My Other Data +
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
v3/examples/badge-custom/build/Taskfile.yml (1)
24-44
: Usenpm ci
for deterministic production builds
build:frontend
installs dependencies through the implicitnpm install
in its dependency chain.
For CI and release artefacts,npm ci
is preferable – it honours exactly the lock-file, fails on drift, and is noticeably faster.deps: - task: install:frontend:deps @@ - cmds: - - npm run {{.BUILD_COMMAND}} -q + cmds: + # Ensure a clean, reproducible install when PRODUCTION=true + - | + if [ "{{.PRODUCTION}}" = "true" ]; then + npm ci + fi + - npm run {{.BUILD_COMMAND}} -qThis leaves the existing fast-path (
npm install
) untouched for local dev, yet tightens release builds.v3/pkg/services/badge/badge_windows.go (1)
310-330
: Repeated badge generation could cause minor GC churn
createBadge()
allocates a fresh 32×32 RGBA image on everySetBadge
call, even when the colour palette hasn’t changed.
For apps that update the badge frequently (e.g., unread counters), this creates avoidable heap pressure.Cache the generated circle and only recreate when
BackgroundColour
orbadgeSize
change:func (w *windowsBadge) createBadge() { - w.badgeSize = 32 - img := image.NewRGBA(image.Rect(0, 0, w.badgeSize, w.badgeSize)) + if w.badgeImg != nil { + return // already cached + } + + w.badgeSize = 32 + img := image.NewRGBA(image.Rect(0, 0, w.badgeSize, w.badgeSize)) ... w.badgeImg = img }v3/examples/badge-custom/build/windows/nsis/wails_tools.nsh (2)
25-28
: Uninstall registry key is built without a delimiter – risk of collisions & readability issues
${UNINST_KEY_NAME}
is currently defined as a simple string concatenation of company and product names:!define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"With the shipped defaults this produces
My CompanyMy Product
, which:
- Lacks a delimiter, making the key hard to read.
- Increases the chance of key-name collisions when multiple products share a company name.
A trivial, non-breaking improvement is to insert an underscore (or similar delimiter):
-!define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}" +!define UNINST_KEY_NAME "${INFO_COMPANYNAME}_${INFO_PRODUCTNAME}"This keeps the key unique, readable, and consistent with common Windows installer conventions.
30-35
: Installer always requestsadmin
privileges – reconsider default to avoid unnecessary elevationThe default block forces an elevated installation:
!ifndef REQUEST_EXECUTION_LEVEL !define REQUEST_EXECUTION_LEVEL "admin" !endifRequiring UAC elevation when it may not be strictly necessary (e.g. per-user installs to
%LOCALAPPDATA%
) worsens UX and widens the attack surface.
Unless the product must live in a protected location (e.g.Program Files
) consider downgrading the default to"user"
and letting build-time overrides enable"admin"
when really needed:- !define REQUEST_EXECUTION_LEVEL "admin" + ; Default to per-user install. Override via ARG_REQUEST_EXECUTION_LEVEL if system-wide install is required. + !define REQUEST_EXECUTION_LEVEL "user"Please verify the destination path and any HKLM writes before adopting this change.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
v3/examples/badge-custom/build/appicon.png
is excluded by!**/*.png
v3/examples/badge-custom/build/windows/icon.ico
is excluded by!**/*.ico
v3/examples/badge-custom/frontend/public/Inter-Medium.ttf
is excluded by!**/*.ttf
v3/examples/badge-custom/frontend/public/typescript.svg
is excluded by!**/*.svg
v3/examples/badge-custom/frontend/public/wails.png
is excluded by!**/*.png
📒 Files selected for processing (31)
v3/examples/badge-custom/README.md
(1 hunks)v3/examples/badge-custom/Taskfile.yml
(1 hunks)v3/examples/badge-custom/build/Taskfile.yml
(1 hunks)v3/examples/badge-custom/build/config.yml
(1 hunks)v3/examples/badge-custom/build/darwin/Info.dev.plist
(1 hunks)v3/examples/badge-custom/build/darwin/Info.plist
(1 hunks)v3/examples/badge-custom/build/darwin/Taskfile.yml
(1 hunks)v3/examples/badge-custom/build/linux/Taskfile.yml
(1 hunks)v3/examples/badge-custom/build/linux/appimage/build.sh
(1 hunks)v3/examples/badge-custom/build/linux/nfpm/nfpm.yaml
(1 hunks)v3/examples/badge-custom/build/linux/nfpm/scripts/postinstall.sh
(1 hunks)v3/examples/badge-custom/build/linux/nfpm/scripts/postremove.sh
(1 hunks)v3/examples/badge-custom/build/linux/nfpm/scripts/preinstall.sh
(1 hunks)v3/examples/badge-custom/build/linux/nfpm/scripts/preremove.sh
(1 hunks)v3/examples/badge-custom/build/windows/Taskfile.yml
(1 hunks)v3/examples/badge-custom/build/windows/info.json
(1 hunks)v3/examples/badge-custom/build/windows/nsis/project.nsi
(1 hunks)v3/examples/badge-custom/build/windows/nsis/wails_tools.nsh
(1 hunks)v3/examples/badge-custom/build/windows/wails.exe.manifest
(1 hunks)v3/examples/badge-custom/frontend/Inter Font License.txt
(1 hunks)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/index.ts
(1 hunks)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts
(1 hunks)v3/examples/badge-custom/frontend/index.html
(1 hunks)v3/examples/badge-custom/frontend/package.json
(1 hunks)v3/examples/badge-custom/frontend/public/style.css
(1 hunks)v3/examples/badge-custom/frontend/src/main.ts
(1 hunks)v3/examples/badge-custom/frontend/src/vite-env.d.ts
(1 hunks)v3/examples/badge-custom/frontend/tsconfig.json
(1 hunks)v3/examples/badge-custom/main.go
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)v3/pkg/services/badge/font.go
(1 hunks)
✅ Files skipped from review due to trivial changes (18)
- v3/examples/badge-custom/frontend/src/vite-env.d.ts
- v3/examples/badge-custom/build/linux/nfpm/scripts/preremove.sh
- v3/examples/badge-custom/build/linux/nfpm/scripts/postinstall.sh
- v3/examples/badge-custom/build/linux/nfpm/scripts/preinstall.sh
- v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/index.ts
- v3/examples/badge-custom/frontend/package.json
- v3/examples/badge-custom/build/windows/info.json
- v3/examples/badge-custom/build/linux/nfpm/nfpm.yaml
- v3/examples/badge-custom/frontend/tsconfig.json
- v3/examples/badge-custom/build/linux/nfpm/scripts/postremove.sh
- v3/examples/badge-custom/build/windows/wails.exe.manifest
- v3/examples/badge-custom/build/darwin/Info.dev.plist
- v3/examples/badge-custom/frontend/public/style.css
- v3/examples/badge-custom/build/darwin/Info.plist
- v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts
- v3/examples/badge-custom/Taskfile.yml
- v3/examples/badge-custom/frontend/index.html
- v3/examples/badge-custom/build/linux/Taskfile.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- v3/pkg/services/badge/font.go
🧰 Additional context used
🧬 Code Graph Analysis (1)
v3/examples/badge-custom/frontend/src/main.ts (2)
v3/examples/badge/frontend/dist/assets/index-sXwpgKSV.js (5)
setButton
(1334-1334)removeButton
(1335-1335)setButtonUsingGo
(1336-1336)removeButtonUsingGo
(1337-1337)labelElement
(1338-1338)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts (2)
SetBadge
(18-21)RemoveBadge
(13-16)
🪛 LanguageTool
v3/examples/badge-custom/README.md
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~59-~59: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 2020 characters long)
Context: ...wails3 build`. Happy coding with Wails3! If you encounter any issues or have que...
(EN_EXCESSIVE_EXCLAMATION)
v3/examples/badge-custom/frontend/Inter Font License.txt
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...
(DASH_RULE)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge-custom/README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
19-19: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
33-33: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 YAMLlint (1.35.1)
v3/examples/badge-custom/build/config.yml
[error] 63-63: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (18)
v3/examples/badge-custom/frontend/Inter Font License.txt (1)
1-94
: Approve inclusion of the official SIL Open Font License
This file correctly embeds the unmodified SIL OFL 1.1 text required for the Inter font. Since it’s a standard license document, no edits are necessary.🧰 Tools
🪛 LanguageTool
[typographical] ~9-~9: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...------ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------...(DASH_RULE)
v3/examples/badge-custom/build/darwin/Taskfile.yml (3)
1-47
: Well-structured build system for macOS support.The Darwin Taskfile is well-organized with clear task dependencies and proper environment configuration for macOS builds. The universal binary building process (arm64 + amd64) is properly implemented using the
lipo
tool.
48-63
: Clean packaging implementation.The packaging tasks appropriately create the .app bundle structure for both regular and universal binaries, with proper dependencies on the build tasks.
64-82
: Effective development run configuration.The run task creates a development .app bundle and executes it directly, facilitating quick development iterations. The code signing is correctly implemented with ad-hoc signing to prevent Gatekeeper issues.
v3/examples/badge-custom/build/windows/Taskfile.yml (4)
1-32
: Well-structured Windows build configuration.The Windows build task properly configures Go build flags including the crucial
-H windowsgui
flag to prevent console windows when launching the app. Environment variables are correctly set for Windows builds.
38-45
: Proper syso file generation.The generate:syso task correctly uses the wails3 CLI to generate Windows resource files with appropriate architecture and asset paths.
46-60
: Robust NSIS installer creation task.The installer creation task correctly ensures WebView2 bootstrapper is available and uses conditional architecture flags for the NSIS build.
61-64
: Simple run task implementation.The run task provides a straightforward way to execute the built application for testing.
v3/examples/badge-custom/build/config.yml (3)
1-15
: Well-documented configuration with appropriate metadata.The configuration file includes clear documentation and proper project metadata fields that will be used to generate build assets.
16-45
: Comprehensive dev mode configuration.The development mode settings are well-structured with appropriate ignored directories, watched extensions, and execution commands for an efficient development workflow.
46-60
: Good file association documentation.The file associations section is commented out but provides clear guidance on how to configure file associations when needed.
v3/examples/badge-custom/build/windows/nsis/project.nsi (6)
1-36
: Well-documented NSIS script with clear instructions.The NSIS script includes comprehensive documentation about template replacements and manual build instructions, which is helpful for development and debugging.
37-47
: Proper version information setup.The version information is correctly configured with all necessary metadata fields and proper version formatting.
48-68
: Comprehensive UI configuration with HiDPI support.The installer UI is well-configured with Modern UI components, proper icons, and HiDPI awareness. The installer pages are set up in a standard, user-friendly sequence.
69-81
: Good installer setup with architecture validation.The installer is properly configured with output path, installation directory, and architecture validation via the wails.checkArchitecture macro.
82-97
: Complete installation section.The installation section properly handles WebView2 runtime installation, file copying, shortcut creation, and file association management.
98-113
: Thorough uninstallation process.The uninstall section correctly removes all installed files, shortcuts, file associations, and WebView2 data paths, ensuring a clean uninstallation.
v3/examples/badge-custom/build/Taskfile.yml (1)
74-81
:VITE_PORT
has no default – interactivetask dev
will error on first run
dev:frontend
forwards--port {{.VITE_PORT}}
, but the variable is never defined.
Unless the caller passesVITE_PORT=…
explicitly, Task will render an empty string, causing Vite to choose a random port and fail on--strictPort
.Give
VITE_PORT
a sane default alongside the other globals:vars: APP_NAME: badge BUILD_FLAGS: "" + VITE_PORT: "9245"
Would you confirm that none of the imported Taskfiles redefine
VITE_PORT
?
If not, the snippet above will stabilise the developer experience.
# Fail script on any error | ||
set -euxo pipefail | ||
|
||
# Define variables | ||
APP_DIR="${APP_NAME}.AppDir" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add validation for required environment variables
The script uses several environment variables (APP_NAME, APP_BINARY, ICON_PATH, DESKTOP_FILE) without validating if they're set, which could lead to silent failures or unexpected behavior.
Consider adding validation at the beginning of the script:
# Fail script on any error
set -euxo pipefail
+# Validate required environment variables
+for var in APP_NAME APP_BINARY ICON_PATH DESKTOP_FILE; do
+ if [ -z "${!var}" ]; then
+ echo "Error: $var environment variable is not set"
+ exit 1
+ fi
+done
+
# Define variables
APP_DIR="${APP_NAME}.AppDir"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
# Fail script on any error | |
set -euxo pipefail | |
# Define variables | |
APP_DIR="${APP_NAME}.AppDir" | |
# Fail script on any error | |
set -euxo pipefail | |
# Validate required environment variables | |
for var in APP_NAME APP_BINARY ICON_PATH DESKTOP_FILE; do | |
if [ -z "${!var}" ]; then | |
echo "Error: $var environment variable is not set" | |
exit 1 | |
fi | |
done | |
# Define variables | |
APP_DIR="${APP_NAME}.AppDir" |
fi | ||
|
||
# Rename the generated AppImage | ||
mv "${APP_NAME}*.AppImage" "${APP_NAME}.AppImage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix wildcard expansion in mv command
The wildcard pattern inside double quotes won't expand as expected in Bash. This will cause the mv
command to fail because it will look for a file literally named "${APP_NAME}*.AppImage".
Apply this fix:
-mv "${APP_NAME}*.AppImage" "${APP_NAME}.AppImage"
+mv ${APP_NAME}*.AppImage "${APP_NAME}.AppImage"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
mv "${APP_NAME}*.AppImage" "${APP_NAME}.AppImage" | |
mv ${APP_NAME}*.AppImage "${APP_NAME}.AppImage" |
setButton.addEventListener('click', () => { | ||
let label = (labelElement as HTMLInputElement).value | ||
SetBadge(label); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error handling for SetBadge operation
The SetBadge function returns a Promise that could be rejected, but there's no error handling implemented.
Add error handling to properly manage potential failures:
setButton.addEventListener('click', () => {
let label = (labelElement as HTMLInputElement).value
- SetBadge(label);
+ SetBadge(label).catch(error => {
+ console.error('Failed to set badge:', error);
+ // Consider showing an error message to the user
+ });
});
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
setButton.addEventListener('click', () => { | |
let label = (labelElement as HTMLInputElement).value | |
SetBadge(label); | |
}); | |
setButton.addEventListener('click', () => { | |
let label = (labelElement as HTMLInputElement).value | |
SetBadge(label).catch(error => { | |
console.error('Failed to set badge:', error); | |
// Consider showing an error message to the user | |
}); | |
}); |
removeButton.addEventListener('click', () => { | ||
RemoveBadge(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error handling for RemoveBadge operation
Similar to the SetBadge function, RemoveBadge returns a Promise without error handling.
removeButton.addEventListener('click', () => {
- RemoveBadge();
+ RemoveBadge().catch(error => {
+ console.error('Failed to remove badge:', error);
+ // Consider showing an error message to the user
+ });
});
app.OnEvent("remove:badge", func(event *application.CustomEvent) { | ||
err := badgeService.RemoveBadge() | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Use graceful error handling instead of log.Fatal
Using log.Fatal
will terminate the application when an error occurs. For event handlers, consider more graceful error handling that allows the application to continue running.
app.OnEvent("remove:badge", func(event *application.CustomEvent) {
err := badgeService.RemoveBadge()
if err != nil {
- log.Fatal(err)
+ log.Printf("Error removing badge: %v", err)
+ // Consider notifying the user via the UI
}
})
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
app.OnEvent("remove:badge", func(event *application.CustomEvent) { | |
err := badgeService.RemoveBadge() | |
if err != nil { | |
log.Fatal(err) | |
} | |
}) | |
app.OnEvent("remove:badge", func(event *application.CustomEvent) { | |
err := badgeService.RemoveBadge() | |
if err != nil { | |
log.Printf("Error removing badge: %v", err) | |
// Consider notifying the user via the UI | |
} | |
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore - it's an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leaanthony Understood! Since it's an example, keeping the code simple and focused on demonstrating the badge functionality makes sense. I'll respect that decision.
app.OnEvent("set:badge", func(event *application.CustomEvent) { | ||
text := event.Data.(string) | ||
err := badgeService.SetBadge(text) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add type assertion check and use graceful error handling
The type assertion event.Data.(string)
will panic if the data is not a string. Also, log.Fatal
will terminate the application on error.
app.OnEvent("set:badge", func(event *application.CustomEvent) {
- text := event.Data.(string)
- err := badgeService.SetBadge(text)
- if err != nil {
- log.Fatal(err)
- }
+ text, ok := event.Data.(string)
+ if !ok {
+ log.Printf("Error: expected string data for set:badge event, got %T", event.Data)
+ return
+ }
+
+ err := badgeService.SetBadge(text)
+ if err != nil {
+ log.Printf("Error setting badge: %v", err)
+ // Consider notifying the user via the UI
+ }
})
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
app.OnEvent("set:badge", func(event *application.CustomEvent) { | |
text := event.Data.(string) | |
err := badgeService.SetBadge(text) | |
if err != nil { | |
log.Fatal(err) | |
} | |
}) | |
app.OnEvent("set:badge", func(event *application.CustomEvent) { | |
text, ok := event.Data.(string) | |
if !ok { | |
log.Printf("Error: expected string data for set:badge event, got %T", event.Data) | |
return | |
} | |
err := badgeService.SetBadge(text) | |
if err != nil { | |
log.Printf("Error setting badge: %v", err) | |
// Consider notifying the user via the UI | |
} | |
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore - it's an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leaanthony Understood! Since this is an example application, keeping the code simple and focused on demonstrating the functionality makes sense. I'll disregard the suggestion.
go func() { | ||
for { | ||
now := time.Now().Format(time.RFC1123) | ||
app.EmitEvent("time", now) | ||
time.Sleep(time.Second) | ||
} | ||
}() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Implement graceful shutdown for the time emitter goroutine
The goroutine that emits time events runs indefinitely without a way to stop it when the application is shutting down.
Use a context or channel to signal shutdown:
+// Create a context that can be cancelled when the application is shutting down
+ctx, cancel := context.WithCancel(context.Background())
+app.On("shutdown", func() {
+ cancel()
+})
// Create a goroutine that emits an event containing the current time every second.
// The frontend can listen to this event and update the UI accordingly.
go func() {
+ ticker := time.NewTicker(time.Second)
+ defer ticker.Stop()
for {
- now := time.Now().Format(time.RFC1123)
- app.EmitEvent("time", now)
- time.Sleep(time.Second)
+ select {
+ case <-ctx.Done():
+ return
+ case <-ticker.C:
+ now := time.Now().Format(time.RFC1123)
+ app.EmitEvent("time", now)
+ }
}
}()
Don't forget to add the context import:
import (
"embed"
_ "embed"
"image/color"
"log"
"time"
+ "context"
"github.com/wailsapp/wails/v3/pkg/application"
"github.com/wailsapp/wails/v3/pkg/services/badge"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't care because it doesn't need to be shutdown gracefully. Go terminates all goroutines as part of shutdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leaanthony Thanks for the clarification. You're right - Go automatically terminates all goroutines when the program exits, so there's no need for explicit cleanup in this case. I appreciate the feedback on the project's approach to goroutine management.
(❍ᴥ❍)
✏️ Learnings added
Learnt from: leaanthony
PR: wailsapp/wails#4234
File: v3/examples/badge-custom/main.go:87-93
Timestamp: 2025-04-26T21:03:42.453Z
Learning: In Wails applications, it's not necessary to implement explicit graceful shutdown for simple goroutines (like time emitters) as Go automatically terminates all goroutines as part of the application shutdown process.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
v3/examples/badge-custom/README.md
Outdated
Take a moment to familiarize yourself with your project structure: | ||
|
||
- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) | ||
- `main.go`: The entry point of your Go backend | ||
- `app.go`: Define your application structure and methods here | ||
- `wails.json`: Configuration file for your Wails project | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify project structure accuracy
The README mentions app.go
as part of the project structure, but this file wasn't included in the provided code samples and might not be part of this example project.
Please verify if app.go
is actually part of the badge-custom example or if this is standard README content that should be updated to match the actual project files.
🏁 Script executed:
#!/bin/bash
# Check if app.go exists in the badge-custom example
ls -la v3/examples/badge-custom/app.go 2>/dev/null || echo "app.go not found in badge-custom example"
Length of output: 131
Update README to reflect actual project structure
The badge-custom
example’s README lists an app.go
file that doesn’t exist in this folder. Please remove or replace that entry so the project structure matches reality.
Affected file:
v3/examples/badge-custom/README.md
(lines 45–51)
Suggested change:
Take a moment to familiarize yourself with your project structure:
- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript)
- `main.go`: The entry point of your Go backend
- - `app.go`: Define your application structure and methods here
- `wails.json`: Configuration file for your Wails project
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Take a moment to familiarize yourself with your project structure: | |
- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) | |
- `main.go`: The entry point of your Go backend | |
- `app.go`: Define your application structure and methods here | |
- `wails.json`: Configuration file for your Wails project | |
Take a moment to familiarize yourself with your project structure: | |
- `frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript) | |
- `main.go`: The entry point of your Go backend | |
- `wails.json`: Configuration file for your Wails project |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~47-~47: Loose punctuation mark.
Context: ...h your project structure: - frontend/
: Contains your frontend code (HTML, CSS,...
(UNLIKELY_OPENING_PUNCTUATION)
SetRegView 64 | ||
# If the admin key exists and is not empty then webview2 is already installed | ||
ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv" | ||
${If} $0 != "" | ||
Goto ok | ||
${EndIf} | ||
|
||
${If} ${REQUEST_EXECUTION_LEVEL} == "user" | ||
# If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed | ||
ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv" | ||
${If} $0 != "" | ||
Goto ok | ||
${EndIf} | ||
${EndIf} | ||
|
||
SetDetailsPrint both | ||
DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}" | ||
SetDetailsPrint listonly | ||
|
||
InitPluginsDir | ||
CreateDirectory "$pluginsdir\webview2bootstrapper" | ||
SetOutPath "$pluginsdir\webview2bootstrapper" | ||
File "MicrosoftEdgeWebview2Setup.exe" | ||
ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install' | ||
|
||
SetDetailsPrint both | ||
ok: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
ExecWait
silently ignores WebView2 installer failures – capture & react to exit code
wails.webview2runtime
runs the WebView2 bootstrapper but drops the returned exit status:
ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
If the runtime fails to install (e.g. network outage, policy restrictions) the main installer continues, likely yielding a broken application. Capture the exit code and surface errors to the user:
- ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
+ ; Capture exit code so we know whether the runtime installed successfully
+ ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install' $0
+ ${If} $0 != 0
+ DetailPrint "WebView2 runtime installer exited with code $0"
+ MessageBox MB_ICONEXCLAMATION|MB_OK "WebView2 runtime installation failed (exit code $0). \
+The application may not start correctly."
+ ${EndIf}
This small addition greatly improves robustness and lowers support overhead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (4)
v3/pkg/services/badge/badge_windows.go (4)
303-305
: 🛠️ Refactor suggestionApply consistent error resilience via fallback to default badge.
If PNG encoding fails, the function should fall back to the default badge icon.
if err := png.Encode(&buf, w.badgeImg); err != nil { - return 0, err + return w.createBadgeIcon() }
264-266
: 🛠️ Refactor suggestionApply consistent error resilience via fallback to default badge.
The error handling when reading font files isn't consistent with the fallback pattern used elsewhere. If the font file can't be read, the function should fall back to the simple dot badge for better resilience rather than returning an error.
fontBytes, err := os.ReadFile(fontPath) if err != nil { - return 0, err + return w.createBadgeIcon() }
268-271
: 🛠️ Refactor suggestionApply consistent error resilience via fallback to default badge.
Similarly, if font parsing fails, the function should fall back to the default badge instead of returning an error.
ttf, err := opentype.Parse(fontBytes) if err != nil { - return 0, err + return w.createBadgeIcon() }
287-289
: 🛠️ Refactor suggestionApply consistent error resilience via fallback to default badge.
If font face creation fails, the function should again fall back to the default badge.
if err != nil { - return 0, err + return w.createBadgeIcon() }
🧹 Nitpick comments (1)
v3/pkg/services/badge/badge_windows.go (1)
189-189
: Optimize badge creation by caching the image.The current implementation creates a new badge image every time
SetBadge()
is called, which is inefficient. Consider caching the badge image and only recreating it when necessary.- w.createBadge() + // Only create the badge image if it doesn't exist + if w.badgeImg == nil { + w.createBadge() + }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
v3/pkg/services/badge/badge_windows.go
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
v3/pkg/services/badge/badge_windows.go (7)
v3/pkg/services/badge/font.go (2)
FontManager
(16-21)NewFontManager
(24-35)v3/pkg/services/badge/badge.go (1)
Service
(19-21)v3/pkg/application/context.go (1)
Context
(3-6)v3/pkg/application/services.go (1)
ServiceOptions
(17-40)v3/pkg/w32/typedef.go (1)
HICON
(205-205)v3/pkg/w32/icon.go (1)
CreateSmallHIconFromImage
(53-72)v3/pkg/w32/user32.go (1)
GetDesktopWindow
(218-221)
🔇 Additional comments (5)
v3/pkg/services/badge/badge_windows.go (5)
273-276
: Consider documentation around optimal label length.The code adjusts font size for labels longer than 1 character, but there's no mechanism or guidance for handling very long labels that might not fit in the badge.
As suggested in previous feedback, consider documenting a maximum recommended length (e.g., 2 characters) in the documentation rather than implementing automatic truncation, to maintain API flexibility.
81-84
: Good job cleaning up COM resources on error paths.The code now properly calls
CoUninitialize
ifCoCreateInstance
fails, preventing COM resource leaks.
241-243
: Good use of contrasting colors for the inner dot.The inner dot now uses the text color instead of duplicating the background color, creating better visual contrast.
149-157
: The COM initialization and taskbar interface setup looks good.The service startup logic correctly initializes the COM interface and font manager.
160-167
: Good resource cleanup in Shutdown.The service shutdown logic properly releases the COM interface and uninitializes COM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (1)
v3/pkg/services/badge/badge_windows.go (1)
54-61
:⚠️ Potential issue
ctx
is unused – compilation will failGo rejects parameters that are never referenced. Either delete the parameter or rename it to
_
:-func (w *windowsBadge) Startup(ctx context.Context, options application.ServiceOptions) error { +func (w *windowsBadge) Startup(_ context.Context, options application.ServiceOptions) error {
🧹 Nitpick comments (1)
v3/pkg/w32/ole32.go (1)
54-72
: Consider returning Goerror
instead of panicking for non-fatal COM errors
CoCreateInstance
panics only for three HRESULTs but returns all other failure codes to the caller.
Idiomatic Go exposes these aserror
, letting the caller decide how to react, and avoids abrupt process termination from library code.Refactor suggestion (illustrative):
-func CoCreateInstance(... ) HRESULT { - ... - switch uint32(ret) { - case E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED: - panic(...) - } - return HRESULT(ret) +func CoCreateInstance(... ) (HRESULT, error) { + ret, _, _ := procCoCreateInstance.Call(...) + switch hr := HRESULT(ret); hr { + case S_OK: + return hr, nil + case E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED: + return hr, fmt.Errorf("CoCreateInstance failed: %x", hr) + default: + return hr, syscall.Errno(hr) + } }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
v3/pkg/services/badge/badge.go
(1 hunks)v3/pkg/services/badge/badge_darwin.go
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)v3/pkg/w32/ole32.go
(3 hunks)v3/pkg/w32/taskbar.go
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- v3/pkg/services/badge/badge_darwin.go
- v3/pkg/services/badge/badge.go
🧰 Additional context used
🧬 Code Graph Analysis (2)
v3/pkg/w32/ole32.go (2)
v3/pkg/w32/typedef.go (1)
HRESULT
(214-214)v3/pkg/w32/constants.go (3)
E_INVALIDARG
(1270-1270)E_OUTOFMEMORY
(1271-1271)E_UNEXPECTED
(1272-1272)
v3/pkg/w32/taskbar.go (3)
v3/pkg/w32/ole32.go (3)
CoInitializeEx
(29-44)CoCreateInstance
(54-72)CoUninitialize
(50-52)v3/pkg/w32/constants.go (1)
CLSCTX_INPROC_SERVER
(1381-1381)v3/pkg/w32/typedef.go (2)
HWND
(218-218)HICON
(205-205)
func NewTaskbarList3() (*ITaskbarList3, error) { | ||
const COINIT_APARTMENTTHREADED = 0x2 | ||
|
||
if hrInit := CoInitializeEx(COINIT_APARTMENTTHREADED); hrInit != 0 && hrInit != 0x1 { | ||
return nil, syscall.Errno(hrInit) | ||
} | ||
|
||
var taskbar *ITaskbarList3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Lock the OS thread before using COM to avoid STA violations
CoInitializeEx
puts the current thread into a single-threaded apartment, but Go may immediately reschedule the goroutine to a different thread.
Without an explicit runtime.LockOSThread()
, any subsequent COM calls (including HrInit
, SetOverlayIcon
, or the later Release
) can execute on the wrong thread and fail with RPC_E_WRONG_THREAD
, or worse, corrupt COM state.
func NewTaskbarList3() (*ITaskbarList3, error) {
+ // COM apartments are thread-affine. Stay on the same OS thread for
+ // the full lifetime of the COM objects we create.
+ runtime.LockOSThread()
const COINIT_APARTMENTTHREADED = 0x2
Correspondingly, add an unlock when the interface is released:
func (t *ITaskbarList3) Release() {
if t != nil {
syscall.SyscallN(t.lpVtbl.Release, uintptr(unsafe.Pointer(t)))
CoUninitialize()
+ runtime.UnlockOSThread()
}
}
There was a problem hiding this comment.
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 (2)
v3/examples/badge/README.md (1)
31-31
: Use Markdown headings for language labels
The sections currently use bold text (e.g.,**Go**
,**JS**
) as subheadings. For better semantic structure, accessibility, and consistent styling, consider replacing these with Markdown heading levels (for example,#### Go
instead of**Go**
).Also applies to: 43-43, 61-61, 66-66
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
31-31: Emphasis used instead of a heading
null(MD036, no-emphasis-as-heading)
v3/examples/badge-custom/README.md (1)
40-40
: Use Markdown headings for language labels
The sections currently use bold text (e.g.,**Go**
,**JS**
) as subheadings. For better semantic structure, accessibility, and consistent styling, consider replacing these with Markdown heading levels (for example,#### Go
instead of**Go**
).Also applies to: 52-52, 70-70, 75-75
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
40-40: Emphasis used instead of a heading
null(MD036, no-emphasis-as-heading)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
v3/examples/badge-custom/frontend/dist/assets/index-edhLCYCH.js
is excluded by!**/dist/**
v3/examples/badge-custom/frontend/dist/index.html
is excluded by!**/dist/**
📒 Files selected for processing (4)
docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/examples/badge-custom/README.md
(1 hunks)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts
(1 hunks)v3/examples/badge/README.md
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~135-~135: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
[duplication] ~152-~152: Possible typo: you repeated a word.
Context: ...e service with default options | | NewWithOptions(options Options)
| Creates a new badge servic...
(ENGLISH_WORD_REPEAT_RULE)
🪛 markdownlint-cli2 (0.17.2)
v3/examples/badge-custom/README.md
40-40: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
52-52: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
70-70: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
75-75: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
v3/examples/badge/README.md
31-31: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
43-43: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
61-61: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
66-66: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
🔇 Additional comments (1)
docs/src/content/docs/learn/badges.mdx (1)
1-172
: Documentation is comprehensive and well-structured
Code examples are correctly fenced, import paths and API references align with the implementation, and platform-specific behaviors are clearly delineated with tabs. No issues detected.🧰 Tools
🪛 LanguageTool
[uncategorized] ~135-~135: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
[duplication] ~152-~152: Possible typo: you repeated a word.
Context: ...e service with default options | |NewWithOptions(options Options)
| Creates a new badge servic...(ENGLISH_WORD_REPEAT_RULE)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
v3/examples/badge-custom/frontend/src/main.ts (2)
35-38
: Add error handling for SetBadge operation.The SetBadge function returns a Promise that could be rejected, but there's no error handling implemented.
setButton.addEventListener('click', () => { let label = (labelElement as HTMLInputElement).value - SetBadge(label); + SetBadge(label).catch(error => { + console.error('Failed to set badge:', error); + // Consider showing an error message to the user + }); });
40-42
: Add error handling for RemoveBadge operation.Similar to the SetBadge function, RemoveBadge returns a Promise without error handling.
removeButton.addEventListener('click', () => { - RemoveBadge(); + RemoveBadge().catch(error => { + console.error('Failed to remove badge:', error); + // Consider showing an error message to the user + }); });
🧹 Nitpick comments (8)
v3/pkg/services/badge/badge_windows.go (2)
94-94
: Cache the badge image to prevent memory leaks.The
createBadge()
method is called every timeSetBadge()
is called, resulting in a new image allocation. This could lead to memory pressure under frequent badge updates.- w.createBadge() + // Only create the badge image if it doesn't exist + if w.badgeImg == nil { + w.createBadge() + }
292-294
: Improve error resilience by falling back to default badge.If PNG encoding fails, the function should fall back to the default badge icon for better error resilience.
var buf bytes.Buffer if err := png.Encode(&buf, w.badgeImg); err != nil { - return 0, err + return w.createBadgeIcon() }v3/examples/badge-custom/frontend/src/main.ts (2)
44-50
: Return the Promise from Events.Emit.The
void
operator is unnecessary and discards the Promise result, preventing proper error handling.setButtonUsingGo.addEventListener('click', () => { let label = (labelElement as HTMLInputElement).value - void Events.Emit({ + Events.Emit({ name: "set:badge", data: label, - }) + }).catch(error => { + console.error('Failed to emit set:badge event:', error); + }); })
52-54
: Return the Promise from Events.Emit.The
void
operator is unnecessary and discards the Promise result, preventing proper error handling.removeButtonUsingGo.addEventListener('click', () => { - void Events.Emit({name:"remove:badge", data: null}) + Events.Emit({name:"remove:badge", data: null}).catch(error => { + console.error('Failed to emit remove:badge event:', error); + }); })v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts (1)
31-33
: Add JSDoc for SetCustomBadge method.The other methods have JSDoc comments, but this one is missing documentation.
+/** + * SetCustomBadge sets the badge label on the application icon with custom styling options. + */ export function SetCustomBadge(label: string, options: $models.Options): $CancellablePromise<void> { return $Call.ByID(921166821, label, options); }docs/src/content/docs/learn/badges.mdx (3)
44-44
: Fix comment to match actual color value.The comment says "Green background" but the color value is blue (0, 0, 255).
- BackgroundColour: color.RGBA{0, 0, 255, 255}, // Green background + BackgroundColour: color.RGBA{0, 0, 255, 255}, // Blue background
159-159
: Add missing preposition in list item.The list item is missing a preposition.
- - Too many badge updates can distract users + - Too many badge updates can distract your users🧰 Tools
🪛 LanguageTool
[uncategorized] ~159-~159: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
176-176
: Fix word duplication in table description.The word "option" is repeated unnecessarily.
-| `NewWithOptions(options Options)` | Creates a new badge service with custom option (Windows only, options are ignored on macOS) | +| `NewWithOptions(options Options)` | Creates a new badge service with custom options (Windows only, options are ignored on macOS) |🧰 Tools
🪛 LanguageTool
[duplication] ~176-~176: Possible typo: you repeated a word.
Context: ...e service with default options | |NewWithOptions(options Options)
| Creates a new badge servic...(ENGLISH_WORD_REPEAT_RULE)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
v3/examples/badge-custom/frontend/dist/assets/index-DHsC0KxN.js
is excluded by!**/dist/**
v3/examples/badge-custom/frontend/dist/index.html
is excluded by!**/dist/**
📒 Files selected for processing (12)
docs/src/content/docs/learn/badges.mdx
(1 hunks)v3/examples/badge-custom/README.md
(1 hunks)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/index.ts
(1 hunks)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/models.ts
(1 hunks)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/service.ts
(1 hunks)v3/examples/badge-custom/frontend/bindings/image/color/index.ts
(1 hunks)v3/examples/badge-custom/frontend/bindings/image/color/models.ts
(1 hunks)v3/examples/badge-custom/frontend/index.html
(1 hunks)v3/examples/badge-custom/frontend/src/main.ts
(1 hunks)v3/pkg/services/badge/badge.go
(1 hunks)v3/pkg/services/badge/badge_darwin.go
(1 hunks)v3/pkg/services/badge/badge_windows.go
(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- v3/examples/badge-custom/frontend/bindings/image/color/index.ts
- v3/examples/badge-custom/README.md
- v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/models.ts
- v3/examples/badge-custom/frontend/bindings/image/color/models.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- v3/examples/badge-custom/frontend/index.html
- v3/pkg/services/badge/badge.go
- v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/index.ts
- v3/pkg/services/badge/badge_darwin.go
🧰 Additional context used
🧬 Code Graph Analysis (1)
v3/pkg/services/badge/badge_windows.go (10)
v3/pkg/w32/taskbar.go (2)
ITaskbarList3
(16-18)NewTaskbarList3
(45-72)v3/examples/badge-custom/frontend/bindings/image/color/models.ts (1)
RGBA
(15-46)v3/pkg/services/badge/font.go (2)
FontManager
(16-21)NewFontManager
(24-35)v3/examples/badge-custom/frontend/bindings/github.com/wailsapp/wails/v3/pkg/services/badge/models.ts (1)
Options
(12-55)v3/pkg/services/badge/badge.go (2)
Options
(25-31)Service
(21-23)v3/pkg/application/context.go (1)
Context
(3-6)v3/pkg/application/services.go (1)
ServiceOptions
(17-40)v3/pkg/w32/typedef.go (1)
HICON
(205-205)v3/pkg/w32/icon.go (1)
CreateSmallHIconFromImage
(53-72)v3/pkg/w32/user32.go (1)
GetDesktopWindow
(218-221)
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~159-~159: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
[duplication] ~176-~176: Possible typo: you repeated a word.
Context: ...e service with default options | | NewWithOptions(options Options)
| Creates a new badge servic...
(ENGLISH_WORD_REPEAT_RULE)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
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 (2)
docs/src/content/docs/learn/badges.mdx (2)
157-168
: Best Practices: improve list formatting and punctuation
The nested lists under the numbered Best Practices items would render more consistently if indented by two spaces and end with periods. For example:-1. Use badges sparingly: - - Too many badge updates can distract users - - Reserve badges for important notifications +1. Use badges sparingly: + - Too many badge updates can distract users. + - Reserve badges for important notifications. -2. Keep badge text short: - - Numeric badges are most effective - - On macOS, text badges should be brief +2. Keep badge text short: + - Numeric badges are most effective. + - On macOS, text badges should be brief. -3. For Windows customization: - - Ensure high contrast between text and background colors - - Test with different text lengths as font size decreases with length - - Use common system fonts to ensure availability +3. For Windows customization: + - Ensure high contrast between text and background colors. + - Test with different text lengths as font size decreases with length. + - Use common system fonts to ensure availability.🧰 Tools
🪛 LanguageTool
[uncategorized] ~159-~159: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...(AI_HYDRA_LEO_MISSING_TO)
175-176
: API Reference: correct plural in description
The description forNewWithOptions
should refer to "custom options" (plural) for consistency:-| `NewWithOptions(options Options)` | Creates a new badge service with custom option (Windows only, options are ignored on macOS) | +| `NewWithOptions(options Options)` | Creates a new badge service with custom options (Windows only, options are ignored on macOS) |🧰 Tools
🪛 LanguageTool
[duplication] ~176-~176: Possible typo: you repeated a word.
Context: ...e service with default options | |NewWithOptions(options Options)
| Creates a new badge servic...(ENGLISH_WORD_REPEAT_RULE)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/src/content/docs/learn/badges.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[uncategorized] ~159-~159: Possible missing preposition found.
Context: ...y badge updates can distract users - Reserve badges for important notifications 2. ...
(AI_HYDRA_LEO_MISSING_TO)
[duplication] ~176-~176: Possible typo: you repeated a word.
Context: ...e service with default options | | NewWithOptions(options Options)
| Creates a new badge servic...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~182-~182: Possible typo: you repeated a word.
Context: ...pecified label | | SetCustomBadge(label string, options Options) error
| Sets a badge with the specifi...
(ENGLISH_WORD_REPEAT_RULE)
🔇 Additional comments (8)
docs/src/content/docs/learn/badges.mdx (8)
5-6
: Import of MDX components is correct
TheTabs
andTabItem
imports align with the usage later in the document and follow the Astro/Starlight conventions.
17-30
: Basic Usage code snippet is well-formed
The Go example for initializing the default badge service is enclosed in a propergo
fence and clearly demonstrates the import and registration steps.
36-58
: Custom options snippet is clear and correct
The Windows-only example shows thebadge.Options
struct with the necessaryimage/color
import and is formatted with a proper code fence.
64-75
: Setting a Badge examples are concise
The three usage cases forSetBadge
are correctly demonstrated under a properly fenced Go block.
82-99
: Custom badge examples look good
TheSetCustomBadge
examples cover default, numeric, and text badges with one-off options and are clearly formatted.
105-107
: RemoveBadge snippet is accurate
The example forRemoveBadge()
is straightforward and uses the correct code fence.
111-153
: Platform Considerations section is well-structured
The<Tabs>
and<TabItem>
components correctly separate macOS, Windows, and Linux behaviors, and the bullet lists within each tab are clear and accurate.
186-195
: Structs and Types snippet is accurate
The Options struct is clearly documented and formatted within ago
fence, matching the backend API.
|
There was a problem hiding this comment.
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 (5)
docs/src/content/docs/learn/badges.mdx (5)
1-3
: Optional: Enhance frontmatter with a description
The frontmatter is valid, but adding adescription
field can improve SEO and give readers a quick summary in search results.
64-75
: Show error handling forSetBadge
Currently the snippet omits the returnederror
. Consider demonstrating how to check for failures, e.g.:if err := badgeService.SetBadge("3"); err != nil { log.Fatalf("failed to set badge: %v", err) }
83-99
: Show error handling forSetCustomBadge
Likewise, include theerror
return in the custom badge example:if err := badgeService.SetCustomBadge("New", options); err != nil { // handle error }
105-107
: Show error handling forRemoveBadge
Add an error check when removing the badge to complete the example:if err := badgeService.RemoveBadge(); err != nil { // handle error }
196-196
: Link to example projects
Consider adding a “Related Examples” section with hyperlinks tov3/examples/badge
andv3/examples/badge-custom
so users can quickly jump to working demos.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/src/content/docs/learn/badges.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/learn/badges.mdx
[duplication] ~176-~176: Possible typo: you repeated a word.
Context: ...e service with default options | | NewWithOptions(options Options)
| Creates a new badge servic...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~182-~182: Possible typo: you repeated a word.
Context: ...pecified label | | SetCustomBadge(label string, options Options) error
| Sets a badge with the specifi...
(ENGLISH_WORD_REPEAT_RULE)
🔇 Additional comments (7)
docs/src/content/docs/learn/badges.mdx (7)
5-5
: Import statement is correct
TheTabs
andTabItem
imports match the components used in the Platform Considerations section.
17-30
: Default service snippet is well-formed
The Go example for creating and registering the badge service is accurate and properly fenced.
37-58
: Custom‐options snippet is clear
The Windows‐onlyNewWithOptions
example correctly shows how to supplybadge.Options
.
111-153
: Platform considerations are well organized
The tabbed layout clearly outlines macOS, Windows, and Linux behaviors.
155-169
: Best Practices section is solid
Recommendations are concise, actionable, and convey when—and how—to use badges sparingly.
171-184
: API Reference is accurate
Method signatures and descriptions forNew
,NewWithOptions
,SetBadge
,SetCustomBadge
, andRemoveBadge
align with the service implementation.🧰 Tools
🪛 LanguageTool
[duplication] ~176-~176: Possible typo: you repeated a word.
Context: ...e service with default options | |NewWithOptions(options Options)
| Creates a new badge servic...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~182-~182: Possible typo: you repeated a word.
Context: ...pecified label | |SetCustomBadge(label string, options Options) error
| Sets a badge with the specifi...(ENGLISH_WORD_REPEAT_RULE)
186-195
: Options struct definition looks good
Field names, types, and inline comments clearly describe the purpose of each property.
Description
Adds the ability to add a macOS dock tile badge or a Windows taskbar overlay icon.
Fixes # (#4040)
Type of change
Please select the option that is relevant.
How Has This Been Tested?
If you checked Linux, please specify the distro and version.
Test Configuration
Checklist:
website/src/pages/changelog.mdx
with details of this PRSummary by CodeRabbit
Summary by CodeRabbit