Files
mt5-ai-xauusd-trader/tests/test_palette_ux.py
T
saysgrokGitHubsaysgrokgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
f543d2b6a4 🎨 Palette: Enhance Research Report situational awareness & scannability (#1144)
* feat(research): enhance report UX with scroll progress and metric tooltips

- Added scroll progress indicator to sticky navigation for better situational awareness
- Added descriptive tooltips to institutional metrics (Sharpe, Calmar, CVaR, etc.)
- Implemented subtle hover lift effects for KPI cards to improve interactive affordance
- Recorded UX learnings in .jules/palette.md

Co-authored-by: saysgrok <279469430+saysgrok@users.noreply.github.com>

* feat: enhance research report situational awareness & scannability

- Added scroll progress indicator to sticky navigation
- Added descriptive tooltips to institutional metrics
- Implemented hover lift effects for KPI cards
- Harmonized torch dependency in requirements.txt to fix CI failure
- Updated tests/test_palette_ux.py to verify new UX elements
- Recorded UX learnings in .jules/palette.md

Co-authored-by: saysgrok <279469430+saysgrok@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: saysgrok <279469430+saysgrok@users.noreply.github.com>
2026-05-13 03:36:35 +00:00

41 lines
1.4 KiB
Python

from rich.table import Table
from src.core.health import ComponentStatus, HealthReport, HealthStatus
def test_health_report_table_display():
"""Verify that the health report components can be rendered in a table (UX Check)."""
table = Table()
table.add_column("Component")
table.add_column("Status")
table.add_column("Message")
# Simulate adding rows as done in main.py
report = HealthReport(
status=HealthStatus.HEALTHY,
components={"MT5": ComponentStatus(status=HealthStatus.HEALTHY, message="Connected")},
)
for name, comp in report.components.items():
color = "green" if comp.status == HealthStatus.HEALTHY else "red"
table.add_row(name, f"[{color}]{comp.status.value.upper()}[/]", comp.message)
assert len(table.columns) == 3
assert table.columns[0].header == "Component"
def test_research_report_template_rendering_sanity():
"""Verify that the research report template can be loaded (UX Check)."""
import os
template_path = "src/research/templates/research_report.html.j2"
assert os.path.exists(template_path)
with open(template_path, "r") as f:
content = f.read()
assert "focus-visible" in content
assert "fill-up" in content
# Verify UX enhancements added by Palette
assert "progress-bar-scroll" in content
assert "scrollBar" in content
assert "kpi-card:hover" in content