fix(CORE-001D3A): accept decimal boundary inputs

This commit is contained in:
Bu5hm4nn
2026-03-26 13:19:18 +01:00
parent bb557009c7
commit 753e9d3146
6 changed files with 105 additions and 69 deletions

View File

@@ -247,11 +247,15 @@ def settings_page(workspace_id: str) -> None:
if mode == "weight":
gold_value.props("readonly")
gold_ounces.props(remove="readonly")
derived_hint.set_text("Gold weight is the editable basis; start value is derived from weight × entry price.")
derived_hint.set_text(
"Gold weight is the editable basis; start value is derived from weight × entry price."
)
else:
gold_ounces.props("readonly")
gold_value.props(remove="readonly")
derived_hint.set_text("Start value is the editable basis; gold weight is derived from start value ÷ entry price.")
derived_hint.set_text(
"Start value is the editable basis; gold weight is derived from start value ÷ entry price."
)
def render_alert_state() -> None:
try:
@@ -284,14 +288,14 @@ def settings_page(workspace_id: str) -> None:
ui.label(event.message).classes(
"text-sm font-medium text-slate-900 dark:text-slate-100"
)
ui.label(
f"Spot ${event.spot_price:,.2f} · LTV {event.ltv_ratio:.1%}"
).classes("text-xs text-slate-500 dark:text-slate-400")
ui.label(f"Spot ${event.spot_price:,.2f} · LTV {event.ltv_ratio:.1%}").classes(
"text-xs text-slate-500 dark:text-slate-400"
)
ui.label(event.severity.upper()).classes(_alert_badge_classes(event.severity))
else:
with alert_history_column:
ui.label("No alert history yet.").classes("text-sm text-slate-500 dark:text-slate-400")
except ValueError as exc:
except (ValueError, TypeError) as exc:
alert_state_container.clear()
with alert_state_container:
ui.label("INVALID").classes(_alert_badge_classes("critical"))