Repository navigation
fix(optimizer): resolve skill selection race condition and rebrand to BulletCraft - #15
Merged
Merged
Conversation
… 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
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
State Reconciliation Race in Modal (
BulletOptimizerModal.jsx):useEffecthooks causedhandleGenerateto execute against closed-over stale state from previous runs before asynchronous state updates took effect.handleGenerate(e, overrideBullet, targetKeywords, targetSectionType)to accept explicit parameters rather than relying on state closures.Component Lifecycle Isolation (
App.jsx):{isOptimizerOpen && <BulletOptimizerModal ... />}with a dynamic key incorporating active keywords and section type (optimizer-${userId}-${keywords}-${sectionType}).handleOpenOptimizerto ensure candidate evidence (resumes[0]) is passed ifselectedResumeForJobwas not previously set.Job Analyzer Action UX (
JobAnalyzer.jsx):required_skills[0].Branding Updates:
SettingsModal.jsxto refer to "BulletCraft templates".Testing & Validation
frontend/src/test/BulletOptimizerFlow.test.jsxcovering immediate mount generation, candidate evidence forwarding, section type toggling, and sequential skill selections.npm test -- --run: 13 passed, 36 passed total.npm run build: built in 5.61s without errors or warnings.python -m pytest tests/: 205 passed in 31.85s.