Skip to content

Fix Unraid 7.0.x compatibility: Add Folder button, VM crash, incognito placement - #15

Closed
chodeus wants to merge 10 commits into
mainfrom
claude/verify-folderview-debug-xg767
Closed

Fix Unraid 7.0.x compatibility: Add Folder button, VM crash, incognito placement#15
chodeus wants to merge 10 commits into
mainfrom
claude/verify-folderview-debug-xg767

Conversation

@chodeus

@chodeus chodeus commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Folder button missing on Unraid 7.0.x.js-actions doesn't exist on older Unraid versions, so the button injection silently failed. Now falls back to insertBefore('input[value="Add Container/Add VM"]') matching FV2's approach. 7.2+ users hit the existing .js-actions path unchanged.
  • VM page 500 errorlibvirt_helpers.php was lazy-loaded inside readInfo(), which crashes on 7.0.1. FV2 loaded it at the top of lib.php and worked fine. Restored top-level loading with file_exists guard. VNC port extraction (new in FV3) wrapped in try/catch. Added granular debug logging for future VM crash diagnosis.
  • Incognito button misplaced on Unraid < 7.2.ToggleViewMode doesn't exist on 7.0.x, so the button was inserted as a bare element with no layout context. Now wraps in a .fv3-incognito-bar div placed after DIV.title heading, matching the visual position on 7.2+.
  • Bug report template outdated — Referenced FOLDER_VIEW_DEBUG_MODE = true from FV2 which no longer exists. Updated to use the fv3debug keyboard toggle.

Files changed

File Change
folder.view3.Docker.page Add Folder button fallback for 7.0.x
folder.view3.VMs.page Add Folder button fallback for 7.0.x
lib.php Top-level libvirt load, VNC try/catch, debug logging
shared.js Incognito button fallback placement
folder-common.css .fv3-incognito-bar wrapper styling
bug_report.yml Updated debug instructions

Test plan

  • Verify Add Folder button appears on Unraid 7.0.x Docker and VM pages
  • Verify Add Folder button still works on Unraid 7.2+
  • Verify VM page no longer returns 500 on Unraid 7.0.x
  • Verify incognito button placement looks correct on 7.0.x (spacing between title and table)
  • Verify incognito button unchanged on 7.2+
  • Verify debug mode (fv3debug keyboard toggle) works and produces console output
  • Confirm no regressions on stable Unraid 7.2+ installations

claude added 10 commits April 11, 2026 04:49
The template referenced the old FolderView 2 variable
`FOLDER_VIEW_DEBUG_MODE = true` which no longer exists. Updated to
use the FV3 keyboard toggle (`fv3debug`) which enables debug mode,
persists to localStorage, and activates all [FV3] console logging.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
Make it clear that debug mode activates immediately when typing
fv3debug (no Enter needed), and tell users to open the console
first so they can see the confirmation message.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
- .js-actions doesn't exist on Unraid 7.0.1, so the button injection
  via prependTo('.js-actions') silently failed. Now falls back to
  insertAfter the container/VM table (the approach upstream FV2 used)
- Wrap VNC port extraction in try/catch to prevent 500 errors from
  domain_get_xml on older Unraid versions

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
Instead of inserting after the table, place it directly after the
Add Container / Add VM button so it sits in the toolbar row.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
When .ToggleViewMode doesn't exist (Unraid 7.0.x), the button was
inserted as a bare element before the table with no layout context.
Now wraps it in a .fv3-incognito-bar div with flex styling so it
displays properly regardless of Unraid version.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
readInfo for VM type crashes silently on Unraid 7.0.1 despite
readUnraidOrder using the same libvirt pattern successfully. Added
step-by-step debug logs and try/catch around Libvirt init to
pinpoint the exact failure point.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
FV3 changed this to lazy loading but that breaks on Unraid 7.0.1
where readInfo for VM crashes silently. FV2 loaded it unconditionally
at the top of lib.php and worked fine on the same system. Restoring
that approach with a file_exists guard for systems without the VM
plugin. The lazy loader function remains as a secondary safety check.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
On 7.0.x the DOM has a DIV.title element ("Virtual Machines" /
"Docker Containers") above the table. Place the incognito button
right after that heading instead of directly before the table,
matching the visual position it has on 7.2+ inside .ToggleViewMode.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
Zero margin so the button sits within the existing gap between
the page title and table without adding extra spacing.

https://claude.ai/code/session_01QYTVFVHb9mydcQXPL9xHp9
@chodeus chodeus closed this Apr 11, 2026
@chodeus
chodeus deleted the claude/verify-folderview-debug-xg767 branch April 11, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants