Skip to content

Conversation

@SiriosDev
Copy link

@SiriosDev SiriosDev commented Oct 31, 2025

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

Summary by CodeRabbit

  • Chores
    • Enhanced installation and uninstallation processes to more reliably handle plugin data and session information, ensuring better data preservation and directory management during package operations.

@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Walkthrough

The bucket/everything-alpha.json manifest file was modified to improve data persistence. Changes include ensuring plugin directories exist during install/uninstall phases, expanding copied file patterns to include session data (*.csv, *.lng, *.db, .ini, Session.json), and explicitly preserving plugin directory contents across updates.

Changes

Cohort / File(s) Summary
Everything-alpha manifest persistence enhancement
bucket/everything-alpha.json
Expanded pre_install to ensure plugin directories and copy broader file patterns (*.csv, *.lng, *.db, .ini, Session.json) plus all plugins subdirectory contents. Updated pre_uninstall to ensure plugin directories. Modified post-uninstall cleanup to preserve plugin directory and remaining config files back to persist directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify directory paths ($persist_dir\plugins, $dir\plugins) are correctly referenced across install/uninstall phases
  • Confirm file patterns (*.csv, *.lng, *.db, .ini, Session.json) adequately cover required configuration and session data
  • Validate that force-copy operations for plugins directory won't cause unintended overwrites

Poem

🐰 A rabbit hops through Everything's domain,
Where plugins and sessions now safely remain,
With directories ensured and patterns expanded,
No precious data's left stranded! 🔌📁✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning Issue #1520 requests persisting two specific items: the NO_ALPHA_INSTANCE file (an empty file to disable the Everything 1.5a instance) and the plugins folder (for user-installed plugins). The changeset successfully addresses plugin persistence by ensuring plugin directories exist and implementing comprehensive copying of plugin files. However, there is no explicit handling of the NO_ALPHA_INSTANCE file mentioned in the linked issue. The broader file patterns (csv, db, lng, ini, Session*.json) expand persistence beyond the minimum requirements, but they do not substitute for the missing NO_ALPHA_INSTANCE persistence requirement. The PR should be updated to explicitly address persistence of the NO_ALPHA_INSTANCE file as specified in issue #1520. This could involve adding a specific persist entry for the file or ensuring it is covered by the file copy operations during the pre_install/pre_uninstall lifecycle phases. Verify that this file is properly persisted between package updates.
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 (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[email protected]: fix persistent data" follows the conventional format specified in the repository's template (<manifest-name[@version]>: <general summary>) and clearly describes the primary change of the pull request. The title directly relates to the changeset, which shows extensive modifications to the pre_install, pre_uninstall, and cleanup sections focused on fixing data persistence. The title is concise, specific, and provides meaningful information about the main objective.
Out of Scope Changes Check ✅ Passed The changeset focuses on expanding persistence coverage for the everything-alpha package, with modifications limited to directory preparation, file copying patterns, and cleanup operations. All changes directly relate to improving data persistence, which aligns with the linked issue's objective. The broader file patterns introduced (csv, db, lng, ini, Session*.json) are explicitly mentioned in the PR description as intentional enhancements to persistence coverage and are related to the core goal of fixing persistent data. No unrelated or tangential changes are evident in the modifications.
✨ 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.

everything-alpha

  • 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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42ad80a and 0be4096.

📒 Files selected for processing (1)
  • bucket/everything-alpha.json (3 hunks)
🔇 Additional comments (2)
bucket/everything-alpha.json (2)

23-23: Verify NO_ALPHA_INSTANCE file persistence.

The PR objectives mention that users create a NO_ALPHA_INSTANCE empty file to disable the alpha instance. However, the file patterns on lines 23 and 47 ('*.csv', '*.lng', '*.db', '*.ini', 'Session*.json') won't match this filename.

Confirm whether this file should be explicitly added to the copy patterns (e.g., 'NO_ALPHA_INSTANCE') or if it's stored in a location already covered by the plugins directory persistence.

Also applies to: 47-47


17-48: Plugin directory approach looks sound.

The separation of plugin persistence from session/config data is well-organized, and ensuring directories exist before operations is defensive. Once the -Recurse flags are added, the persistence strategy should be robust.

"if (!(Test-Path \"$persist_dir\\Everything*.ini\")) { Invoke-ExternalCommand \"$dir\\Everything.exe\" -Args @('-install-config', 'null') | Out-Null }",
"Get-ChildItem \"$persist_dir\\*\" -Include 'Bookmarks*.csv', 'Everything.lng', 'Everything*.db', 'Everything*.ini', 'Filters*.csv', 'Plugins*.ini', 'Run History*.csv', 'Search History*.csv' | Copy-Item -Destination \"$dir\" -ErrorAction SilentlyContinue",
"Get-ChildItem \"$persist_dir\\*\" -Include '*.csv', '*.lng', '*.db', '*.ini', 'Session*.json' | Copy-Item -Destination \"$dir\" -ErrorAction SilentlyContinue",
"Get-ChildItem \"$persist_dir\\plugins\\*\" | Copy-Item -Destination \"$dir\\plugins\" -ErrorAction SilentlyContinue -Force",
Copy link

@coderabbitai coderabbitai bot Oct 31, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Add -Recurse flag to preserve nested plugin directory structures.

The Copy-Item command without -Recurse won't copy subdirectories and their contents. Since plugins typically organize files in nested directories, this will lose plugin structure during install.

Apply this diff:

-        "Get-ChildItem \"$persist_dir\\plugins\\*\" | Copy-Item -Destination \"$dir\\plugins\" -ErrorAction SilentlyContinue -Force",
+        "Get-ChildItem \"$persist_dir\\plugins\\*\" | Copy-Item -Destination \"$dir\\plugins\" -ErrorAction SilentlyContinue -Force -Recurse",
📝 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.

Suggested change
"Get-ChildItem \"$persist_dir\\plugins\\*\" | Copy-Item -Destination \"$dir\\plugins\" -ErrorAction SilentlyContinue -Force",
"Get-ChildItem \"$persist_dir\\plugins\\*\" | Copy-Item -Destination \"$dir\\plugins\" -ErrorAction SilentlyContinue -Force -Recurse",
🤖 Prompt for AI Agents
In bucket/everything-alpha.json around line 24, the Copy-Item call used to copy
plugins omits the -Recurse flag so subdirectories and their contents won’t be
copied; update the command to include -Recurse (i.e., add the -Recurse option to
the Copy-Item invocation) so nested plugin directory structures are preserved
during install.

Copy link
Author

Choose a reason for hiding this comment

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

The existing plugins are all single DLLs for now.

Copy link

Choose a reason for hiding this comment

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

@SiriosDev, thank you for clarifying! If the plugins are currently single DLL files without subdirectories, then the current implementation is sufficient. The -Recurse flag would only be needed if plugins start using nested directory structures in the future. Your approach works well for the current use case.

 /\_/\
( o.o )
 > ^ <  *noted!*

✏️ Learnings added
Learnt from: SiriosDev
Repo: ScoopInstaller/Versions PR: 2547
File: bucket/everything-alpha.json:24-24
Timestamp: 2025-10-31T11:53:16.842Z
Learning: In the Everything application (everything-alpha package), plugins are currently single DLL files stored in the `plugins` folder without nested subdirectories, so `-Recurse` flag is not needed when copying plugin files.

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.

"}",
"if ($cmd -eq 'uninstall') { reg import \"$dir\\uninstall-context.reg\" }",
"Get-ChildItem \"$dir\\*\" -Include 'Bookmarks*.csv', 'Everything.lng', 'Everything*.db', 'Everything*.ini', 'Filters*.csv', 'Plugins*.ini', 'Run History*.csv', 'Search History*.csv' | Copy-Item -Destination \"$persist_dir\" -ErrorAction SilentlyContinue -Force"
"Get-ChildItem \"$dir\\plugins\\*\" | Copy-Item -Destination \"$persist_dir\\plugins\" -ErrorAction SilentlyContinue -Force",
Copy link

@coderabbitai coderabbitai bot Oct 31, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Add -Recurse flag to preserve nested plugin directory structures during uninstall.

Same issue as line 24: plugin subdirectories won't be copied back to persist_dir without the -Recurse flag.

Apply this diff:

-        "Get-ChildItem \"$dir\\plugins\\*\" | Copy-Item -Destination \"$persist_dir\\plugins\" -ErrorAction SilentlyContinue -Force",
+        "Get-ChildItem \"$dir\\plugins\\*\" | Copy-Item -Destination \"$persist_dir\\plugins\" -ErrorAction SilentlyContinue -Force -Recurse",
📝 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.

Suggested change
"Get-ChildItem \"$dir\\plugins\\*\" | Copy-Item -Destination \"$persist_dir\\plugins\" -ErrorAction SilentlyContinue -Force",
"Get-ChildItem \"$dir\\plugins\\*\" | Copy-Item -Destination \"$persist_dir\\plugins\" -ErrorAction SilentlyContinue -Force -Recurse",
🤖 Prompt for AI Agents
In bucket/everything-alpha.json around line 46, the PowerShell Copy-Item
invocation used during uninstall is missing the -Recurse flag so nested plugin
subdirectories are not preserved; update the command to include -Recurse (i.e.,
add the -Recurse parameter to Copy-Item) so that plugin subdirectories are
copied back into "$persist_dir\plugins" recursively, keeping ErrorAction
SilentlyContinue and -Force as-is.

Copy link
Author

Choose a reason for hiding this comment

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

The existing plugins are all single DLLs for now.

Copy link

Choose a reason for hiding this comment

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

@SiriosDev, thank you for the clarification! If all current plugins are single DLL files without nested subdirectories, then the current implementation without -Recurse will work correctly for the existing use case.

The suggestion was meant as a future-proofing measure in case plugins ever include subdirectories, but it's perfectly fine to keep it as-is given the current plugin architecture. Your implementation handles the current requirements appropriately.

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]: Improve persist of everything-alpha

1 participant