Skip to content

Conversation

@michelroegl-brunner
Copy link
Member

Problem

PVE Host scripts were showing as 'Not Downloaded' in the Downloaded tab even when they were actually downloaded locally. This occurred because:

  • Local filenames use underscores (e.g., pbs_microcode.sh)
  • JSON slugs use hyphens (e.g., pbs-microcode)
  • The matching logic was doing raw string comparisons

Solution

  • Added normalizeId helper that converts identifiers to lowercase and replaces non-alphanumeric characters with hyphens
  • Enhanced script cards to include install_basenames extracted from install_methods
  • Updated both DownloadedScriptsTab and ScriptsGrid to use normalized comparisons
  • Now matches against script name, slug, or any install_basenames

Testing

  • Download all scripts
  • Go to Downloaded tab
  • Filter by 'PVE Host' category
  • Scripts like 'PVE LXC Execute Command' and 'PBS Processor Microcode' now correctly show as 'Downloaded'

Fixes the issue where PVE Host scripts appeared as 'Not Downloaded' despite being available locally.

…nces

- Add normalizeId helper to compare local filenames with script slugs/names
- Include install_basenames from install_methods for robust matching
- Fix false 'Not Downloaded' status for PVE Host scripts like 'PVE LXC Execute Command'
- Update DownloadedScriptsTab and ScriptsGrid to use normalized comparisons
- Resolves issue where scripts with underscores in filenames (e.g., pbs_microcode.sh)
  weren't matching JSON slugs with hyphens (e.g., pbs-microcode)
@michelroegl-brunner michelroegl-brunner requested a review from a team as a code owner October 20, 2025 13:59
@michelroegl-brunner michelroegl-brunner changed the title fix: normalize script matching to handle underscore vs hyphen differences fix/185: normalize script matching to handle underscore vs hyphen differences Oct 20, 2025
@michelroegl-brunner michelroegl-brunner merged commit fcb9aaf into main Oct 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

in category PVE Host 2 scripts wnt show as downloaded even though they are

2 participants