(paper)
| 805 | } |
| 806 | |
| 807 | function relevanceSortValue(paper) { |
| 808 | const categoryRank = { |
| 809 | must_read: 5, |
| 810 | high_relevant: 4, |
| 811 | maybe_interested: 3, |
| 812 | edge_relevant: 2, |
| 813 | pending: 1, |
| 814 | }; |
| 815 | const category = String(paper?.category || "").trim().toLowerCase(); |
| 816 | const score = Number(paper?.score); |
| 817 | return (categoryRank[category] || 0) * 1000 + (Number.isFinite(score) ? score : -1); |
| 818 | } |
| 819 | |
| 820 | function sortCurrentPushByRelevance() { |
| 821 | if (!state.push || !Array.isArray(state.push.papers) || !state.push.papers.length) return; |
no outgoing calls
no test coverage detected