Skip to content

seelen-ui: Add file associations and URL protocol handler#17728

Merged
z-Fng merged 1 commit into
ScoopInstaller:masterfrom
SorYoshino:seelen-ui
May 1, 2026
Merged

seelen-ui: Add file associations and URL protocol handler#17728
z-Fng merged 1 commit into
ScoopInstaller:masterfrom
SorYoshino:seelen-ui

Conversation

@SorYoshino

Copy link
Copy Markdown
Contributor

Summary

Enhances seelen-ui manifest by adding automatic registry scripts for file associations (.slu) and URL protocol handling (seelen-ui.uri), while also improving license metadata.

Related issues or pull requests

Changes

  • Update to structured object including SPDX identifier and source URL.
  • Add instructions for users to manually import generated .reg files for system integration.
  • Post-install:
    • Dynamically generate .reg files from templates in the scripts directory.
    • Support environment variable replacement for {{seelen_dir}}.
    • Automatically switch between HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE based on the --global flag.
  • Add script to automatically unregister file associations and URL handlers during uninstallation.

Testing

The test results are as follows:
┏[ ~]
└─> scoop install Unofficial/seelen-ui
Installing 'seelen-ui' (2.6.2) [64bit] from 'Unofficial' bucket
Loading Seelen.UI_2.6.2_x64-setup.exe from cache.
Checking hash of Seelen.UI_2.6.2_x64-setup.exe... OK.
Extracting Seelen.UI_2.6.2_x64-setup.exe... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\seelen-ui\current => D:\Software\Scoop\Local\apps\seelen-ui\2.6.2
Creating shortcut for Seelen UI (seelen-ui.exe)
Running post_install script... Done.
'seelen-ui' (2.6.2) was installed successfully!
Notes
-----
To register file associations, please execute the following command:
reg import "D:\Software\Scoop\Local\apps\seelen-ui\current\install-associations.reg"
To register the URL protocol handler, please execute the following command:
reg import "D:\Software\Scoop\Local\apps\seelen-ui\current\register-url-handler.reg"
-----
'seelen-ui' suggests installing 'extras/webview2'.

┏[ ~]
└─> reg import "D:\Software\Scoop\Local\apps\seelen-ui\current\install-associations.reg"
The operation completed successfully.

┏[ ~]
└─> reg import "D:\Software\Scoop\Local\apps\seelen-ui\current\register-url-handler.reg"
The operation completed successfully.

┏[ ~]
└─> scoop uninstall seelen-ui -p
Uninstalling 'seelen-ui' (2.6.2).
Running uninstaller script... Done.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Seelen UI.lnk
Unlinking D:\Software\Scoop\Local\apps\seelen-ui\current
Removing persisted data.
'seelen-ui' was uninstalled.
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The pull request modifies the Seelen-UI manifest to support file association and URL handler registration. The manifest updates the license field to an object format with a URL, adds notes, and restructures installation scripts. A new pre_install step removes selected directories, while post_install processes and imports four new registry files (.reg scripts) that configure file associations for .slu extensions and register a custom seelen-ui.uri URL protocol handler. An uninstaller script is added to clean up these registry entries during uninstallation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: adding file associations and URL protocol handler support to seelen-ui.
Description check ✅ Passed The description comprehensively covers the changes, includes a related issue reference, explains the technical implementation, and provides testing evidence demonstrating successful functionality.
Linked Issues check ✅ Passed The PR directly addresses issue #17722 by implementing file associations (.slu) and URL protocol handler (seelen-ui.uri) registration, enabling resources from the Seelen-UI page to launch the installed application.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving the linked issue: manifest updates for license/installation/uninstallation, and new registry scripts for file associations and URL handler registration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
bucket/seelen-ui.json (1)

9-35: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Import the generated .reg files during install.

Lines 29-35 only materialize the registry payloads into $dir; nothing here actually registers them. That means a fresh scoop install seelen-ui still leaves the protocol/file association inactive until the user runs the notes manually, so the browser-launch flow from issue #17722 is still broken out of the box and upgrades will not refresh existing registrations either.

