repospace / UI-FIX2.md
2Btainment's picture
fix(ui): Einswarm black/gold restyle + dark FOUC guard
5716b2c verified
|
Raw History Blame Contribute Delete
1.59 kB
# RepoSpace UI-FIX2 — blank white + Einswarm restyle
**Date:** 2026-10-02 (Europe/Berlin)
**Space:** https://huggingface.co/spaces/2Btainment/repospace
**App:** https://2btainment-repospace.hf.space
## Blank white — root cause
The Space was **private**. Unauthenticated requests to `https://2btainment-repospace.hf.space/` (and `/assets/*`, `/api/health`) were answered by Hugging Face's own **404 page** (`background-color: white`, "Sorry, we can't find the page"), not by the app. With a token, the same routes returned the React app (200 JS/CSS, correct MIME).
Not the cause this time (re-checked): SPA fallback (`/space/` already fixed in UI-FIX), missing dist in Docker, asset 404s, wrong MIME, or white-on-white CSS. The previous blue UI was dark and mounted when the Space was reachable.
## Fix
1. Set Space visibility **public** (`HfApi.update_repo_settings(..., private=False)`).
2. Inline critical CSS in `frontend/index.html` so `html/body/#root` are `#050505` before the bundle loads (no white FOUC).
3. Einswarm restyle (black + metallic gold/silver, honeycomb hex bg, gold gradient primary buttons, gold-outline secondary, status pills **Aktiv / In Bearbeitung / Geplant / Fehler / Inaktiv**, wide silver→gold headings, bee logo).
## Verify
- Unauthenticated `GET /` → 200 HTML with `#root` and dark inline background.
- `GET /assets/*.js` → `application/javascript`, `GET /assets/*.css` → `text/css`.
- Headless Chrome dump-dom contains landing headline + GitHub URL input.
- Screenshot shows dark gold landing (not white).
- Runtime stage `RUNNING`.