feat: Hide cost bar if cost is 0 or unknown in leaderboards table

This commit is contained in:
Paul Gauthier (aider) 2025-04-12 20:45:29 -07:00
parent 3b96d1bd57
commit d26be77010

View file

@ -70,7 +70,9 @@ The model also has to successfully apply all its changes to the source file with
</td>
{% assign cost_percent = row.total_cost | times: 100.0 | divided_by: max_cost %}
<td class="bar-cell">
{% if row.total_cost > 0 %}
<div class="bar-viz" style="width: {{ cost_percent }}%; background-color: rgba(111, 66, 193, 0.3); border-right: 1px solid rgba(111, 66, 193, 0.5);"></div>
{% endif %}
<span>{% if row.total_cost == 0 %}?{% else %}${{ row.total_cost | times: 1.0 | round: 2 }}{% endif %}</span>
</td>
<td style="padding: 8px;"><span><code>{{ row.command }}</code></span></td>