[PR #349] [MERGED] Various small fixes #381

Closed
opened 2026-02-26 12:41:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/349
Author: @michelroegl-brunner
Created: 11/26/2025
Status: Merged
Merged: 11/26/2025
Merged by: @MickLesk

Base: mainHead: fix/some_small_thnigs


📝 Commits (10+)

  • d50aff3 Fix script viewer to support vm/ and tools/ scripts
  • 1d36f76 Fix downloaded scripts count to include vm/ and tools/ scripts
  • cd51945 Filter categories to only show those with scripts
  • c8825dd Fix intermittent page reloads from VersionDisplay reconnect logic
  • c77cd33 Fix Next.js HMR WebSocket and static asset handling
  • b01c029 Fix WebSocket upgrade handling to properly route Next.js HMR
  • 3d45e6d Revert WebSocket handling to simpler approach
  • d3da103 Fix WebSocket upgrade handling to preserve Next.js HMR handlers
  • 65bed15 Fix random page reloads during normal app usage
  • 53df720 Fix critical bug: prevent reloads from stale updateLogsData.isComplete

📊 Changes

9 files changed (+507 additions, -173 deletions)

View changed files

📝 server.js (+54 -4)
📝 src/app/_components/CategorySidebar.tsx (+2 -1)
📝 src/app/_components/ResyncButton.tsx (+21 -5)
📝 src/app/_components/ScriptDetailModal.tsx (+1 -1)
📝 src/app/_components/TextViewer.tsx (+88 -121)
src/app/_components/UpdateConfirmationModal.tsx (+175 -0)
📝 src/app/_components/VersionDisplay.tsx (+131 -37)
📝 src/app/page.tsx (+33 -3)
📝 src/server/api/routers/version.ts (+2 -1)

📄 Description

This PR includes various small fixes and improvements:

Commits

65bed15 - Fix random page reloads during normal app usage

  • Memoize startReconnectAttempts with useCallback to prevent recreation on every render
  • Fix useEffect dependency arrays to include memoized function
  • Add stricter guards checking refs before starting reconnect attempts
  • Ensure reconnect logic only runs when actually updating (not during normal usage)
  • Add early return in fallback useEffect to prevent false triggers
  • Add ref guards in ResyncButton to prevent multiple simultaneous sync operations
  • Only reload after sync if it was user-initiated

cd51945 - Filter categories to only show those with scripts

  • Add filter to exclude categories with count 0 from category sidebar
  • Only categories with at least one script will be displayed
  • Reduces UI clutter by hiding empty categories

1d36f76 - Fix downloaded scripts count to include vm/ and tools/ scripts

  • Update matching logic to use same robust approach as DownloadedScriptsTab
  • Add normalized slug matching to handle filename-based slugs vs JSON slugs
  • Add multiple fallback matching strategies for better script detection
  • Fixes issue where scripts in vm/ and tools/ directories weren't being counted

d50aff3 - Fix script viewer to support vm/ and tools/ scripts

  • Update ScriptDetailModal to extract scriptName from any path (ct/, vm/, tools/)
  • Refactor TextViewer to use actual script paths from install_methods
  • Remove hardcoded path assumptions and use dynamic script paths
  • Only show Install Script tab for ct/ scripts that have install scripts
  • Rename CT Script tab to Script for better clarity

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE-Local/pull/349 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 11/26/2025 **Status:** ✅ Merged **Merged:** 11/26/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `fix/some_small_thnigs` --- ### 📝 Commits (10+) - [`d50aff3`](https://github.com/community-scripts/ProxmoxVE-Local/commit/d50aff366cb500dbd425637a19a25edb8bbcfaba) Fix script viewer to support vm/ and tools/ scripts - [`1d36f76`](https://github.com/community-scripts/ProxmoxVE-Local/commit/1d36f760a74874ba0bd33e38e1aa8f27a399785a) Fix downloaded scripts count to include vm/ and tools/ scripts - [`cd51945`](https://github.com/community-scripts/ProxmoxVE-Local/commit/cd51945d27a744b794afb6682823fc5264149742) Filter categories to only show those with scripts - [`c8825dd`](https://github.com/community-scripts/ProxmoxVE-Local/commit/c8825dddf97acd5a395cc39419011f1d39d26220) Fix intermittent page reloads from VersionDisplay reconnect logic - [`c77cd33`](https://github.com/community-scripts/ProxmoxVE-Local/commit/c77cd330192a0e5fb39e63e07dde42cc5a4d26b9) Fix Next.js HMR WebSocket and static asset handling - [`b01c029`](https://github.com/community-scripts/ProxmoxVE-Local/commit/b01c029b18f9036e53bf83653745f5fef7b33e7e) Fix WebSocket upgrade handling to properly route Next.js HMR - [`3d45e6d`](https://github.com/community-scripts/ProxmoxVE-Local/commit/3d45e6d355eb151539ce7daf60849206637aa371) Revert WebSocket handling to simpler approach - [`d3da103`](https://github.com/community-scripts/ProxmoxVE-Local/commit/d3da1038dba17c8d78ad80f02790c8b296076ca3) Fix WebSocket upgrade handling to preserve Next.js HMR handlers - [`65bed15`](https://github.com/community-scripts/ProxmoxVE-Local/commit/65bed15722ad844732908b5f2810193d9062c59c) Fix random page reloads during normal app usage - [`53df720`](https://github.com/community-scripts/ProxmoxVE-Local/commit/53df7201d63bbaac247adf1b4cc0dd1f8df1a235) Fix critical bug: prevent reloads from stale updateLogsData.isComplete ### 📊 Changes **9 files changed** (+507 additions, -173 deletions) <details> <summary>View changed files</summary> 📝 `server.js` (+54 -4) 📝 `src/app/_components/CategorySidebar.tsx` (+2 -1) 📝 `src/app/_components/ResyncButton.tsx` (+21 -5) 📝 `src/app/_components/ScriptDetailModal.tsx` (+1 -1) 📝 `src/app/_components/TextViewer.tsx` (+88 -121) ➕ `src/app/_components/UpdateConfirmationModal.tsx` (+175 -0) 📝 `src/app/_components/VersionDisplay.tsx` (+131 -37) 📝 `src/app/page.tsx` (+33 -3) 📝 `src/server/api/routers/version.ts` (+2 -1) </details> ### 📄 Description This PR includes various small fixes and improvements: ## Commits **65bed15** - Fix random page reloads during normal app usage - Memoize startReconnectAttempts with useCallback to prevent recreation on every render - Fix useEffect dependency arrays to include memoized function - Add stricter guards checking refs before starting reconnect attempts - Ensure reconnect logic only runs when actually updating (not during normal usage) - Add early return in fallback useEffect to prevent false triggers - Add ref guards in ResyncButton to prevent multiple simultaneous sync operations - Only reload after sync if it was user-initiated **cd51945** - Filter categories to only show those with scripts - Add filter to exclude categories with count 0 from category sidebar - Only categories with at least one script will be displayed - Reduces UI clutter by hiding empty categories **1d36f76** - Fix downloaded scripts count to include vm/ and tools/ scripts - Update matching logic to use same robust approach as DownloadedScriptsTab - Add normalized slug matching to handle filename-based slugs vs JSON slugs - Add multiple fallback matching strategies for better script detection - Fixes issue where scripts in vm/ and tools/ directories weren't being counted **d50aff3** - Fix script viewer to support vm/ and tools/ scripts - Update ScriptDetailModal to extract scriptName from any path (ct/, vm/, tools/) - Refactor TextViewer to use actual script paths from install_methods - Remove hardcoded path assumptions and use dynamic script paths - Only show Install Script tab for ct/ scripts that have install scripts - Rename CT Script tab to Script for better clarity --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:41:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE-Local#381
No description provided.