Skip to content

fix(optimizer): resolve skill selection race condition and rebrand to BulletCraft - #15

Merged
souravC01 merged 1 commit into
mainfrom
fix/bulletcraft-skill-selection
Sep 12, 2026
Merged

souravC01 merged 1 commit into
mainfrom
fix/bulletcraft-skill-selection

Conversation

@souravC01

Copy link
Copy Markdown
Owner

Summary

Resolves an issue where selecting a skill in the application (from Skills Matrix, ATS Keyword Bank, or Resume Best-Fit Ranker) failed to target the selected skill when generating resume bullet points, often generating bullets for the previously opened skill or defaulting to the first skill in the job posting. In addition, this change ensures candidate resume evidence is reliably supplied for grounding and rebrands the feature from "BulletSkill 2.0" to BulletCraft.


Root Cause & Changes

  1. State Reconciliation Race in Modal (BulletOptimizerModal.jsx):

    • Root Cause: Conflicting dual useEffect hooks caused handleGenerate to execute against closed-over stale state from previous runs before asynchronous state updates took effect.
    • Fix: Replaced dual effects with lazy state initializers and a single mount trigger. Parametrized handleGenerate(e, overrideBullet, targetKeywords, targetSectionType) to accept explicit parameters rather than relying on state closures.
    • Section Toggling: Toggling between "Project Bullet" and "Work History" now immediately triggers generation with the new section type.
  2. Component Lifecycle Isolation (App.jsx):

    • Conditionally mounted {isOptimizerOpen && <BulletOptimizerModal ... />} with a dynamic key incorporating active keywords and section type (optimizer-${userId}-${keywords}-${sectionType}).
    • Added a safe fallback in handleOpenOptimizer to ensure candidate evidence (resumes[0]) is passed if selectedResumeForJob was not previously set.
  3. Job Analyzer Action UX (JobAnalyzer.jsx):

    • Rebranded the header action button to BulletCraft.
    • Updated the button click handler to target all required role qualifications rather than hardcoding required_skills[0].
  4. Branding Updates:

    • Updated modal title to BulletCraft Resume Optimizer.
    • Updated offline mode description copy in SettingsModal.jsx to refer to "BulletCraft templates".

Testing & Validation

  • Vitest (Frontend):
    • Added frontend/src/test/BulletOptimizerFlow.test.jsx covering immediate mount generation, candidate evidence forwarding, section type toggling, and sequential skill selections.
    • Ran npm test -- --run: 13 passed, 36 passed total.
  • Frontend Build:
    • Ran npm run build: built in 5.61s without errors or warnings.
  • Pytest (Backend):
    • Ran python -m pytest tests/: 205 passed in 31.85s.

… BulletCraft

Fix the stale closure race condition in BulletOptimizerModal by eliminating conflicting dual effects and passing explicit target keywords to handleGenerate. Conditionally mount the modal with a dynamic key in App.jsx to ensure a clean state on every skill selection, ensure candidate resume context is supplied on Job Analyzer clicks, and rebrand the feature header and buttons to BulletCraft. Add automated Vitest coverage for sequential skill selection and evidence grounding.
@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
jobhelperguru Ready Ready Preview Sep 12, 2026 5:16pm UTC

@souravC01
souravC01 merged commit 577721f into main Sep 12, 2026
14 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0b72911e Deployed Sep 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant