Skip to content

Fix Engaging sort to rank by reaction count - #57

Open
soyalejolopez wants to merge 1 commit into
masterfrom
soyalejolopez-fluffy-carnival
Open

Fix Engaging sort to rank by reaction count#57
soyalejolopez wants to merge 1 commit into
masterfrom
soyalejolopez-fluffy-carnival

Conversation

@soyalejolopez

Copy link
Copy Markdown
Owner

Problem

Sorting the catalog by Engaging never surfaced highly-reacted resources. PowerClaw — the only resource with a reaction — stayed near the bottom instead of the top.

Two root causes:

  1. Rate-based sort buried high-traffic resources. "Engaging" used a smoothed upvotes-per-view rate (upvotes + 2) / (views + 40). With 1,632 views, a single reaction produces a microscopic rate, so PowerClaw sank below low-traffic resources that had zero reactions.
  2. Only 👍 counted. build-stats.js counted only THUMBS_UP reactions as upvotes, so any other reaction (❤️ 🚀 🎉 👀 …) was ignored entirely.

Changes

  • index.html — "Engaging" now ranks by raw reaction/upvote count descending, with views as a tiebreaker, then name.
  • tools/catalog-build/build-stats.jsmapDiscussions now sums reactors across all reaction groups, not just THUMBS_UP. The upvotes field name is unchanged (now represents total reactions), so nothing downstream changes.

Notes

resource-stats.json still needs a fresh traffic-stats workflow run to pick up the new reaction totals; after that, reacted resources will sort to the top of Engaging.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

The Engaging sort used a smoothed upvotes-per-view rate, which buried high-traffic resources so a resource with many views and a single reaction never surfaced. Rank by raw reaction/upvote count (views as tiebreaker, then name) so reactions drive the sort as expected.

Also count all GitHub Discussion reaction types (not just THUMBS_UP) when computing upvotes in build-stats.js, so any reaction registers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8ee4765a-3082-46e1-8848-c29193ffd00f
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

🛰️ PR Sweeper report

Risk: 🟢 LOW · Security gate: ✅ passing · Files: 2

🔒 Automated guardrails (authoritative)

Category Location Finding
ℹ️ scope Change(s) outside known content roots: index.html.

🤖 Dual-model AI review (advisory)

Deep-reasoning revieweropenai/o3 · verdict: comment · risk: low

No hard-coded secrets, data exfiltration, or dangerous patterns observed. Changes are logic-only and pose negligible security risk. One quality concern: the new reaction count may include negative reactions unintentionally.

Quality notes:

  • tools/catalog-build/build-stats.js — The new summation counts every reaction group, including potentially negative or neutral ones (e.g., THUMBS_DOWN, CONFUSED). If the intent is to capture only positive signals you may want to filter by content === 'THUMBS_UP' (or a positive-reaction allow-list) before adding.
  • index.html — Sort order for the 'engaging' tab changed from a weighted engagement rate to a simple upvotes→views→name sort. If this is intentional, consider updating any UI/help text that still references the previous “engagement rate” concept.

✅ Suggested next steps

  • Confirm that counting all reaction groups (not just THUMBS_UP) is expected; otherwise filter accordingly.
  • If the sorting philosophy for the 'engaging' view has changed, update accompanying documentation or UI hints so users understand the new behavior.

The automated guardrails are authoritative and gate the security status. The AI review is advisory and never auto-merges. Thanks for contributing to FastTrack! 🛩️

@github-actions github-actions Bot added sweeper:risk-low PR Sweeper: low risk sweeper:scope-review PR Sweeper: scope/sensitive-path review sweeper:ai-reviewed PR Sweeper: dual-model AI review attached labels Jul 22, 2026
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweeper:ai-reviewed PR Sweeper: dual-model AI review attached sweeper:risk-low PR Sweeper: low risk sweeper:scope-review PR Sweeper: scope/sensitive-path review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants