feat(website): per-stat leaderboard rankings, simplified AI asset report

Leaderboard: each tab now shows only the stat it ranks by (#, Channeler,
stat value) so rank #1 on Rank Score is visually distinct from rank #1
on Games Played, etc. Removed the multi-column highlight approach.

AI Asset Report: replaced Object Key + Prefix columns with a friendly
Name (filename extracted from the object key) and mapped ContentType to
a human-readable Type label (Image / Audio / Video / Model).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-04-28 12:47:44 -04:00
co-authored by Claude Happy
parent a9b62d8149
commit daeceb4633
2 changed files with 44 additions and 17 deletions
@@ -3,6 +3,25 @@
@{
ViewData["Title"] = "AI Asset Report";
ViewData["MetaDescription"] = "Full searchable report of AI-assisted assets in Aeternalis.";
string AssetType(string? contentType)
{
if (string.IsNullOrWhiteSpace(contentType)) return "—";
if (contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase)) return "Image";
if (contentType.StartsWith("audio/", StringComparison.OrdinalIgnoreCase)) return "Audio";
if (contentType.StartsWith("video/", StringComparison.OrdinalIgnoreCase)) return "Video";
if (contentType.StartsWith("model/", StringComparison.OrdinalIgnoreCase)) return "Model";
// Common model/binary file types uploaded via the CDN
if (contentType.Equals("application/octet-stream", StringComparison.OrdinalIgnoreCase)) return "Model";
return "—";
}
string AssetName(string objectKey)
{
if (string.IsNullOrWhiteSpace(objectKey)) return "—";
var slash = objectKey.LastIndexOf('/');
return slash >= 0 ? objectKey[(slash + 1)..] : objectKey;
}
}
<div class="page-header">
@@ -21,7 +40,7 @@
id="search"
name="search"
value="@Model.Search"
placeholder="Object key or prefix"
placeholder="Name or prefix"
class="form-control"
maxlength="200">
<button type="submit" class="btn btn-primary">Search</button>
@@ -44,8 +63,7 @@
<table class="data-table" aria-label="AI asset report">
<thead>
<tr>
<th scope="col">Object Key</th>
<th scope="col">Prefix</th>
<th scope="col">Name</th>
<th scope="col">Type</th>
<th scope="col">Uploaded</th>
</tr>
@@ -54,10 +72,8 @@
@foreach (var record in Model.Records)
{
<tr>
@* All values auto-encoded by Razor — no XSS *@
<td class="mono">@record.ObjectKey</td>
<td>@record.Prefix</td>
<td>@(record.ContentType ?? "—")</td>
<td>@AssetName(record.ObjectKey)</td>
<td>@AssetType(record.ContentType)</td>
<td>@record.UploadedAt.ToString("yyyy-MM-dd")</td>
</tr>
}
+21 -10
View File
@@ -5,7 +5,16 @@
ViewData["MetaDescription"] = "Top Channelers in Origin: Stone of Revival — ranked by score, games played, wins, and win rate.";
string Tab(string name) => Model.ActiveTab == name ? "lb-tab lb-tab-active" : "lb-tab";
string Col(string tab) => Model.ActiveTab == tab ? "stat-cell stat-cell-active" : "stat-cell";
string colHeader = Model.ActiveTab switch
{
"played" => "Games Played",
"won" => "Games Won",
"rate" => "Win Rate",
_ => "Rank Score",
};
string colNote = Model.ActiveTab == "rate" ? " (min 10 games)" : "";
}
<div class="page-header">
@@ -42,15 +51,12 @@
}
else
{
<table class="leaderboard-table" aria-label="Player rankings">
<table class="leaderboard-table" aria-label="Player rankings — @colHeader">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Channeler</th>
<th scope="col" class="@Col("rank")">Rank Score</th>
<th scope="col" class="@Col("played")">Played</th>
<th scope="col" class="@Col("won")">Won</th>
<th scope="col" class="@Col("rate")">Win Rate</th>
<th scope="col">@colHeader@(colNote)</th>
</tr>
</thead>
<tbody>
@@ -61,6 +67,14 @@
var isSelf = Model.CurrentUserDisplayName is not null
&& entry.DisplayName == Model.CurrentUserDisplayName;
string statValue = Model.ActiveTab switch
{
"played" => entry.GamesPlayed.ToString(),
"won" => entry.GamesWon.ToString(),
"rate" => entry.WinRateDisplay,
_ => entry.RankScore.ToString(),
};
<tr class="@(isSelf ? "leaderboard-self" : "") @(rank <= 3 ? $"rank-top rank-{rank}" : "")">
<td class="rank-cell">
@if (rank <= 3)
@@ -73,10 +87,7 @@
@entry.DisplayName
@if (isSelf) { <span class="self-tag" aria-label="You">(you)</span> }
</td>
<td class="@Col("rank")">@entry.RankScore</td>
<td class="@Col("played")">@entry.GamesPlayed</td>
<td class="@Col("won")">@entry.GamesWon</td>
<td class="@Col("rate")">@entry.WinRateDisplay</td>
<td class="stat-cell stat-cell-active">@statValue</td>
</tr>
}
</tbody>