Conversation
- Calculator: derive from/to states from bundled FISH_DATA_V3 keys so it works offline and when /api/fish-data fails; only replace bundled data with a usable API response. Reject yields outside (0, 100] instead of silently treating 0 as 100%, and clear stale results on input edits. - Publish/unpublish: use getAuthHeaders from useAuth (user had no such method, so requests went out unauthenticated and failed silently); show an error in the preview modal on permanent failure. - Contributor profile: call /api/contributor (the /me path only exists in Express) and accept Postgres booleans for show_on_page. - Import: keep numeric XLSX cells so a "42%" cell imports as 42, not 0.42; CSV "0.5" stays 0.5% in both backends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PnPh61Aps5neY87hh1pu9T
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22dbe218fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PnPh61Aps5neY87hh1pu9T
Fixes the four functional P0 bugs from the September 2026 platform review (#112).
Changes
Calculator works without
/api/fish-data. None of the 655 bundledFISH_DATA_V3conversions carriedfrom/tofields, so the "From" dropdown was empty whenever the API failed: offline, in local dev, or on a fresh deploy. The newapp/src/lib/fishDataShape.jsderives them from the"From → To"keys. An API response replaces the bundled data only if it contains usable conversions.Publish/unpublish sent no auth header.
DataContextcalleduser?.getAuthHeaders?.(), a method the user object doesn't have. Requests got a 401 and the modal closed silently. It now usesgetAuthHeadersfromuseAuth(). On a permanent failure the preview modal stays open and shows an error.Contributor profile loaded blank in production.
/api/contributor/meexists only in Express, so it now calls/api/contributor.show_on_pagealso accepts Postgres booleans, not just SQLite1.Excel "42%" imported as 0.42%.
rowsFromWorksheetstringified every cell, so the XLSX fraction check never ran. XLSX numeric cells are now kept as numbers, while CSV values stay strings, so"0.5"means 0.5%. The localserver/importRows.jsnow behaves the same; it used to scale CSV"0.5"to 50%.Once this is deployed, production
user_datarows with a yield ≤ 1 may need a manual look. They could be past imports that hit this bug.Testing
fishDataShape.test.js: every bundled conversion gets from/to, Pink Salmon offers Round → Skinless Fillet at 42% (range 41–46), and yield validation works.0%-formatted 0.42 cell, and a CSV. The XLSX test fails onmain(it gets 0.42) and passes here.npm run lint: 0 errors, with 2 pre-existing warnings.npm test: 2205 pass.npm run build: passes./api/**request blocked: Pink Salmon lists its starting forms, a price is computed, and Calculate is disabled at a yield of 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01PnPh61Aps5neY87hh1pu9T
Generated by Claude Code