Consolidate setup numbers; clearer staleness message
Deploy / lint (push) Successful in 5s
Deploy / test (push) Successful in 33s
Deploy / deploy (push) Successful in 24s

- Overview Top Setups shows the primary target's probability (concrete,
  distance-calibrated) instead of the overlapping confidence number. The
  stale 100% confidences were leftovers from the old model and self-heal
  on rescan; confidence stays in the detail view + gate.
- Each metric now has one home: composite = ranking, target probability =
  actionability, confidence = direction conviction.
- Staleness message states the real basis (% of entry->target distance
  already covered), not the raw % from entry, so narrow setups read
  correctly ("67% of the move is gone").

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 13:43:17 +02:00
parent 316226096b
commit a32f09c8ba
3 changed files with 23 additions and 8 deletions
+7
View File
@@ -6,6 +6,13 @@ export function bestTargetProbability(setup: TradeSetup): number {
return setup.targets?.length ? Math.max(...setup.targets.map((t) => t.probability)) : 0;
}
/** Probability of the starred primary target (the one the headline R:R refers to). */
export function primaryTargetProbability(setup: TradeSetup): number | null {
const primary = setup.targets?.find((t) => t.is_primary);
if (primary) return primary.probability;
return setup.targets?.length ? bestTargetProbability(setup) : null;
}
/**
* Whether a setup clears the activation gate. Mirrors the backend predicate in
* app/services/qualification.py — keep the two in sync.