diff --git a/imagent-ui/app/components/LeaderboardBoard.tsx b/imagent-ui/app/components/LeaderboardBoard.tsx index e696844..e5e3e07 100644 --- a/imagent-ui/app/components/LeaderboardBoard.tsx +++ b/imagent-ui/app/components/LeaderboardBoard.tsx @@ -298,6 +298,14 @@ function HistoryPanel({ query: string; totalEntries: number; }) { + const trimmedQuery = query.trim(); + const filtersActive = filter !== "all" || trimmedQuery.length > 0; + const activeFilterLabel = historyFilters.find((item) => item.id === filter)?.label ?? "All"; + const clearFilters = () => { + onFilterChange("all"); + onQueryChange(""); + }; + return (
@@ -310,6 +318,16 @@ function HistoryPanel({ onChange={(event) => onQueryChange(event.target.value)} placeholder="Search PR, agent, contributor" /> + {trimmedQuery ? ( + + ) : null}
@@ -325,8 +343,26 @@ function HistoryPanel({ {item.label} ))} + {filtersActive ? ( + + ) : null} + {filtersActive ? ( +

+ {totalEntries === 0 + ? `No matches for ${activeFilterLabel}${trimmedQuery ? ` · “${trimmedQuery}”` : ""}` + : `${totalEntries} match${totalEntries === 1 ? "" : "es"} · ${activeFilterLabel}${trimmedQuery ? ` · “${trimmedQuery}”` : ""}`} +

+ ) : null} +
{entries.length ? entries.map((entry) => ( - No Resolved PRs -

No merged or closed pull requests match this view.

+ {filtersActive ? "No Matching PRs" : "No Resolved PRs"} +

+ {filtersActive + ? "Nothing in the archive matches this filter or search. Clear the controls to see the full history." + : "No merged or closed pull requests match this view."} +

+ {filtersActive ? ( + + ) : null}
)} diff --git a/imagent-ui/app/styles.css b/imagent-ui/app/styles.css index ccb8756..f12e9ad 100644 --- a/imagent-ui/app/styles.css +++ b/imagent-ui/app/styles.css @@ -11856,6 +11856,29 @@ body .leaderboard-history-search input::placeholder { font-family: var(--font-jetbrains), "JetBrains Mono", ui-monospace, monospace; } +body .leaderboard-history-search-clear { + align-items: center; + background: rgba(0, 226, 251, 0.08); + border: 1px solid rgba(99, 222, 255, 0.18); + border-radius: 999px; + color: var(--leaderboard-cyan); + cursor: pointer; + display: inline-flex; + flex: 0 0 auto; + height: 22px; + justify-content: center; + margin-left: auto; + padding: 0; + width: 22px; +} + +body .leaderboard-history-search-clear:hover, +body .leaderboard-history-search-clear:focus-visible { + background: rgba(0, 226, 251, 0.16); + border-color: rgba(0, 226, 251, 0.42); + outline: none; +} + body .leaderboard-history-filters { align-items: center; border-bottom: 1px solid rgba(99, 222, 255, 0.1); @@ -11888,6 +11911,30 @@ body .leaderboard-history-filters button.active { outline: none; } +body .leaderboard-history-clear { + background: rgba(255, 120, 120, 0.08) !important; + border-color: rgba(255, 140, 140, 0.28) !important; + color: #ffb4b4 !important; + margin-left: auto; +} + +body .leaderboard-history-clear:hover, +body .leaderboard-history-clear:focus-visible { + background: rgba(255, 120, 120, 0.16) !important; + border-color: rgba(255, 140, 140, 0.48) !important; + color: #ffd0d0 !important; +} + +body .leaderboard-history-summary { + color: var(--leaderboard-muted); + font-family: var(--font-jetbrains), "JetBrains Mono", ui-monospace, monospace; + font-size: 10px; + font-weight: 700; + letter-spacing: 0.02em; + margin: 0; + padding: 8px 16px 0; +} + body .leaderboard-history-list { display: grid; min-height: 258px; @@ -12087,6 +12134,27 @@ body .leaderboard-history-empty strong { body .leaderboard-history-empty p { font-size: 12px; margin: 6px 0 0; + max-width: 34ch; +} + +body .leaderboard-history-empty-action { + background: rgba(0, 226, 251, 0.1); + border: 1px solid rgba(0, 226, 251, 0.34); + border-radius: 999px; + color: #ffffff; + cursor: pointer; + font-family: var(--font-jetbrains), "JetBrains Mono", ui-monospace, monospace; + font-size: 10px; + font-weight: 850; + margin-top: 14px; + min-height: 32px; + padding: 0 14px; +} + +body .leaderboard-history-empty-action:hover, +body .leaderboard-history-empty-action:focus-visible { + background: rgba(0, 226, 251, 0.18); + outline: none; } body .leaderboard-history-pagination {