Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Oct 29, 2025

Summary

Updates the smarttaskbar manifest to use the new upstream repository (Oliviaophia/SmartTaskbar) and restructures the installer logic for maintainability and consistency.

Related issues or pull requests

Changes

  • Updated homepage and license fields to reflect the new repository
  • Enhanced description for better clarity and style consistency
  • Replaced inline PowerShell installer script with modular startup scripts (add-startup, remove-startup)
  • Improved notes with additional troubleshooting guidance
  • Reorganized manifest sections (bin, uninstaller, etc.) for readability
  • Updated autoupdate URL to match the new GitHub repository

Notes

  • The user data of smarttaskbar is stored in $env:LOCALAPPDATA\Chanple, so the previous persistence of SmartTaskbar.exe.config was meaningless.

Testing

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket][ smarttaskbar ≢  ?1 ~1]
└─> scoop install .\smarttaskbar.json
Installing 'smarttaskbar' (1.4.5) [64bit] from 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket\smarttaskbar.json'
Loading SmartTaskbar_Setup.exe from cache.
Checking hash of SmartTaskbar_Setup.exe ... ok.
Extracting SmartTaskbar_Setup.exe ... done.
Running installer script...done.
Linking D:\Software\Scoop\Local\apps\smarttaskbar\current => D:\Software\Scoop\Local\apps\smarttaskbar\1.4.5
Creating shim for 'add-startup'.
Creating shim for 'SmartTaskbar'.
Making D:\Software\Scoop\Local\shims\smarttaskbar.exe a GUI binary.                                                     
Creating shim for 'remove-startup'.
Creating shortcut for SmartTaskbar (SmartTaskbar.exe)
'smarttaskbar' (1.4.5) was installed successfully!
Notes
-----
Run 'add-startup' to add SmartTaskbar to startup programs.
Run 'remove-startup' to remove SmartTaskbar from startup programs.

If an error occurs when updating or uninstalling, execute the following command then retry:
- `Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue`

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket][ smarttaskbar ≢  ?1 ~1]
└─> add-startup
SmartTaskbar has been added to the startup programs.

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features

    • Added uninstaller capability for SmartTaskbar removal.
    • Enhanced startup management with dedicated scripts for adding/removing from startup programs.
  • Chores

    • Updated repository URL to new location.
    • Improved license metadata with identifier and URL reference.
    • Expanded setup instructions with error recovery guidance.

@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Walkthrough

The SmartTaskbar package manifest was reorganized to reflect repository ownership change and fixes. The installer was refactored from a fixed script to a templated, loop-driven approach that substitutes placeholders for startup directory paths. Two new PowerShell scripts were introduced for adding and removing startup shortcuts. Metadata updates include expanded notes, updated homepage and license format, and removal of the persist field.

Changes

Cohort / File(s) Summary
Manifest Configuration
bucket/smarttaskbar.json
Updated description, homepage URL, and license format (string → object). Changed notes from single string to multi-line list with expanded guidance including removal instructions and error recovery command. Updated auto-update and release URLs to new repository domain.
Manifest Installer Refactor
bucket/smarttaskbar.json
Transformed installer.script from fixed PowerShell snippet to templated, loop-driven approach that processes startup scripts with placeholder substitution for {{startup_dir}} and {{current_dir}}. Added uninstaller reference. Reordered and renamed bin entries. Removed persist field.
Startup Management Scripts
scripts/smarttaskbar/add-smarttaskbar-startup.ps1, scripts/smarttaskbar/remove-smarttaskbar-startup.ps1
Added two new PowerShell scripts: add-smarttaskbar-startup creates a WScript.Shell shortcut to SmartTaskbar.exe in the startup directory; remove-smarttaskbar-startup deletes the shortcut with force flag and error suppression. Both output confirmation messages.

Sequence Diagram

sequenceDiagram
    participant Installer as Scoop Installer
    participant Template as Templated Installer Script
    participant Script as Startup Scripts<br/>(add/remove-smarttaskbar-startup)
    participant FS as File System

    Installer->>Template: Process manifest installer<br/>with directory placeholders
    Template->>Script: Loop through startup scripts
    Template->>Script: Substitute {{startup_dir}}<br/>& {{current_dir}} placeholders
    Template->>FS: Write resolved scripts
    
    alt User runs add-smarttaskbar-startup
        Script->>FS: Create WScript.Shell COM object
        Script->>FS: Create shortcut at<br/>{{startup_dir}}\SmartTaskbar.lnk
        Script->>FS: Set TargetPath to<br/>{{current_dir}}\SmartTaskbar.exe
    else User runs remove-smarttaskbar-startup
        Script->>FS: Delete {{startup_dir}}\SmartTaskbar.lnk<br/>with -Force flag
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Manifest updates: Primarily structural and metadata changes with straightforward repository URL migration
  • Script additions: Two simple, standalone PowerShell scripts with basic COM object usage and file operations
  • No complex logic: Changes follow established patterns and lack intricate control flow

