Skip to content

feat(header): reintroduce consolidated <unraid-header> + matched boot logo#2701

Open
elibosley wants to merge 3 commits into
masterfrom
fix/consolidated-header-boot-logo
Open

feat(header): reintroduce consolidated <unraid-header> + matched boot logo#2701
elibosley wants to merge 3 commits into
masterfrom
fix/consolidated-header-boot-logo

Conversation

@elibosley

@elibosley elibosley commented Jul 22, 2026

Copy link
Copy Markdown
Member

Context

The consolidated header (#2689) was merged, then reverted by #2702 (revert-2689-feat/consolidated-header). This branch reverts that revert (reapplying #2689 in full — Header.php, default-base.css, et al.) and adds the boot-logo polish on top, so the consolidated header lands again with the mount jump/flash fixed.

⚠️ Merge order

Merge after #2702. This branch is built on top of #2702's revert commit and reapplies it, so:

Commits

  1. Revert "feat(header)..."Revert "feat(header): gate consolidated <unraid-header> on Unraid 7.3+" #2702's revert (base).
  2. Reapply "feat(header)..." — revert of the revert: the consolidated header back.
  3. fix(header): match boot logo... — the logo polish (below).

Logo polish

The pre-mount boot placeholder didn't match the mounted <unraid-header> logo, so the logo resized, jumped, and shimmered on mount. Reproduce the mounted logo's box in the static placeholder:

  • Match the responsive 14rem/16rem width.
  • Invisible version stub so it centers as the same logo+version group on desktop (same top offset); center below the uptime strip on mobile.
  • Render the same inline gradient SVG (identical element/rendering to the mounted logo; no separate asset fetch).

Verified on a 7.3.2 QA box: boot vs mounted logo measure identically (desktop 160px @ top=20, mobile 140px @ top≈42). Pairs with unraid/api#2037 (inlines the mounted logo SVG).

Summary by CodeRabbit

  • New Features
    • Added a new Header logo style display setting (Gradient or Theme adaptive) and a corresponding saved configuration value.
  • Style
    • Improved the consolidated header’s boot logo layout, including clearer alignment, updated SVG sizing/placement, and responsive behavior on small screens.
  • Bug Fixes
    • Improved header loading stability by preventing visual layout shifts during mount.
    • Corrected header styling for the consolidated header variant, including proper termination of scoped sidebar rules.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR adds a configurable header logo style, enables consolidated headers for Unraid 7.4+, passes server and display state to <unraid-header>, preserves the legacy path, and adds responsive layout and styling rules.

Changes

Consolidated header configuration

Layer / File(s) Summary
Header logo configuration
emhttp/plugins/dynamix/DisplaySettings.page, emhttp/plugins/dynamix/default.cfg
Adds Gradient and Theme adaptive logo options and stores the new headerLogo display setting.

Consolidated header rendering

Layer / File(s) Summary
Version-gated component rendering
emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php
Activates consolidated rendering for Unraid 7.4+, passes locale, server state, array-usage, and logo-style attributes, and retains the legacy header branch.

Responsive header styling

Layer / File(s) Summary
Logo markup and layout rules
emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php, emhttp/plugins/dynamix/styles/default-base.css
Adds the boot-logo wrapper and SVG sizing, responsive alignment, consolidated-header spacing, sidebar padding overrides, and CSS block closure.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HeaderPHP
  participant ServerState
  participant UnraidHeader
  HeaderPHP->>HeaderPHP: Check Unraid version
  HeaderPHP->>ServerState: Load server state
  HeaderPHP->>UnraidHeader: Pass header attributes and logo markup
  UnraidHeader-->>HeaderPHP: Render consolidated header
Loading

Possibly related PRs

  • unraid/webgui#2702: Modifies the same consolidated-header version gate and related header handling.

Poem

A rabbit hops beneath the glow,
As headers learn which style to show.
Server state joins the logo bright,
Responsive spacing keeps it right.
Hop, hop—the new header’s aglow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: reintroducing the consolidated header and matching boot logo.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/consolidated-header-boot-logo

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.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.07.23.1256
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2701/webgui-pr-2701.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix/DisplaySettings.page
emhttp/plugins/dynamix/default.cfg
emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php
emhttp/plugins/dynamix/styles/default-base.css

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2701, or run:

plugin remove webgui-pr-2701

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php`:
- Around line 31-36: Update the mobile .unraid-header-boot-logo styling in both
referenced rule blocks to use horizontal centering for the column contents by
changing align-items from flex-start to center, while preserving the existing
vertical centering and other layout properties.
- Around line 54-58: Update the responsive rule for
`#header.unraid-consolidated-header` .unraid-header-boot-logo img so its desktop
width begins at the same sm/640px breakpoint used by the mounted header layout,
rather than at 30rem; preserve the existing 16rem width and other styles.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 63466cda-7814-48aa-a532-b1345768af88

📥 Commits

Reviewing files that changed from the base of the PR and between b6d4e0d and e7e8e02.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php

Comment on lines 31 to +36
#header.unraid-consolidated-header .unraid-header-boot-logo {
display: inline-flex;
align-items: center;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 0.8rem;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Center the boot logo horizontally on mobile.

justify-content: center centers the column vertically, while align-items: flex-start keeps the logo left-aligned. Since unraid-header is a full-width block host, this fallback does not match the mounted mobile layout.

 `@media` (max-width: 639.98px) {
     `#header.unraid-consolidated-header` .unraid-header-boot-logo {
+        display: flex;
+        width: 100%;
+        align-items: center;
         height: 100%;
         box-sizing: border-box;
         justify-content: center;

Also applies to: 69-75

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php` around lines 31
- 36, Update the mobile .unraid-header-boot-logo styling in both referenced rule
blocks to use horizontal centering for the column contents by changing
align-items from flex-start to center, while preserving the existing vertical
centering and other layout properties.

Comment on lines +54 to +58
@media (min-width: 30rem) {
#header.unraid-consolidated-header .unraid-header-boot-logo img {
width: 16rem;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Repository files matching Header.php:"
fd -a 'Header\.php$' . | sed 's#^\./##'

echo
echo "Relevant Header.php snippets:"
if [ -f emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php ]; then
  wc -l emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php
  sed -n '1,90p' emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php | cat -n
fi

echo
echo "Search for unraid-consolidated-header, sm breakpoint, and 30rem references:"
rg -n "unraid-consolidated-header|unraid-header|sm\\b|30rem|640px|breakpoint|min-width" . --iglob '*.{php,css,js,ts,html,md}' | head -200

Repository: unraid/webgui

Length of output: 50372


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check for package/config files that may define Tailwind breakpoints:"
git ls-files | grep -Ei '(^|/)(tailwind\.config\.(js|ts|cjs|mjs)|package\.json|package-lock\.json|yarn\.lock|pnpm-lock\.yaml)$' | while read -r f; do
  echo "--- $f"
  case "$f" in
    *package.json) sed -n '1,220p' "$f";;
    *tailwind*|*package-lock.json|*yarn.lock|*pnpm-lock.yaml) sed -n '1,160p' "$f";;
  esac
done

Repository: unraid/webgui

Length of output: 2105


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Search for unraid header mounted JS/CSS definitions:"
rg -n "unraid-header|unraid-consolidated-header|mounted|querySelector\\('unraid-header'|custom-elements|defineCustomElement|sm|640px|30rem" . --iglob '*.{php,css,js,ts,mjs,cjs,html,md}' | head -300

echo
echo "Find likely custom header files:"
fd -i 'unraid-header|header' . -t f | sed -n '1,120p'

Repository: unraid/webgui

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "File size:"
wc -l emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php

echo
echo "Header.php relevant lines:"
sed -n '40,70p' emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php | cat -n

echo
echo "Header.php unraid-header references (if any):"
rg -n "unraid-header|unraid-consolidated-header|script src|30rem|640px|sm|md" emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php || true

echo
echo "Focused source file matches excluding vendored ace/novnc directories:"
rg -n --glob '!emhttp/plugins/dynamix/javascript/ace/**' --glob '!emhttp/plugins/dynamix.vm.manager/novnc/**' \
  'unraid-header|unraid-consolidated-header|media \(min-width: ?640px|media \(min-width: ?(sm|lg)|`@media` \(min-width: 30rem|`@media` \(min-width: 640px' . | head -200

echo
echo "Focused component/custom header files:"
git ls-files | grep -Ei 'unraid.?header|header' | grep -v -E '(^|/)(node_modules|\.git|ace|novnc)/' | sed -n '1,120p'

Repository: unraid/webgui

Length of output: 6246


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "default-base consolidated header and breakpoint rules:"
rg -n --glob '!emhttp/plugins/dynamix/styles/default-base.css.map' \
  '`#header`\.unraid-consolidated-header|unraid-consolidated-header|`@media` \(min-width: ?640px|`@media` \(min-width: 30rem|unraid-header-boot|unraid-header-os' \
  emhttp/plugins/dynamix/styles/default-base.css | head -200

echo
echo "Relevant default-base ranges:"
sed -n '460,510p' emhttp/plugins/dynamix/styles/default-base.css | cat -n
sed -n '2415,2455p' emhttp/plugins/dynamix/styles/default-base.css | cat -n

echo
echo "Read-only invariant: exact breakpoint values tied to the consolidated header rules in Header.php"
python3 - <<'PY'
from pathlib import Path
import re
p = Path('emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php')
text = p.read_text()
needles = {
  'light_image_30rem': re.search(r'`@media`\s*\(\s*min-width:\s*30rem\s*\)\s*\{[^}]*\.unraid-header-boot-logo\s+img\s*\{[^}]*/\*.*\*/\s*width:\s*16rem\s*;', text, re.S),
  'version_block_640': re.search(r'`@media`\s*\(\s*min-width:\s*640px\s*\)\s*\{[^}]*\.unraid-header-boot-version\s*\{[^}]*display:\s*block;', text, re.S),
  'boot_logo_max_639': re.search(r'`@media`\s*\(\s*max-width:\s*639\.98px\s*\)\s*\{[^}]*\.unraid-header-boot-logo\s*\{', text, re.S),
}
for k, m in needles.items():
    print(f'{k}: {bool(m)}')
PY

Repository: unraid/webgui

Length of output: 3444


Align the boot logo breakpoint with the consolidated header breakpoint.

In the 480–639px range, the logo switches to desktop sizes at 30rem but the mounted version pill and overall mounted-layout styles switch at sm (640px), so the light-DOM fallback doesn’t match the mounted header. Use the same breakpoint for the logo rule.

Proposed adjustment
-        `@media` (min-width: 30rem) {
+        `@media` (min-width: 640px) {
📝 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
@media (min-width: 30rem) {
#header.unraid-consolidated-header .unraid-header-boot-logo img {
width: 16rem;
}
}
`@media` (min-width: 640px) {
`#header.unraid-consolidated-header` .unraid-header-boot-logo img {
width: 16rem;
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php` around lines 54
- 58, Update the responsive rule for `#header.unraid-consolidated-header`
.unraid-header-boot-logo img so its desktop width begins at the same sm/640px
breakpoint used by the mounted header layout, rather than at 30rem; preserve the
existing 16rem width and other styles.

@elibosley
elibosley force-pushed the fix/consolidated-header-boot-logo branch 2 times, most recently from b6e4383 to e0fdf8b Compare July 22, 2026 19:31
@elibosley elibosley changed the title fix(header): match boot logo to mounted logo to remove mount jump feat(header): reintroduce consolidated <unraid-header> + matched boot logo Jul 22, 2026
The pre-mount boot logo placeholder was a single centered 14rem <img>, while the
mounted <unraid-header> logo is 16rem on desktop, sits higher (grouped with the
version), is centered below the uptime strip on mobile, and renders as an inline
SVG. That mismatch made the logo visibly resize, jump, and shimmer on mount.

Reproduce the mounted logo's box in the static placeholder: match the responsive
14rem/16rem width, add an invisible version stub so it centers as the same group
on desktop (same top offset), center below the uptime strip on mobile, and
render the same inline gradient SVG (identical element/rendering to the mounted
logo, and no separate asset fetch). The logo now stays put and paints seamlessly
when the component upgrades.
The consolidated <unraid-header> ships with 7.4, so raise the
version_compare gate and its fallback boundary from 7.3 to 7.4.
@elibosley
elibosley force-pushed the fix/consolidated-header-boot-logo branch from 36f3f49 to 2a55f39 Compare July 23, 2026 12:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@emhttp/plugins/dynamix/styles/default-base.css`:
- Around line 493-496: Update the header offset styles around
`#header.unraid-consolidated-header` `#UnraidHeader` so the unraid-header-boot-logo
placeholder inside unraid-header receives the same horizontal padding and
mounted offsets before replacement. Share the values through common CSS
variables or selectors, including the sidebar theme’s 64px plus 1rem offset,
while preserving the existing mounted-header layout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 252aad80-6158-47e2-b1be-10d5d7e3d56a

📥 Commits

Reviewing files that changed from the base of the PR and between 36f3f49 and 2a55f39.

📒 Files selected for processing (4)
  • emhttp/plugins/dynamix/DisplaySettings.page
  • emhttp/plugins/dynamix/default.cfg
  • emhttp/plugins/dynamix/include/DefaultPageLayout/Header.php
  • emhttp/plugins/dynamix/styles/default-base.css

Comment on lines +493 to +496
#header.unraid-consolidated-header #UnraidHeader {
min-height: inherit;
padding: .5rem 1rem;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Apply the mounted header offsets to the boot placeholder.

Header.php renders .unraid-header-boot-logo directly inside <unraid-header>, but these rules add padding only after mount via #UnraidHeader. The placeholder therefore starts at a different horizontal position—especially in sidebar themes, where the mounted offset is 64px + 1rem—and visibly jumps when replaceChildren() runs. Share these offsets with the boot markup, preferably through common CSS variables or selectors.

Also applies to: 2437-2444

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@emhttp/plugins/dynamix/styles/default-base.css` around lines 493 - 496,
Update the header offset styles around `#header.unraid-consolidated-header`
`#UnraidHeader` so the unraid-header-boot-logo placeholder inside unraid-header
receives the same horizontal padding and mounted offsets before replacement.
Share the values through common CSS variables or selectors, including the
sidebar theme’s 64px plus 1rem offset, while preserving the existing
mounted-header layout.

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.

1 participant