refactor(hub): redesign Home & Spawn UI with unified design system#56
Open
KerwinTsaiii wants to merge 14 commits intodevelopfrom
Open
refactor(hub): redesign Home & Spawn UI with unified design system#56KerwinTsaiii wants to merge 14 commits intodevelopfrom
KerwinTsaiii wants to merge 14 commits intodevelopfrom
Conversation
Replace the stock JupyterHub home page with a branded landing page that shows platform info, quick-start guide, available courses, documentation links, and news. The spawner is accessible via a prominent "Start My Server" button in a floating launch bar. Also redirect auto-login users to /hub/home instead of /hub/spawn. Made-with: Cursor
- Convert server_active from a static module variable to React state so the launch bar (icon, badge, description, buttons) re-renders after stopping the server via DELETE API call - Point "Start My Server" href to /hub/spawn instead of /hub/user/ so users go directly to the spawner rather than the "server not running" interstitial page - Remove legacy require(["home"]) from template to prevent the JupyterHub home.js from conflicting with React's stop handler - Remove debug logging panel Made-with: Cursor
- Home: dynamic resource cards from API, launch bar, quick-start strip, docs/news sections with shared --home-* design tokens - Spawn: two-column layout with resource picker and sticky config sidebar - values.yaml: set redirect_to_server=false so users land on Home first Made-with: Cursor
Home page now respects window.AVAILABLE_RESOURCES (injected by Hub based on user team membership), matching the same filtering logic used in the Spawn page's useResources hook. Without this, users could see resources on Home they don't have permission to launch. Made-with: Cursor
…trap Home page used .container class without defining it, depending entirely on Hub's Bootstrap CSS. This adds an explicit scoped rule under .home-page matching the 1120px max-width used by Spawn's #spawn-root. Made-with: Cursor
Previously getResources() errors were silently swallowed, leaving users with a confusing "No resources available" message. Now captures the error and displays a visible warning box with a fallback link to the Spawner page. Made-with: Cursor
The fallback server_url incorrectly pointed to /hub/spawn instead of the user's running server at /hub/user/<username>/. When HOME_DATA is not injected by the Hub template, the "My Server" button now navigates to the correct destination. Made-with: Cursor
The mobile CSS re-showed inline .gpu-selection panels while the sidebar remained visible (just non-sticky), causing GPU selection and Git input to appear twice. The sidebar handles all configuration on both desktop and mobile, so the inline fallback is removed. Made-with: Cursor
JHData.base_url is typed as optional in the shared package. Add nullish coalescing fallbacks for base_url and user to satisfy strict TypeScript checks, and reorder declarations so baseUrl is available when computing the homeData fallback. Made-with: Cursor
Replace dangerouslySetInnerHTML with safe text rendering for the announcement content. HTML announcements are already rendered server-side by the Jinja template; the React News section does not need to support raw HTML injection. Made-with: Cursor
Previously, stop failures (HTTP errors or network errors) were silently logged to console. Now displays a visible red error message in the launch bar so users know the stop action failed. The error clears on the next stop attempt. Made-with: Cursor
Made-with: Cursor
Collaborator
Author
|
@MioYuuIH Please comfirm team-based filtering hides unauthorized resources on Home working properly at internal testing site. |
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the stock JupyterHub home page with a branded Home landing page and redesigns the Spawn page with a unified design system, then applies a series of bug-fixes and hardening on top.
New Home Page (
feat+fixcommits)AVAILABLE_RESOURCESso users only see permitted resourcesdangerouslySetInnerHTMLserver_activeto React state so the bar re-renders after stop/start.containerwidth — no longer relies on external Bootstrap CSSserver_urlfallback — points to/hub/user/<username>/instead of/hub/spawnjhdata.base_urlSpawn Page Redesign
Infrastructure / Config
values.yaml— setsredirect_to_server=falseso users land on Home first; updates announcement/hub/spawn→/hub/homeChanged Files (18 files, +1865 / −1023)
apps/home/{App.tsx, main.tsx, styles.css, vite.config.ts, …}apps/spawn/src/{App.tsx, styles.css}frontend/templates/home.htmldockerfiles/Hub/Dockerfile,frontend/package.json,pnpm-lock.yamlruntime/values.yamlcore/authenticators/auto_login.pyTest Plan
/hub/homeMade with Cursor