Areas for attention:

  • Verify placeholder substitution logic in the templated installer correctly replaces {{startup_dir}} and {{current_dir}} with actual paths during installation
  • Confirm both PowerShell scripts handle edge cases gracefully (missing directories, permission issues)
  • Validate that the new startup scripts resolve the original issue where shortcuts were being created in incorrect locations (e.g., C:\ root instead of startup directory)

Poem

🐰 With whiskers twitching, we hop with glee,
A startup shortcut, now placed correctly!
Templates and paths, no more confusion,
SmartTaskbar leaps past the path delusion,
Clean install, remove with ease—
A rabbit's delight, the taskbar to please!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "smarttaskbar@1.4.5: Improve startup script handling, update notes" directly and clearly describes the main changes in the pull request. The title follows the conventional format specified in the template (<manifest-name[@version]>: <general summary>), is concise and specific, and accurately reflects the core modifications: restructuring the installer logic with new modular startup scripts and expanding the notes with improved guidance. A developer scanning the history would immediately understand that this PR addresses startup script handling improvements.
Linked Issues Check ✅ Passed The PR directly addresses the core objectives from issue #13256. The reported problems—Select-Object "Property 'Path' cannot be found" error during installation and UnauthorizedAccessException in the add-startup script—are resolved by restructuring the installer from inline PowerShell logic to a templated, loop-driven approach with modular startup scripts. The testing output confirms both issues are fixed: the installer runs without the Select-Object error, and add-startup executes successfully without the UnauthorizedAccessException. Additionally, the PR improves notes with troubleshooting guidance and restructures the manifest for maintainability, all of which support the stability and usability objectives implied by the bug report.
Out of Scope Changes Check ✅ Passed All changes in the pull request are directly aligned with the stated objectives and the linked issue #13256. Updates to homepage, license, description, notes, url, autoupdate.url, bin array, uninstaller entry, and removal of the persist field are either necessary for the migration to the new upstream repository (Oliviaophia/SmartTaskbar) or directly support fixing the reported installation and startup script errors. The PR description explicitly accounts for each major change, and none of the modifications introduce functionality or fix bugs outside the scope of what is documented.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

❤️ Share

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

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

smarttaskbar

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

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a 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 (2)
scripts/smarttaskbar/remove-startup.ps1 (1)

1-2: LGTM! Consider optional error handling improvement.

The script correctly removes the startup shortcut with -ErrorAction SilentlyContinue to avoid errors when the file doesn't exist. The success message always displays, which is acceptable for typical scenarios.

If you want more precise feedback, consider capturing the result and conditionally printing the message:

-Remove-Item -Path '{{startup_dir}}\SmartTaskbar.lnk' -Force -ErrorAction SilentlyContinue
-Write-Host "SmartTaskbar has been removed from the startup programs." -ForegroundColor Green
+$removed = Remove-Item -Path '{{startup_dir}}\SmartTaskbar.lnk' -Force -ErrorAction SilentlyContinue -PassThru
+if ($removed -or !(Test-Path '{{startup_dir}}\SmartTaskbar.lnk')) {
+    Write-Host "SmartTaskbar has been removed from the startup programs." -ForegroundColor Green
+}
bucket/smarttaskbar.json (1)

26-29: Consider using UTF8 encoding instead of Ascii.

The script uses -Encoding Ascii for reading and writing files, which could cause issues with non-ASCII characters (though unlikely in these specific scripts). Modern PowerShell best practices recommend UTF8 encoding.

Apply this diff to use UTF8 encoding:

-        $content = Get-Content -Path $startup_script -Encoding Ascii
+        $content = Get-Content -Path $startup_script -Encoding UTF8
         $content = $content -replace '{{startup_dir}}', $startup_dir
         $content = $content -replace '{{current_dir}}', $current_dir
-        $content | Set-Content -Path "$dir\\$_.ps1" -Encoding Ascii
+        $content | Set-Content -Path "$dir\\$_.ps1" -Encoding UTF8
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9636827 and 6649dee.

