Skip to content

Redesign beta: opt-in home page (Direction A)#77

Closed
Arie wants to merge 22 commits into
masterfrom
redesign-beta-home
Closed

Redesign beta: opt-in home page (Direction A)#77
Arie wants to merge 22 commits into
masterfrom
redesign-beta-home

Conversation

@Arie

@Arie Arie commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Implements the Direction A ("Command") redesign of the Home page behind an opt-in /beta cookie. The live site is unchanged for anyone who doesn't opt in.

How it works

  • Opt-in gating — visit /beta, click "Try the new look" → sets a ui_v2 cookie. A BetaUi concern reads it and, only for actions on a small REDESIGNED_ACTIONS allow-list (pages#welcome for now), switches request.variant = :v2 and the application_v2 layout. Every other page (and every non-opted-in user) renders exactly as today — the default render path is untouched.
  • Scoped Tailwind v4 — built by tailwindcss-ruby (no Node) from config/tailwind/v2.tailwind.css to public/builds/v2.css, served as a static file (see "Asset pipeline notes"). Linked only in the v2 layout, so Tailwind's Preflight reset never touches Bootstrap pages.
  • Self-hosted fonts — Archivo + JetBrains Mono (woff2 in public/fonts/v2/), no Google Fonts CSP/privacy dependency.
  • Redesigned Home (pages#welcome) — hero + the three existing primary actions (Get server / 1-click / Cloud), live availability gauge (reuses ServerForUserFinder + docker host helpers), striped animated donation bar (Order.monthly_*), and the two reservation tables (@users_games / @users_reservations). All on existing data; flags reuse the existing sprite system.
  • Action-cache fixpages#welcome's caches_action key now varies by ui_v2 (extracted to a tested welcome_cache_path), so logged-out beta and non-beta visitors never share cached HTML.

Asset pipeline notes (caught during verification)

  • The Tailwind source lives in config/tailwind/, not app/assets/, because the app's *.css precompile glob + sassc-rails would otherwise try to compile @import "tailwindcss".
  • The built v2.css is served statically from public/ (via skip_pipeline + an mtime cache-bust) rather than through Sprockets, because Tailwind v4 output (escaped selectors, @layer, modern CSS) is not parseable by this app's deprecated libsass/SassC. This bypass is the robust fix and keeps the bundle out of the asset pipeline entirely.

Testing

  • New request/controller specs for the gating concern, the /beta toggle, the variant routing, and the cache-key guard (which fails if the vary-by-cookie fix is reverted).
  • Full script/test -a green (RuboCop, Brakeman, RSpec, Cucumber, importmap, Tapioca/Sorbet, Swagger).
  • Verified in a running app: /beta opt-in flow, v2 Home renders, classic site unchanged without the cookie, and non-allow-listed pages (e.g. /faq) stay classic even with the cookie.

Rollout

Deploy is a no-op for users until they visit /beta. assets:precompile builds v2.css automatically. Next iterations (Book a server, Reservation detail) plug into the same mechanism.

Design spec: docs/superpowers/specs/2026-06-15-redesign-beta-design.md · Plan: docs/superpowers/plans/2026-06-15-redesign-beta-home.md

🤖 Generated with Claude Code

Arie added 22 commits June 15, 2026 17:07
Tailwind v4 output (escaped selectors, @layer, modern CSS) is not parseable by
this app's sassc-rails pipeline, which broke render_views specs and would break
assets:precompile. Move the Tailwind source out of app/assets (to config/tailwind/)
and emit the bundle to public/builds/v2.css, linked via skip_pipeline with an
mtime cache-bust. No longer a Sprockets asset.
The shared _actions and _zip_file_link partials are Bootstrap/FontAwesome styled
and render unstyled inside the Bootstrap-free v2 layout. Add +v2 variants (auto-
resolved under the :v2 request variant) using a v2-action utility, preserving all
conditional action logic without FA icons.
@Arie Arie closed this Jun 15, 2026
@Arie Arie deleted the redesign-beta-home branch June 15, 2026 22:41
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