Suggested change
     "post_install": [
         "$seelen_dir = $dir -replace '\\\\', '\\\\'",
         "Get-ChildItem -Path \"$bucketsdir\\$bucket\\scripts\\$app\" -Filter '*.reg' -File | ForEach-Object {",
         "    $content = Get-Content -Path $_.FullName -Encoding utf8",
         "    if ($global) { $content = $content -replace 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE' }",
         "    $content -replace '{{seelen_dir}}', $seelen_dir | Set-Content -Path \"$dir\\$($_.Name)\" -Encoding unicode",
-        "}"
+        "}",
+        "Get-ChildItem -Path $dir -Filter '*.reg' -File | Where-Object Name -notlike 'un*.reg' | ForEach-Object {",
+        "    Start-Process -FilePath 'reg.exe' -ArgumentList @('import', $_.FullName) -WindowStyle Hidden -Wait",
+        "}"
     ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/seelen-ui.json` around lines 9 - 35, The post_install currently writes
the .reg files to $dir but never imports them; update the post_install block
(after the Get-ChildItem ... | ForEach-Object ... Set-Content sequence) to
iterate the same '*.reg' files and invoke reg import (or Start-Process 'reg.exe'
/c) for each generated file so the registry entries are actually applied during
install/upgrade; use the same $seelen_dir/$dir/$bucket variables and preserve
the $global conditional logic, and add minimal error checking/logging so
failures don't break install but are reported.
🧹 Nitpick comments (1)
bucket/seelen-ui.json (1)

1-64: Please run the Scoop manifest checks before merge.

For this manifest, I’d verify both architectures and the full registry flow locally:

scoop config debug true
scoop config gh_token <your-read-only-github-token>   # optional, GitHub releases only
.\bin\checkver.ps1 -App seelen-ui -f
.\bin\formatjson.ps1 -App seelen-ui
scoop install .\bucket\seelen-ui.json -a 64bit
scoop install .\bucket\seelen-ui.json -a arm64

After that, validate that the generated .reg files import cleanly for both user and --global installs, and that uninstall removes the .slu and seelen-ui.uri registrations.

As per coding guidelines, "Provide clear instructions for testing the manifest locally before submission" for Scoop manifests.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/seelen-ui.json` around lines 1 - 64, The manifest lacks a local-test
instruction and explicit verification steps in the file metadata; add a concise
"testing" note to the manifest (e.g., under a new "notes" entry or expand
existing "notes") that instructs reviewers to run the Scoop manifest checks and
install both architectures and global vs user registry flows; reference the
manifest symbols seelen-ui.json, the pre_install/post_install scripts and
uninstaller script so testers know to run "checkver/formatjson" and to test
"scoop install .\\bucket\\seelen-ui.json -a 64bit" and "-a arm64" as well as
verifying the generated .reg imports for user and --global installs and that
uninstall cleans up .slu and seelen-ui.uri registrations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bucket/seelen-ui.json`:
- Line 28: The pre_install cleanup pattern currently only removes items matching
'uninst*' leaving files like 'unregister-url-handler.reg' behind; update the
"pre_install" entry in seelen-ui.json to use a broader pattern (e.g., 'un*' or
include 'un*.reg') so the ForEach-Object removal covers generated uninstall
payloads such as 'unregister-url-handler.reg' in $dir; locate the "pre_install"
key and replace 'uninst*' with the broader pattern to ensure stale uninstall
files are removed before install.

---

Outside diff comments:
In `@bucket/seelen-ui.json`:
- Around line 9-35: The post_install currently writes the .reg files to $dir but
never imports them; update the post_install block (after the Get-ChildItem ... |
ForEach-Object ... Set-Content sequence) to iterate the same '*.reg' files and
invoke reg import (or Start-Process 'reg.exe' /c) for each generated file so the
registry entries are actually applied during install/upgrade; use the same
$seelen_dir/$dir/$bucket variables and preserve the $global conditional logic,
and add minimal error checking/logging so failures don't break install but are
reported.

---

Nitpick comments:
In `@bucket/seelen-ui.json`:
- Around line 1-64: The manifest lacks a local-test instruction and explicit
verification steps in the file metadata; add a concise "testing" note to the
manifest (e.g., under a new "notes" entry or expand existing "notes") that
instructs reviewers to run the Scoop manifest checks and install both
architectures and global vs user registry flows; reference the manifest symbols
seelen-ui.json, the pre_install/post_install scripts and uninstaller script so
testers know to run "checkver/formatjson" and to test "scoop install
.\\bucket\\seelen-ui.json -a 64bit" and "-a arm64" as well as verifying the
generated .reg imports for user and --global installs and that uninstall cleans
up .slu and seelen-ui.uri registrations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c4945be9-6cea-47a5-818f-17f173a716cd

📥 Commits

Reviewing files that changed from the base of the PR and between 3093a2e and c6a4988.

📒 Files selected for processing (5)
  • bucket/seelen-ui.json
  • scripts/seelen-ui/install-associations.reg
  • scripts/seelen-ui/register-url-handler.reg
  • scripts/seelen-ui/uninstall-associations.reg
  • scripts/seelen-ui/unregister-url-handler.reg

Comment thread bucket/seelen-ui.json

@z-Fng z-Fng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@z-Fng z-Fng merged commit aa0a496 into ScoopInstaller:master May 1, 2026
4 checks passed
@z-Fng

z-Fng commented May 1, 2026

Copy link
Copy Markdown
Member

/verify

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

seelen-ui

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@SorYoshino SorYoshino deleted the seelen-ui branch May 1, 2026 11:42
@SorYoshino

Copy link
Copy Markdown
Contributor Author

Sorry, I forgot to send /verify. 😢

@z-Fng

z-Fng commented May 1, 2026

Copy link
Copy Markdown
Member

No worries.

@ghost

ghost commented May 3, 2026

Copy link
Copy Markdown

Thanks <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't install a resource from the Seelen‑UI page

2 participants