📒 Files selected for processing (3)
  • bucket/smarttaskbar.json (1 hunks)
  • scripts/smarttaskbar/add-startup.ps1 (1 hunks)
  • scripts/smarttaskbar/remove-startup.ps1 (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (4)
bucket/smarttaskbar.json (4)

3-8: LGTM! Metadata correctly updated.

The description, homepage, and license fields have been properly updated to reflect the new repository (Oliviaophia/SmartTaskbar). The license object structure follows manifest best practices.


9-15: LGTM! Helpful user guidance provided.

The notes section is well-structured with clear instructions for managing startup programs and troubleshooting guidance for Windows Explorer-related issues during updates or uninstalls.


34-37: LGTM! Bin array correctly configured.

The bin array properly includes both startup management scripts alongside the main executable. Users will be able to run add-startup and remove-startup commands as documented in the notes section.


45-47: LGTM! Uninstaller ensures proper cleanup.

The uninstaller correctly references remove-startup.ps1 to clean up the startup shortcut when SmartTaskbar is uninstalled, ensuring no orphaned entries remain.

@SorYoshino SorYoshino changed the title Smarttaskbar smarttaskbar@1.4.5: Improve startup script handling, update notes Oct 29, 2025
Comment on lines 9 to 15
"notes": [
"Run 'add-startup' to add SmartTaskbar to startup programs.",
"Run 'remove-startup' to remove SmartTaskbar from startup programs.",
"",
"If an error occurs when updating or uninstalling, execute the following command then retry:",
"- `Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue`"
],
Copy link
Member

@z-Fng z-Fng Oct 30, 2025

Choose a reason for hiding this comment

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

Would adding it to startup via the registry work? If so, you can refer to Tailscale as an example.

This allows handling global installation while avoiding using the bin field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In theory, this approach is feasible. However, since I am not a user of this software, I prefer not to spend too much time testing an application I do not personally use.

Additionally, the installer configures auto-startup by adding a shortcut to Shell:Startup, and I believe there is no need to modify this behavior.

Copy link

@coderabbitai coderabbitai bot left a 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)
scripts/smarttaskbar/add-smarttaskbar-startup.ps1 (1)

1-6: Critical issue already flagged: Missing error handling for Save() operation.

The past review comment correctly identified that this script reports success unconditionally without verifying Save() succeeded, reproducing the original issue #13256 where "add-startup script returns errors but reports success" and UnauthorizedAccessException was observed. The suggested try-catch wrapper with proper error propagation is the correct fix.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6649dee and baac2d6.

📒 Files selected for processing (3)
  • bucket/smarttaskbar.json (1 hunks)
  • scripts/smarttaskbar/add-smarttaskbar-startup.ps1 (1 hunks)
  • scripts/smarttaskbar/remove-smarttaskbar-startup.ps1 (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-29T15:04:21.650Z
Learnt from: SorYoshino
PR: ScoopInstaller/Extras#16492
File: bucket/smarttaskbar.json:21-21
Timestamp: 2025-10-29T15:04:21.650Z
Learning: In Scoop manifests, the shortcut_folder function returns a plain string (the path to the shortcut folder), not an object. Do not use Select-Object -ExpandProperty Path on its output, as this will cause a "Property 'Path' cannot be found" error. The correct usage is to pipe shortcut_folder directly to other cmdlets like Split-Path: `shortcut_folder $global | Split-Path -Parent`.

Applied to files:

  • bucket/smarttaskbar.json
📚 Learning: 2025-10-13T09:37:06.093Z
Learnt from: o-l-a-v
PR: ScoopInstaller/Extras#16328
File: bucket/winutil.json:0-0
Timestamp: 2025-10-13T09:37:06.093Z
Learning: When reviewing code in Scoop manifests, always verify the actual file content if the diff appears incomplete or unusual, as diff context can be truncated or displayed incorrectly. The pattern `[string[]](...).ForEach{...}` is commonly used in post_uninstall scripts across the Extras repository.

Applied to files:

  • bucket/smarttaskbar.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (6)
bucket/smarttaskbar.json (6)

3-8: LGTM: Metadata updates align with repository migration.

The description, homepage, and license fields are correctly updated to reflect the new Oliviaophia/SmartTaskbar repository.


9-15: LGTM: Clear usage instructions and troubleshooting guidance.

The notes provide accurate command names (matching the shimmed bin entries) and include helpful troubleshooting for the Explorer-related errors mentioned in the PR objectives.


21-21: LGTM: Correct fix for the "Property 'Path' cannot be found" bug.

Removing Select-Object -ExpandProperty Path resolves the installer error from issue #13256. The shortcut_folder function returns a plain string, so piping directly to Split-Path is the correct approach.

Based on learnings.


34-38: LGTM: bin entries correctly reference the processed scripts.

The bin entries include the .ps1 files that will be generated in $dir by the installer script. These will be shimmed and accessible as add-smarttaskbar-startup and remove-smarttaskbar-startup commands.


23-31: No issues found — script files exist and naming is consistent.

Verification confirms both template scripts exist at the expected locations and match the loop iteration values. The post_uninstall script path construction is correct.


45-47: No issues found—uninstaller file reference is correctly configured.

The manifest properly handles the uninstaller file path:

  • The installer script copies remove-smarttaskbar-startup.ps1 from scripts/smarttaskbar/ to the app installation directory ($dir)
  • The script is listed in the "bin" array, confirming installation
  • The uninstaller correctly references "remove-smarttaskbar-startup.ps1" by filename; Scoop automatically resolves this to the installation directory during uninstallation

This pattern is consistent with other manifests in the repository.

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.

[Bug]: SmartTaskbar install error and add-startup script error

2 participants