Skip to content

Stabilize recommendation fallback metadata and small runtime/front-end fixes#3

Open
SHREESHANTH99 wants to merge 2 commits intomainfrom
codex/improve-recommendation-system-and-fix-bugs-qeynhx
Open

Stabilize recommendation fallback metadata and small runtime/front-end fixes#3
SHREESHANTH99 wants to merge 2 commits intomainfrom
codex/improve-recommendation-system-and-fix-bugs-qeynhx

Conversation

@SHREESHANTH99
Copy link
Owner

Motivation

  • Make recommendation fallback behavior deterministic and merge-safe by deriving fallback_source from internal metadata instead of brittle human-readable text.
  • Ensure endpoints and socket/user handling remain robust after prior merge edits by normalizing IDs and timeouts across backend and frontend.

Description

  • Refactor backend/src/routes/recommendationRoutes.js to resolve multiple env names into PYTHON_RECOMMEND_API_URL and PYTHON_HEALTH_URL, add REQUEST_TIMEOUT_MS, a static STATIC_FALLBACK_RECOMMENDATIONS list, Jikan/popular fallbacks, and tag fallback items with _fallbackSource while adding extractFallbackSource and sanitizeFallbackItems helpers to derive fallback_source and remove internal fields before responses.
  • Update recommendation endpoints to use verifyToken, compute effectiveUserId, return source/fallback_source consistently, and use the helpers when falling back to static/Jikan data.
  • Apply a set of runtime/frontend fixes including: normalize socket user.id vs _id lookup in backend/server.js and SocketContext.jsx, add alt attribute in Navbar.jsx, fix cube scaling in ThreeScene.jsx, stabilize hooks and request handling in SimilarAnime.jsx, AIRecommendations.jsx, ResetPassword.jsx, AuthContext.jsx (exchange token shape and profile resolution), and switch many local API URLs to the 5001 backend port.
  • Minor adjustments: set build script to GENERATE_SOURCEMAP=false react-scripts build, remove internal metadata from API outputs, and add small eslint-disable comments where necessary to avoid noisy hook warnings.

Testing

  • Ran node --check backend/src/routes/recommendationRoutes.js and it passed syntax validation (success).
  • Ran npm run build (GENERATE_SOURCEMAP=false react-scripts build) and the frontend production build completed successfully (compiled assets produced).

Codex Task

@vercel
Copy link

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
animatch Ready Ready Preview, Comment Feb 23, 2026 0:05am

@changeset-bot
Copy link

changeset-bot bot commented Feb 23, 2026

⚠️ No Changeset found

Latest commit: 7ecd374

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant