Skip to content

[DISC-003] Add match ranking and compatibility score - #60

Open
chev0004 wants to merge 7 commits into
developfrom
feat/disc-003
Open

[DISC-003] Add match ranking and compatibility score#60
chev0004 wants to merge 7 commits into
developfrom
feat/disc-003

Conversation

@chev0004

@chev0004 chev0004 commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Outline

Summary

Ranks the discovery feed by language compatibility for signed-in viewers and surfaces a concise reason on each profile card explaining why it is a good match.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (discovery):
      • Add a deterministic, tunable compatibility scorer over native/target languages, proficiency, timezone proximity, and shared interests.
      • Add a Best match sort that ranks results for signed-in viewers and becomes their default; logged-out discovery keeps general sorting.
      • Show a concise match reason on each profile card (for example, learning each other's native languages).
    • (discovery feed):
      • Thread the signed-in viewer's stored profile from the server page into the feed.
    • (cleanup):
      • Remove the inert useProfileMatching hook, superseded by the scoring module.
    • (i18n):
      • Add Best match and match-reason strings for en and ja.
    • (storybook):
      • Add stories and play assertions for the match reason variants and best-match ranking.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang] (discovery feed)
Before (Screenshot)
After (Screenshot)

Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Not Doing

  • Goal-based weighting is omitted: per-target learning goals are not persisted (only language and level), so there is no goal data to rank on.

Other (Remarks)


Checklists

  • Code is well-documented (comments, JSDoc, etc.).
  • Existing comments were updated as needed.
  • No out-of-scope changes are included.
  • Write TODO comments where future work is required.
  • Removed unnecessary debug code (e.g., console.log, debugger).
  • Self-reviewed and tested locally.

@chev0004 chev0004 self-assigned this Jun 20, 2026
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