Skip to content

Conversation

hlbmtc
Copy link
Contributor

@hlbmtc hlbmtc commented Oct 2, 2025

KeyFactors Votes Migration:

  • Migrates and refactors KeyFactors vote logic into a unified module.
  • Fixes uniqueness constraint so each user can vote once per key factor.
  • Updates serialization and strength-calculation formulas.
  • Cleans up duplicated logic in views and serializers.
  • Adds Driver.certainty field and improved “no votes” logging.
  • Ensures existing votes migrate safely and remain valid.
  • Resolves merge conflicts, type mismatches, and test issues.
  • Adds or updates tests to cover new logic.
  • Maintains backward compatibility with legacy data.
  • Prepares groundwork for further cleanup and UI integration.

Warning

Should not be merged until P1 is ready

closes #3558
part of #3556

* Refactored KeyFactor creation endpoints and created extra services

* Small fix

* Removed extra todo

* Implemented KeyFactor deletion endpoint

* utils/the_math/aggregations.py

* Small fix

* Small fix

* Adjusted keyFactor vote view

* Set default key factor strength to 1

* Backend: return question label object

* Small fix

* Added Driver.certainty
* Refactored KeyFactor creation endpoints and created extra services

* Small fix

* Removed extra todo

* Implemented KeyFactor deletion endpoint

* utils/the_math/aggregations.py

* Small fix

* Small fix

* Basic refactoring of KeyFactors

* Deprecated old A/B testing components

* Small adjustments

* Small fix

* Adjusted keyFactor vote view

* Added Impact Renderer component

* Added Impact Renderer component

* Small fix

* Small fix

* Added Segmented Progress bar to support smooth animations

* Added KeyFactor theme

* Small adjustments

* Set default key factor strength to 1

* Added Direction Impact subquestion/option labels

* Backend: return question label object

* Small fix

* Added Driver.certainty

* Add Key Factor Restyle

* Small fix

* feat: add submit support

* KeyFactor Driver Updates (#3632)

* Driver updates

* Adjusted KeyFactors Appearance:
- Added isCompact mode
- Added Consumer view mode

* Implemented basic KeyFactorsCarousel

* Small fixes

* Small fixes

* Small fix

* Small adjustment

* Small fix

* Voting: optimistic updates

* Small fix

* Small renaming

* Small renaming

* Added KeyFactorsConsumer section

* Added translations

* Adjusted carousels

* Added edges-overflow for consumer carousel

* Adjusted QuestionTimeline rendering for consumer views

* feat: add option select

* Feat/key factors modal adjustments (#3659)

* KeyFactors creation modal adjustments

* Momorize MDXeditor

* Small fix

* KF modal validation

* Small fixes

* Small fix

* - Added KeyFactors Context Provider
- Adjusted key factors scrolling mechanism

* Small fix

* Small fix

* Small fix

* Small fix

* Fixed dark theme likehood button

* Fixed Hydration

* - Fixed certainty label
- Fixed gap

* - Refactored drivers creation services
- Fixed option selection
- Added "All Options" option

* Removed auto-selection of impact direction during KF creation

* Added KeyFactor card units

* Tiny fix

* Fixed modal height

* Fixed carousel gradients

* Made comment editor font size 16px on mobile

* - Added Suggested KF autoscroll
- Adjusted mobile view

---------

Co-authored-by: Nikita <[email protected]>
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.

Key Factors: Migrate & Cleanup votes

3 participants