feat: order home recommendations from survey answers #86

Closed
ManrajS wants to merge 2 commits from feat/home-page-recommendations into main
ManrajS commented 2026-08-08 00:21:29 +00:00 (Migrated from codeberg.org)

home page recommendations were 5 hardcoded ids in BuildingPanelDemo. now it loads the saved
survey answers and ranks buildings with the scoring from #15, falls back to alphabetical if
there's no survey or youre logged out.

also noticed the filters in building options were resetting whenever you navigated away so i
did a quick fix for that too.

closes #55

home page recommendations were 5 hardcoded ids in BuildingPanelDemo. now it loads the saved survey answers and ranks buildings with the scoring from #15, falls back to alphabetical if there's no survey or youre logged out. also noticed the filters in building options were resetting whenever you navigated away so i did a quick fix for that too. closes #55
gostmeaper force-pushed feat/home-page-recommendations from d394c4ecef to 9c4b7d5133
Some checks failed
kennel/build build succeeded
kennel/deploy secret resolution failed for service 'backend': Secret 'GOOGLE_MAPS_API_KEY' is required but not set
CI / check-openapi (pull_request) Successful in 2m34s
CI / check-1 (pull_request) Failing after 2m43s
CI / build (pull_request) Successful in 3m51s
CI / check (pull_request) Failing after 0s
2026-09-13 21:41:36 +00:00
Compare
gostmeaper left a comment

Additionally...

  • this pr needs a rebase
  • fix the oxlint errors
Additionally... - this pr needs a rebase - fix the oxlint errors
emmawong left a comment

Hi, nice work! There is an issue here though:

Gender restrictions are currently treated as a scoring bonus rather than an eligibility rule. scoreBuilding() adds one point for an exact gender-housing match, but it never removes incompatible buildings. So to demonstrate the issue, if a male user selects AC and a single room, they'll receive Scobell(which is women-only) among their recs.

My suggested approach is to have a hard filter included, so that if a person were to choose women only, they would only get women-only buildings, or if a person chose male only, they would get men only buildings(while this does not exist as of now, it is good practice to keep it. In the frontend, we can make changes so that it doesn't show for now, but if a house/dorm ever appears we can reopen this issue and take a look at that).

Best,
Emma

Hi, nice work! There is an issue here though: Gender restrictions are currently treated as a scoring bonus rather than an eligibility rule. scoreBuilding() adds one point for an exact gender-housing match, but it never removes incompatible buildings. So to demonstrate the issue, if a male user selects AC and a single room, they'll receive Scobell(which is women-only) among their recs. My suggested approach is to have a hard filter included, so that if a person were to choose women only, they would only get women-only buildings, or if a person chose male only, they would get men only buildings(while this does not exist as of now, it is good practice to keep it. In the frontend, we can make changes so that it doesn't show for now, but if a house/dorm ever appears we can reopen this issue and take a look at that). Best, Emma
anish force-pushed feat/home-page-recommendations from 9c4b7d5133
Some checks failed
kennel/build build succeeded
kennel/deploy secret resolution failed for service 'backend': Secret 'GOOGLE_MAPS_API_KEY' is required but not set
CI / check-openapi (pull_request) Successful in 2m34s
CI / check-1 (pull_request) Failing after 2m43s
CI / build (pull_request) Successful in 3m51s
CI / check (pull_request) Failing after 0s
to 4072a5963e
Some checks failed
kennel/build build succeeded
PR size / size (pull_request) Successful in 4s
PR title / lint (pull_request) Successful in 0s
kennel/deploy provisioning declared resource 'postgres' failed: psql failed [GRANT CREATE ON DATABASE "kennel_019eaa84_574f_7af2_965e_4f872de9e728_pr_86" TO "kennel_019eaa84_574f_7af2_965e_4f872de9e728_pr_86_owner"]: ERROR: database "kennel_019eaa84_574f_7af2_965e_4f872de9e728_pr_86" does not exist
CI / check-openapi (pull_request) Failing after 35s
CI / check-1 (pull_request) Failing after 35s
CI / build (pull_request) Failing after 39s
CI / check (pull_request) Failing after 0s
2026-09-23 00:18:04 +00:00
Compare
manrajs closed this pull request 2026-09-30 20:25:52 +00:00
Some checks failed
kennel/build build succeeded
PR size / size (pull_request) Successful in 4s
PR title / lint (pull_request) Successful in 0s
kennel/deploy provisioning declared resource 'postgres' failed: psql failed [GRANT CREATE ON DATABASE "kennel_019eaa84_574f_7af2_965e_4f872de9e728_pr_86" TO "kennel_019eaa84_574f_7af2_965e_4f872de9e728_pr_86_owner"]: ERROR: database "kennel_019eaa84_574f_7af2_965e_4f872de9e728_pr_86" does not exist
CI / check-openapi (pull_request) Failing after 35s
CI / check-1 (pull_request) Failing after 35s
CI / build (pull_request) Failing after 39s
CI / check (pull_request) Failing after 0s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/housing!86
No description provided.