Skip to content

Fix skill parsing for skill names containing commas#265

Open
jwalkorat wants to merge 1 commit into
komalharshita:mainfrom
jwalkorat:fix/skill-json-serialization
Open

Fix skill parsing for skill names containing commas#265
jwalkorat wants to merge 1 commit into
komalharshita:mainfrom
jwalkorat:fix/skill-json-serialization

Conversation

@jwalkorat
Copy link
Copy Markdown

Summary

Fixed a bug where skill names containing commas were parsed incorrectly.

Previously, skills were stored as comma-separated strings. This caused problems when a skill itself contained commas, such as "HTML, CSS".

This PR updates the frontend to send skills using JSON.stringify() and updates the backend parser to safely reconstruct the original skill array using json.loads().

A fallback for the previous comma-separated format was also added to maintain backward compatibility.


Related Issue

Closes #188


Type of Change

  • Bug fix — resolves a broken behaviour

What Was Changed

File Change made
static/script.js Updated skill serialization to use JSON.stringify()
utils/recommender.py Added JSON skill parsing with fallback support for old comma-separated strings

How to Test This PR

  1. Run the app:
    python app.py

  2. Open:
    http://127.0.0.1:5000

  3. Add a skill containing commas

Example:
HTML, CSS

  1. Generate recommendations

  2. Verify that:

  • the skill is preserved correctly
  • recommendations still work normally
  • skills are not incorrectly split

Test Results

Tested manually in browser.


Self-Review Checklist

  • I have read CONTRIBUTING.md and followed the guidelines
  • I used the correct branch naming convention
  • I did not add debug statements
  • I only modified files related to this issue

Notes for Reviewer

This implementation fixes the parsing issue without changing the overall recommendation architecture and keeps support for older comma-separated skill formats.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@jwalkorat 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.

[Bug]: Skill parsing breaks when skill names contain commas

1 participant