<%= select_tag :sort,
From 228e53fae6a734c13fe922c56b1a6887234eb326 Mon Sep 17 00:00:00 2001
From: Dhamari Trice-Hanson <39872667+dhamariT@users.noreply.github.com>
Date: Thu, 25 Jun 2026 12:32:31 -0400
Subject: [PATCH 2/2] Flag Hackpad projects with a pill in the funding queue
rows
Shows a 'Hackpad' pill next to the project title in the funding queue (table
and mobile card) for projects whose current mission is Hackpad. The displayed
rows' hackpad project ids are loaded in one query to avoid an N+1.
---
.../pages/certification/ships/_index.scss | 16 ++++++++++++++++
.../certification/funding_requests_controller.rb | 7 +++++++
.../funding_requests/index.html.erb | 10 +++++++++-
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/app/assets/stylesheets/pages/certification/ships/_index.scss b/app/assets/stylesheets/pages/certification/ships/_index.scss
index 8b892b8ed..f6cf6ef24 100644
--- a/app/assets/stylesheets/pages/certification/ships/_index.scss
+++ b/app/assets/stylesheets/pages/certification/ships/_index.scss
@@ -507,6 +507,22 @@
gap: var(--space-xs);
}
+ // Category tag on a queue row (e.g. Hackpad) — a pill, not a status.
+ &__tag {
+ display: inline-flex;
+ align-items: center;
+ padding: 1px 8px;
+ border-radius: 999px;
+ font-size: 0.72rem;
+ font-weight: 700;
+ white-space: nowrap;
+
+ &--hackpad {
+ background: rgba(235, 183, 255, 0.18);
+ color: var(--color-brand-lilac);
+ }
+ }
+
// Submitter, relative age, and the claim flag all share one meta line under
// the project title — keeps the table to three columns with no dead space.
&__project-meta {
diff --git a/app/controllers/admin/certification/funding_requests_controller.rb b/app/controllers/admin/certification/funding_requests_controller.rb
index f7f1b2c2c..3e781b9a6 100644
--- a/app/controllers/admin/certification/funding_requests_controller.rb
+++ b/app/controllers/admin/certification/funding_requests_controller.rb
@@ -26,6 +26,13 @@ def index
scope.order(created_at: @sort == "newest" ? :desc : :asc),
limit: 25)
+ # Which of the displayed rows are Hackpad projects (one query, so the view
+ # can flag them without an N+1 of Project#current_mission per row).
+ @hackpad_project_ids = hackpad_project_ids
+ .where(project_id: @funding_requests.map(&:project_id))
+ .pluck(:project_id)
+ .to_set
+
@stats = ::Certification::FundingRequest.dashboard_stats
@lb_period = params[:lb].presence_in(%w[daily weekly alltime]) || "daily"
@leaderboards = {
diff --git a/app/views/admin/certification/funding_requests/index.html.erb b/app/views/admin/certification/funding_requests/index.html.erb
index 984ba0dfe..633547afe 100644
--- a/app/views/admin/certification/funding_requests/index.html.erb
+++ b/app/views/admin/certification/funding_requests/index.html.erb
@@ -205,6 +205,9 @@