fix: "Get Recommendation" button does not trigger any action#465
Merged
Conversation
|
@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
approved these changes
Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here is a summary of the issues resolved:
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