Spaces:
Running
Running
Commit History
-
feat: use parent postMessage for likes instead of API calls
Use the HF-provided postMessage protocol to like spaces from within the iframe. The parent frame (huggingface.co) handles auth via session cookies, bypassing CORS and OAuth token issues entirely. Protocol: parent.postMessage({type: "LIKE_REPO_REQUEST", repo: {type: "space", name: "..."}}) Response: LIKE_REPO_RESPONSE with status (done/already_liked/not_logged_in) or error Also removes write-discussions OAuth scope (no longer needed). Co-authored-by: Cursor <cursoragent@cursor.com>638248e
-
feat: use OAuth Bearer token with write-discussions scope for likes
HF team confirmed the like endpoint accepts OAuth tokens. Switch back to Bearer token auth (instead of credentials:'include') and add the write-discussions scope which should cover like permissions. Co-authored-by: Cursor <cursoragent@cursor.com>a7e92df -
feat: restore interactive like with session cookies
Since the site is served from huggingface.co/reachy-mini (same origin as the API), we can use credentials:'include' to send HF session cookies with like requests. This bypasses the OAuth token limitation on the POST /api/spaces/{id}/like endpoint. Co-authored-by: Cursor <cursoragent@cursor.com>0fe543d -
fix: replace programmatic like with redirect to HF Space page
HuggingFace intentionally blocks programmatic likes via API tokens to prevent spam. Replace the failing POST /api/spaces/{id}/like call with a redirect to the Space page on huggingface.co where users can like natively. Likes are refreshed automatically when the tab regains focus. Also remove the now-unnecessary write-discussions OAuth scope. Co-authored-by: Cursor <cursoragent@cursor.com>9ce28e1 -
fix: pass OAuth clientId from server to frontend for Docker Spaces
Docker Spaces don't auto-inject window.huggingface.variables like static Spaces do. Add /api/oauth-config endpoint that exposes OAUTH_CLIENT_ID and OAUTH_SCOPES from server env vars to the frontend. AuthContext now fetches this config on mount and passes clientId to oauthLoginUrl(). Sign-in UI is hidden when OAuth is not available (e.g. local dev). Co-authored-by: Cursor <cursoragent@cursor.com>45671b3 -
feat: add HF OAuth login and interactive likes on apps page
- Enable hf_oauth in Space config (README.md) - Add @huggingface/hub for OAuth login/redirect flow - Create AuthContext with login, logout, liked spaces fetching, and optimistic like/unlike toggle via HF REST API - Add "Sign in with HF" button in the apps search bar (shows avatar and username when logged in) - Replace static like counts with interactive like buttons on AppCard and InstallModal (filled pink heart when liked, outline when not) - Show tooltip "Sign in to like this app" on hover when not logged in - Graceful degradation: likes remain read-only when not authenticated Co-authored-by: Cursor <cursoragent@cursor.com>279ae3b -
Refactor API to desktop-compatible format
- Add url, source_kind, downloads, runtime fields - Move metadata into extra object structure - Update frontend to use new extra.* accessors - Enables desktop app to use website API directly Co-authored-by: Cursor <cursoragent@cursor.com>4d77ab0
-
Add Express server with 24h cache + differentiate web/python apps
- Add Express server that caches HF API responses for 24 hours - Fetch all reachy_mini tagged apps (not just python apps) - Differentiate web apps (open in new tab) vs python apps (install modal) - Web apps show purple "Web" badge and "Open" button - Dynamic app count on Home page (rounded to nearest 10) - Vite proxy config for local developmente8700c6
-
filter by reachy_mini_python_app and fix links in footer
apirrone0bef7a9
-
Initial commit: Reachy Mini Website
5c85958