Skip to content

fix: resolve syntax issues in recommendation flow#714

Open
nirvani-nj wants to merge 1 commit into
komalharshita:mainfrom
nirvani-nj:fix/script-submit-syntax-error
Open

fix: resolve syntax issues in recommendation flow#714
nirvani-nj wants to merge 1 commit into
komalharshita:mainfrom
nirvani-nj:fix/script-submit-syntax-error

Conversation

@nirvani-nj
Copy link
Copy Markdown
Contributor

Summary [required]

This PR fixes multiple syntax issues in static/script.js that were breaking the recommendation flow on the homepage.

The malformed JavaScript prevented the file from parsing completely, which caused skill chip input, autocomplete suggestions, quick-pick interactions, and recommendation form submission to stop working. The PR cleans up the broken submit handler and fixes the malformed renderResults() logic to restore normal frontend behaviour.

Related Issue [required]

Related to frontend recommendation flow fixes discovered while working on #324

Type of Change [required]

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Data — adds new projects to data/projects.json
  • Documentation — updates docs, README, or code comments only
  • Style — CSS or visual changes only, no logic change
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed [required]

File Change made
static/script.js Fixed malformed submit handler logic, removed duplicated conditional blocks, restored valid syntax structure, and fixed broken renderResults() implementation

How to Test This PR [required]

  1. Clone this branch:

    git checkout fix/script-submit-syntax-error
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the app:

    python app.py
  4. Open:

    http://127.0.0.1:5000
  5. Test the homepage flow:

    • Add skills manually
    • Press Enter to create chips
    • Use quick-pick skill chips
    • Verify autocomplete suggestions appear
    • Submit the recommendation form
  6. Confirm recommendations render successfully without console syntax errors.

Test Results [required]

Frontend recommendation flow tested successfully.

Verified:
- Skill chips can be added and removed
- Autocomplete suggestions work correctly
- Quick-pick skill chips work correctly
- Recommendation form submits successfully
- /api/recommend returns successful response
- Recommendation cards render correctly
- No frontend syntax errors remain in browser console

Screenshots (if UI change)

N/A — no UI changes were introduced.

Self-Review Checklist [required]

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: feat/, fix/, docs/, data/, style/, test/
  • I have run python tests/test_basic.py and all 27 tests pass
  • I have run flake8 . locally and there are no errors
  • I have not introduced any print() or console.log() debug statements
  • Every new function I wrote has a docstring
  • I have not modified files outside the scope of the linked issue
  • If I changed the UI, I tested it at 375px (mobile) and 1280px (desktop)
  • If I added a project to the dataset, it has all required JSON fields

Notes for Reviewer

This PR focuses only on restoring valid frontend functionality after malformed merge conflicts introduced duplicated conditionals and incomplete closures inside static/script.js.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@nirvani-nj is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant