Skip to content

[pull] main from O2sa:main - #45

Merged
pull[bot] merged 1 commit into
YemenOpenSource:mainfrom
O2sa:main
Sep 15, 2026
Merged

pull[bot] merged 1 commit into
YemenOpenSource:mainfrom
O2sa:main

Conversation

@pull

@pull pull Bot commented Sep 15, 2026

Copy link
Copy Markdown

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 : )

…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
@pull pull Bot locked and limited conversation to collaborators Sep 15, 2026
@pull pull Bot added the ⤵️ pull label Sep 15, 2026
@pull
pull Bot merged commit 7a1591b into YemenOpenSource:main Sep 15, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant