Treat a typed main kind as no kind so recommendations still fall back to size.

A custom kind no longer empties a job of eligible cards, and other catalog kinds stay ranking hints instead of becoming the main kind.
This commit is contained in:
adilallo committed 2026-11-23 10:40:09 -07:00
1 parent dad8661268
commit f795951443
5 files changed
+116 -16

No files matched your search

+11
View File
@@ -55,6 +55,17 @@ describe("listMethodRecommendations", () => {
expect(findManyMock).not.toHaveBeenCalled();
});
it("still ranks when only size is set and the main kind is missing", async () => {
const result = await listMethodRecommendations({
section: "decisionApproaches",
facets: {
size: ["sixToTwelve"],
},
});
expect(result?.rankedSlugs.length).toBeGreaterThan(0);
expect(findManyMock).not.toHaveBeenCalled();
});
it("uses only the main kind for eligibility", async () => {
const result = await listMethodRecommendations({
section: "decisionApproaches",