Show what the model knows on its own screen and let the user set it aside

The Apprendimento screen says in plain words whether the model counts, how
well its probabilities hold, which clues it weighs, how the challenger is
doing and what it has learned. Thresholds, set-aside and the undo of a
promotion live in Impostazioni; anything that shrinks less with real money
asks for the phrase. The new tests also caught a wrong column name that
broke the Panoramica as soon as the first model existed.

refs #66

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 12:44:37 +01:00
1 parent 14e8a872dc
commit f69943f70a
22 files changed
+1680 -27

No files matched your search

@@ -364,19 +364,23 @@
</section>
<section class="plain tile" aria-labelledby="apprendimento-sintesi">
<div class="panel-head"><h2 id="apprendimento-sintesi">Apprendimento</h2><a href="/apprendimento">Dettaglio</a></div>
@if (p.Learning is not { } m)
@{ var m = p.Learning; }
<p><strong>@m.Sentence</strong></p>
@if (m.State == LearningStates.Observation)
{
<p class="note">L'apprendimento non è ancora attivo. Quando lo sarà, il modello osserverà i segnali delle strategie e qui vedrai quanto ci azzecca, prima che possa decidere qualcosa.</p>
}
else
{
<p><strong>Il modello osserva e impara, ma non decide ancora.</strong></p>
<div class="limit">
<div class="limit-line"><span>Segnali già valutati</span><span><strong>@m.Signals</strong> <span class="muted">su @m.Needed necessari</span></span></div>
<span class="usage"><span style="width: @Css(Math.Min(100m, m.Signals * 100m / Math.Max(1, m.Needed)))%"></span></span>
</div>
}
@if (m.State == LearningStates.None)
{
<p class="note">@m.NextLabel: @m.NextCheck.</p>
}
else
{
<dl class="tile-facts">
<dt>Previsioni azzeccate</dt><dd>@m.Precision% su dati mai visti</dd>
<dt>Previsioni azzeccate</dt><dd>@(m.Precision is { } hit ? $"{hit}% su dati mai visti" : "non ancora misurate")</dd>
<dt>Ultimo addestramento</dt><dd>@m.Trained</dd>
<dt>Prossima verifica</dt><dd>@m.NextCheck</dd>
</dl>