Skip to content

fix: "Get Recommendation" button does not trigger any action#465

Merged
Nitya-003 merged 3 commits into
Nitya-003:mainfrom
Aditya8369:459
Jun 21, 2026
Merged

fix: "Get Recommendation" button does not trigger any action#465
Nitya-003 merged 3 commits into
Nitya-003:mainfrom
Aditya8369:459

Conversation

@Aditya8369

Copy link
Copy Markdown
Contributor

Here is a summary of the issues resolved:

  1. Hardcoded Secrets in Production Docker Compose (docker-compose.prod.yml)
    Problem: Production deployment file contained hardcoded secret keys (JWT_SECRET, JWT_REFRESH_SECRET, and MULTISIG_HMAC_SECRET), exposing them to the public git repository.
    Fix:
    Replaced the hardcoded hex secrets in

docker-compose.prod.yml
with environment variable references: ${JWT_SECRET}, ${JWT_REFRESH_SECRET}, and ${MULTISIG_HMAC_SECRET}.
Updated

deploy-aws.sh
to automatically check if these environment variables are set before starting the deployment. If not set, it securely generates random hex keys using Node's crypto module (falling back to openssl if Node is not available) and writes them to the deployment .env file automatically.
2. Typo in Verification Routes (backend/routes/verification.js)
Problem: The backend integration test suite was crashing because of a syntax reference error: retryFailedBulkRows is not defined in routes/verification.js.
Fix: Corrected the typo on line 140 in

routes/verification.js
from retryFailedBulkRows to the correctly destructured/imported function retryBulkFailedRows. All backend tests run and pass properly now.
3. "Get Recommendation" Button
Verification:
Written a robust unit test suite at

page.test.tsx
to verify rendering, form binding, state modification, and API call behavior.
The test verified that:
Form submission correctly invokes handleSubmit.
Input values are read correctly and passed to the backend service getCropRecommendation correctly.
UI states (loading spinner text, rendering the recommendation card, alternatives, and error toasts) are correctly updated.
Verified that the vitest test runner successfully compiles and runs all test suites successfully.

closes #459

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

@Aditya8369 is attempting to deploy a commit to the Nitya Gosain's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Nitya-003 Nitya-003 added bug Something isn't working gssoc:approved gssoc'26 approved quality:clean *1.2 for contributor +5 pts for mentor level:advanced 55 pts for contributors 30 pts for mentors type:bug labels Jun 21, 2026
@Nitya-003 Nitya-003 merged commit 77366c5 into Nitya-003:main Jun 21, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gssoc:approved gssoc'26 approved level:advanced 55 pts for contributors 30 pts for mentors quality:clean *1.2 for contributor +5 pts for mentor type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: "Get Recommendation" button does not trigger any action

2 participants