Skip to content

feat(webui): larger server icons and expandable server rail - #1173

Merged
jatmn merged 4 commits into
mainfrom
feat/expandable-server-rail-1122
Dec 4, 2026
Merged

jatmn merged 4 commits into
mainfrom
feat/expandable-server-rail-1122

Conversation

@jatmn

@jatmn jatmn commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Closes #1122
Part of #1151 (Phase 2 — will rebase onto #1126 once #1171 merges before marking ready).

Summary

  • Enlarge server rail icons in frontend/app.js (ServerIcon optional size prop, 32 in the rail while keeping 20 in ServerPicker) and frontend/style.css (2rem icons in 2.75rem buttons and a 4.25rem collapsed rail, sized in rem so fix(webui): increase the overall UI scale slightly #1126's root percentage scale flows cleanly).
  • Add chevron-left and chevron-right paths to frontend/icons.js and wire a keyboard-operable rail toggle ([data-rail-toggle], aria-expanded, aria-controls="server-rail", matching aria-label/title, shared :focus-visible ring) into Workspace's #server-rail.
  • Expand the rail to 14.5rem on desktop showing the brand label (jModGuard), full server names with ellipsis truncation and title tooltips, explicit enrollment status (Set up / Pending), and the Fleet & Access shortcut label while preserving existing server selection and Fleet navigation.
  • Persist the expanded preference in localStorage (jmodguard.railExpanded) with try/catch fallback when browser storage is blocked.
  • Keep collapsed mobile (<= 720px) as a 1-row horizontal strip with a rotated chevron toggle, and expand into a full-width vertical list with bounded internal scroll (max-height: min(18rem, 45dvh)) above the sticky top navigation without clipping or horizontal overflow.
  • Add Light/Dark contrast & geometry coverage in scripts/frontend-contrast-test.mjs and both JSDOM and real Firefox desktop/mobile/keyboard/reload coverage in scripts/frontend-state-test.mjs.

Validation

  • bash scripts/ci-preflight.sh --only frontend — passed (webui build + audit, ESLint + selftest + flake checks, frontend-state-test.mjs 632/632 including real Firefox desktop & mobile expandable-rail test, frontend-contrast-test.mjs 40/40, frontend-warmup-test.mjs 13/13, frontend-sr-only-test.mjs 1/1, package-webui-test.mjs 4/4, administration-state-test.mjs 41/41).
  • Post-polish verification: npm run build --prefix tools/webui + node --test scripts/frontend-contrast-test.mjs + git diff --check — all passed.
  • Reviewed SHA: e5270aac84f74622cb960de1291d318b276abcd0

Summary by Sourcery

Make the server rail expandable so users can view server details and Fleet & Access navigation alongside larger server icons.

New Features:

  • Add a collapsible server rail that shows server names, enrollment status, and a Fleet & Access shortcut when expanded.
  • Keep the rail expansion preference across reloads and synchronize it between tabs, while allowing use when browser storage is unavailable.

Enhancements:

  • Enlarge server rail icons while keeping ServerPicker icons compact, and adapt the rail layout for mobile and enlarged browser text.
  • Add an accessible, keyboard-operable rail toggle with clear expanded state and focus styling.

Tests:

  • Add contrast and layout checks plus JSDOM and Firefox coverage for rail behavior, persistence, keyboard access, and desktop and mobile layouts.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

The expanded rail causes horizontal overflow at enlarged text sizes, and long server names can still be indistinguishable on touchscreens.

Approach. Expanding the existing rail keeps server switching and Fleet navigation in the same workspace controls.

Reviewed changes. I reviewed the rail from rendering and persistence through desktop and mobile interaction.

  • Server controls. Larger rail icons, expanded names and enrollment status, and a labeled Fleet shortcut.
  • Layout and state. A keyboard-operable toggle, a saved browser preference, and a bounded mobile server list.
  • Verification. The WebUI built and all four focused tests passed, including Firefox. Separate browser checks exercised enlarged text, long names, focus clipping, and the picker sizing from #1171.

Non-blocking

  • The mobile list clips keyboard focus outlines. Tabbing from the toggle to the first server at 390px clips the top and left of its focus ring because the full-width row sits flush against the scrollport. Add room for the outline inside the list or draw the ring inside the row. Mobile scroll container

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

Comment thread frontend/style.css Resolved
Comment thread frontend/style.css Resolved
Comment thread scripts/frontend-state-test.mjs Resolved
@jatmn
jatmn force-pushed the feat/expandable-server-rail-1122 branch from e5270aa to 48d95a2 Compare December 4, 2026 05:46

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Earlier layout findings still block approval. At enlarged text sizes, expanding the desktop rail can push the workspace past the viewport. On mobile, long server names that differ only at the end can still look identical.

Reviewed changes

I reviewed the rebase from e5270aa to 48d95a2 against the previous review.

  • Integrated the global UI scale. Kept the desktop rail sized in rem and added sizing caps for the collapsed mobile rail controls and icons.
  • Updated the sizing checks. Aligned the contrast assertion with the compact 1.25rem picker icon and adjusted the Firefox thresholds for the picker icon and expanded mobile list.
  • Verified the rebased layout. The WebUI build, all 41 contrast tests, and the focused Firefox rail and navigation tests passed. Chromium measured a 21.25px picker icon and a 34px rail icon at the default root size.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

@jatmn
jatmn marked this pull request as ready for review December 4, 2026 05:56

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Expanding the rail can still push workspace controls off-screen at enlarged text sizes.

Reviewed changes

I reviewed 7bf3106 against the previous reviewed head, 48d95a2.

  • Capped the desktop rail and added a stacked layout. The rail moves above the workspace under the new text-relative breakpoint.
  • Wrapped long server names. The expanded list shows distinguishing suffixes on mobile, on coarse-pointer devices, and in the stacked layout.
  • Updated the Firefox checks. The test scales the icon expectations and exercises shared-prefix names and the stacked layout at a 32px browser default font.

The WebUI build, 11 focused state checks, and all 41 contrast checks passed. A separate Firefox check reproduced the overflow above the new breakpoint.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

Comment thread frontend/style.css Resolved
@sourcery-ai

sourcery-ai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit a6c5ee6

#1122 feat(webui): larger server icons and an expandable sidebar showing server names · 7 of 7 met

# Requirement Status Notes
1 Make the server icons in the rail larger. ✅ Met Rail icons render at 32px and use 2rem CSS sizing; ServerPicker icons remain 20px.
2 Add a toggle that expands the rail to show each server's full name and status. ✅ Met The expanded rail shows server names and Set up/Pending labels; collapsed rows retain status in their accessible labels.
3 Remember the expanded vs collapsed choice across reloads. ✅ Met The preference is stored under jmodguard.railExpanded and restored when Workspace initializes.
4 Make the toggle and expanded rows keyboard-operable and accessibly named. ✅ Met The toggle is a button with expanded state and control attributes; server and Fleet rows have visible names when expanded, and tests cover keyboard toggling.
5 Support expand/collapse on mobile as well as desktop. ✅ Met Mobile collapsed mode remains a horizontal icon row; expanded mode becomes a bounded, internally scrollable vertical list.
6 Preserve existing server selection and Fleet-shortcut behavior. ✅ Met The added state tests exercise server selection and Fleet navigation while the rail is expanded.
7 Cover the toggle, expanded names, persistence, keyboard access, and mobile layout with tests. ✅ Met The change adds contrast checks, JSDOM state coverage, and Firefox desktop/mobile, keyboard, reload, and scrolling coverage.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 3 issues

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: frontend/style.css:1050, frontend/app.js:2880, scripts/frontend-state-test.mjs:5520


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread frontend/style.css Resolved
Comment thread frontend/app.js Resolved
Comment thread scripts/frontend-state-test.mjs Resolved
@jatmn
jatmn force-pushed the feat/expandable-server-rail-1122 branch from fe19d77 to a6c5ee6 Compare December 4, 2026 06:03

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

I reviewed the updates since 7bf3106 through the rebase onto 4935390.

  • Wrapped Shield controls. At a 32px Firefox default font, the controls stayed within the viewport with the expanded rail beside the workspace at 1366px.
  • Synced rail state across tabs. A two-tab Firefox check confirmed that toggling the rail and clearing its stored preference updated the second tab.
  • Updated layout and scroll coverage. The stacked layout uses a workspace class, the mobile test scrolls to the last server, and the rail toggle retains its keyboard focus style after the rebase.

The WebUI build, all 42 contrast checks, and three focused state tests passed on a6c5ee6.

Pullfrog  | View workflow run | Using gpt-6.2-sol | 𝕏

@jatmn
jatmn merged commit ec0bc49 into main Dec 4, 2026
18 checks passed
@jatmn
jatmn deleted the feat/expandable-server-rail-1122 branch December 4, 2026 06:10
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.

feat(webui): larger server icons and an expandable sidebar showing server names

1 participant