Skip to content

fix(web): keep the phone admin header pinned while admin pages scroll - #4709

Merged
Quick104 merged 2 commits into
mainfrom
fix/admin-mobile-header-sticky
Nov 21, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/admin-mobile-header-sticky

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: N/A (web admin layout only; the Apple, Android, and Roku apps have no web admin shell)

Below 1024 px wide, the web admin area shows a header bar with the menu, search, and server-activity buttons. It is meant to stay at the top of the screen while an admin page scrolls, but it scrolls away with the page, so on a phone or tablet an admin has to scroll back to the top to open the menu or search. This change keeps it pinned.

The admin shell's root wrapper used overflow-x-hidden. That makes the browser compute overflow-y as auto, so the wrapper becomes a scroll container that never scrolls itself (the document does), and the header's position: sticky holds to the wrapper instead of the viewport.

Approach

  • Below lg, the wrapper uses overflow-x-clip, as the main app shell and #root already do. It still clips sideways overflow but is not a scroll container, so the header sticks to the viewport. flow-root keeps the header's top margin inside the wrapper, which overflow-x-hidden used to do; without it a lighter 12 px band showed above the header.
  • From lg up the wrapper keeps overflow-x-hidden, so desktop behaves exactly as before. Using clip at every width would also switch on the lg:sticky and xl:sticky panels on Activity, Backups → Restore, and Collections → Arrange, which have never stuck and need their own check.
  • With the header pinned below lg, two things that assumed it had scrolled away now allow for it:
    • In-page jump targets get scroll-mt-24 below lg: Restore's section chips, a plugin's missing-config links, and Skip to content.
    • The dashboard's drag auto-scroll in Customize mode starts its top edge zone below the header, because drag events over the header never reach the grid. The header opts into the existing data-sticky-header marker, which the drag code now reads. While the auto-scroll runs it follows the pointer from the window, so it keeps going over the header and stops once the pointer leaves the edge zone off the grid.

A root scroll-padding-top would have covered the jumps in one rule, but it makes the browser scroll the page up whenever a control in the pinned header gets focus, including when the drawer closes and returns focus to the menu button. The jump targets carry the margin instead, as BackupTable already does.

Validation

  • Reproduced on a Silo dev deployment built from main (66b836f) in Chromium at 393 px and 834 px: after scrolling 1,200 px on the dashboard, Settings → General, and Logs, the header's top edge was at −1,188 px. With this change it stays at 0 on every page checked, at 1023 px, and in phone landscape.
  • No horizontal overflow at 393, 834, 1023, 1024, 1280, or 1440 px, before or after. From 1024 px the wrapper still computes overflow: hidden/auto, as on main.
  • Restore's section chips land the section heading at 121 px, below the header's 66 px bottom edge; with the header pinned but without the added margin it landed at 49 px, under it. Skip to content leaves the page heading below the header.
  • Opening and closing the drawer, search, and the activity popover mid-page leaves the scroll position where it was, and focusing a header button does not scroll the page.
  • Dashboard Customize at 900 px: holding a dragged widget just below the header scrolls the page up (about 1,200 px in 1.2 s). With the header's marker removed, which is how the zone was measured before, it does not move. Moving the pointer on over the header keeps it scrolling; moving it down the side gutter, off the grid, stops it (0 px in a second, where the loop used to keep its last position and scroll another 992 px).
  • pnpm run lint, format:check, build, and budget:check pass. make test-web: 299 of 303 files pass; the other four (request.deadline, authCore.v2, client-context-v3, player-auth-refresh) fail the same way on a clean main checkout on this machine's Node version and import nothing this change touches. No new tests: jsdom does not lay out sticky elements, so the live checks are the proof.
  • Not exercised: a plugin's missing-config links (no plugin on the dev deployment needs configuration; they use the same scroll margin as the Restore anchors) and iOS Safari.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/admin-mobile-header-sticky/

Surface and build: web admin at phone (393 × 852), tablet (834 × 1194), 1023 px, phone landscape, and desktop (1024, 1280, 1440 px). Before on main at 66b836f; after on this branch's head; same data.

Risks

Follow-ups, each waiting for this to merge:

The main app shell has the same 12 px top-margin band this change avoids in admin; a separate pull request will cover it.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

Council review

Plan round (one round, on the unfixed code): Sol (gpt-6.2-sol, xhigh) 6.5/10, Opus (claude-opus-5-5, high) 8/10, Gemini (gemini-4-neon, xhigh) 7.5/10. It changed the plan: desktop keeps overflow-x-hidden (Sol), in-page jumps and the dashboard drag zone allow for the pinned header (all three), and the skip link and plugin config links were added to the jump targets (Opus, Gemini).

Background review: 2 rounds, last reviewed 22175bb

Member Round 1 Round 2
Sol (gpt-6.2-sol, xhigh) 8/10 8/10
Opus (claude-opus-5-5, high) 8.5/10 8.5/10
Gemini (gemini-4-neon, xhigh) 9/10 9.5/10

Round 1's one finding (Sol: the drag auto-scroll kept scrolling after the pointer left the grid) is fixed in 22175bb and confirmed resolved in round 2; it couldn't be posted as a review because of a GitHub authentication error. Round 2, after the merge, found three small gaps in the dashboard drag lifecycle: a drag that lands straight on the pinned header doesn't start scrolling (from this change), and two that predate it (dragging out of the window keeps scrolling; a layout update mid-drag can leave the Add Widget sheet faded). A follow-up pull request will handle them.

Visual review: 2 rounds

Member Round 1 Round 2
Sol better, 7/10 better, 8/10
Opus better, 7/10 better, 8/10
Gemini better, 6/10 better, 7/10

Fixed: a lighter 12 px band above the header at the top of the page (flow-root). Answered: text showing through the translucent header and the activity popover, the header moving up 12 px as it pins, and the focused skip link overlapping the header all match the main app's shared header and are outside this fix; the clipped title descenders were fixed separately in #4674.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, T3 Code (delegated reviews), Codex, Antigravity, headless Chromium via Playwright (captures) against a Silo dev deployment
  • Model(s): claude-opus-5-5 (implementation), gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (council reviews), claude-sonnet-5-5 (review subagents)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: see Council review above. Code review ran at xhigh on the final diff (three finders, a validation agent, and a sweep); its findings were the top-margin band, the focus and impersonation gaps listed under Risks, and comment fixes.

🤖 Generated with Claude Code

Below 1024 px the admin header carries `sticky top-0`, but the shell's
root wrapper used `overflow-x-hidden`, which makes the wrapper a scroll
container that never scrolls, so the header scrolled away with the page.

Below lg the wrapper now uses `overflow-x-clip` (as the main shell and
#root do) with `flow-root` to keep the header's top margin inside it;
from lg it keeps `overflow-x-hidden`, so desktop is unchanged. With the
header pinned, in-page jump targets (Restore section chips, plugin
config links, Skip to content) get `scroll-mt-24` below lg, and the
dashboard's drag auto-scroll starts its top edge zone below the header,
which now opts into `data-sticky-header`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d8c2e1ae-ec3f-4f98-92b8-341f267ce713
Commits

Reviewing files that changed from the base of the PR and between 0d649bd and 22175bb.

Files selected for processing: 5

  • web/src/components/AdminLayout.tsx
  • web/src/components/admin/dashboard/dragAutoScroll.ts
  • web/src/components/admin/plugins/PluginDetailSections.tsx
  • web/src/components/calm/SelectModeBar.tsx
  • web/src/pages/admin-backups/RestoreChoose.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T00:45:11.627508Z 22175bb New commits
🔒 Security Review ✅ Completed 2026-11-21T00:46:34.126681Z 22175bb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-triage silo-triage Bot added size/M 50–199 added + deleted lines (all files); change volume, not priority. bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish triaged High-confidence review completed; does not mean fixed, validated, or accepted for release. labels Nov 21, 2026
… edge zone

The loop only learned the pointer's position from the grid's dragover,
so after the pointer moved onto the pinned header or a side gutter it
kept scrolling on the grid's last position. While it runs it now follows
the pointer from the window and stops as soon as the pointer is out of
the edge zones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority. triaged High-confidence review completed; does not mean fixed, validated, or accepted for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant