Title: feat: mode-agnostic landing + HEAD-adaptive Sign up/Sign in (#435) by melvincarvalho · Pull Request #436 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: feat: mode-agnostic landing + HEAD-adaptive Sign up/Sign in (#435) by melvincarvalho · Pull Request #436 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: feat: mode-agnostic landing + HEAD-adaptive Sign up/Sign in (#435) by melvincarvalho · Pull Request #436 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary Refines the Phase 3 landing page from #433/#434 so it adapts to the server's current state at load time instead of being frozen at seed time. Mode-agnostic copy. Single welcome page used by every mode. Differences land in the buttons, which adapt at load time. HEAD-adaptive Sign up / Sign in. Inline script probes HEAD /idp/register: 200 → reveal both (multi-user + IDP, registration open) 403 → reveal Sign in only (single-user — registration intentionally disabled) 404 / network error → leave both hidden (no IDP) Live server URL filled in client-side from window.location.origin — adapts to whichever host the visitor used (works behind reverse proxies, across localhost / 127.0.0.1 / LAN-IP) without re-rendering. Get started → docs. Primary CTA points at https://jss.live/docs/getting-started/introduction (the canonical first page in the existing Getting Started section — Docusaurus 3 doesn't auto-generate a category index, so /docs/getting-started/ would 404). Tone: professional enough to leave as the public landing on an IDP / multi-user deployment. No emoji headline, sentence case, brief Solid explainer for visitors landing fresh. The seed model itself is unchanged — still skip-if-exists for /index.html, /.acl, /index.html.acl. Operator-written files preserved. The ./-relative .acl seeds from #434 still mean an operator-uploaded /index.html is publicly readable without them having to write WAC by hand. Why Two problems with the previous Phase 3 landing showed up the first time we tried switching modes on a real install: Stale across mode changes. Once --single-user ran first, every later run (any mode) served the same HTML because of skip-if-exists. A subsequent restart in another mode still showed "Mode: single-user" and a non-functional Sign-in button. Sign in 404. "Sign in" linked to /idp, which 404s when IDP isn't enabled. The button always rendered (worked out at write time), so the page kept promising something the server no longer offered after a mode change. Copilot review surfaced two more during this PR's iteration: The .btn class's display: inline-block overrode the UA stylesheet's [hidden] { display: none } (equal specificity, author rule wins because it comes later). Sign up / Sign in would have flashed visible before the HEAD probe finished. Fixed with an explicit [hidden] { display: none !important } rule. The Mode pill and Features pills were still rendered into the seeded HTML at first start. Same skip-if-exists trap — they'd stale on the next mode change. Dropped both from the seed; the CLI banner already lists them at startup. Tests test/server-root.test.js rewritten for the new model. 20 tests: 3 server-root integration: GET / serves seeded HTML, public-read on /index.html, seeded ACLs use ./ relative form (#434 regression). 2 operator-override: existing /index.html preserved + served as-is. 10 renderer assertions: mode-agnostic byte-equality across singleUser flag, no Mode/Features pills baked in, Get started CTA at /docs/getting-started/introduction, hidden Sign-up/Sign-in anchors with the right data-cond attributes, [hidden] { display: none !important } CSS rule present, HEAD probe script presence + status literals, live-URL script, version interpolation + escape, footer GitHub link + customise hint. 5 unit tests for the new decideRevealForRegisterStatus(status) helper covering 200 / 403 / 404 / 500 / undefined. 819/819 tests pass. Test plan npm test — 819/819 passing locally New tests cover the HEAD matrix as a pure helper (status → buttons), the CSS [hidden] override, the absence of stale Mode/Features pills in the seed, and the docs-CTA URL. .acl portability regression from #434 still passing. Out of scope A standalone /idp/login page (NSS-style direct credential form). That's the only way to give "Sign in" a destination when no OIDC client app is in the picture; deferred to its own feature. A friendlier "first-run" walkthrough page in JavaScriptSolidServer/docs. The CTA currently lands on Introduction (a real, useful page); a more guided post-install page is being filed as a separate, independent docs PR. Closes #435. Phase 3 refinement of #427.
Open Graph Description: Summary Refines the Phase 3 landing page from #433/#434 so it adapts to the server's current state at load time instead of being frozen at seed time. Mode-agnostic copy. Single welcome page us...
X Description: Summary Refines the Phase 3 landing page from #433/#434 so it adapts to the server's current state at load time instead of being frozen at seed time. Mode-agnostic copy. Single welcome pag...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/436
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c8761e9f-3b55-4050-9b12-e006f7732555 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8F12:161BA9:14ACB45:1A16BF8:6B039A82 |
| html-safe-nonce | fa786626f8914b8064a178d51b55209d1315c346ddfd748ea9b6e736e8d6343e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjEyOjE2MUJBOToxNEFDQjQ1OjFBMTZCRjg6NkIwMzlBODIiLCJ2aXNpdG9yX2lkIjoiODIzMzkzMzIzNzE5MDM2Nzg3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 476af8844804dbe074bc116023a754c9a613feff571e109031178559ad01eebb |
| hovercard-subject-tag | pull_request:3681137825 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/436/files |
| twitter:image | https://avatars.githubusercontent.com/u/65864?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/65864?s=400&v=4 |
| og:image:alt | Summary Refines the Phase 3 landing page from #433/#434 so it adapts to the server's current state at load time instead of being frozen at seed time. Mode-agnostic copy. Single welcome page us... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width