[pull] main from O2sa:main - #45
Merged
Merged
Conversation
…Streamline Comparison State (#215) - Core Domain Pipeline: - Introduce `persistUserScores` in `user-persistence.ts` as the canonical persistence pipeline - Eliminate duplicate DB upsert and Redis invalidation logic across `user-service`, `compare-service`, and `calculate-leaderboard` - Remove cross-boundary dynamic imports of `db` and `score-engine` from `github-client` - Scoring Engine Modularization: - Decompose monolithic 1,230-line `score-engine.ts` into focused sub-calculators (`repo-scoring`, `pr-scoring`, `community-scoring`, `scoring-constants`, `scoring-helpers`) - Preserve 100% backward compatibility and exact mathematical output - API & Routes: - Unify API error handling and search parameter parsing into `src/lib/api` - Reduce route handler boilerplate by ~70% across `/api/user/[username]` and `/api/compare` - Remove `initializeSchema()` DDL overhead from hot read path in `leaderboard-service` - Add strong generic typing to `db-store` rows and upsert params - Frontend State & Polish: - Extract comparison orchestration into `useComparisonController` hook, slimming `home-page-client.tsx` from 545 to 125 lines - Introduce reusable `useClipboardCopy` hook with timeout cleanup in profile and comparison dashboards - Fix template placeholder replacement in `provider-hook.ts` - Deduplicate SSR profile fetches between `generateMetadata` and `UserProfilePage` using `React.cache()` * fix(persistence): prevent user updates from invalidating country leaderboard cache
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )