You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(app): polished dark mode, per-problem solution viz, no flash
Summary
- Dark mode was rendering most text invisible: Streamlit's theme
config fixes ``textColor`` globally to dark slate, so our dark
background overlay left sidebar nav, widget labels, radio toggle,
and section headings unreadable. The dark CSS branch in
``app/_common.py`` now explicitly recolours every Streamlit test-id
(sidebar ``p``/``li``/``label``, ``[data-testid="stSidebarNav"] a``,
``[data-testid="stRadio"] label *``, markdown containers, captions)
while excluding our intentionally coloured ``.qqa-*`` classes so
the score-card / badge palette still reads correctly.
- The sidebar header "streamlit app" was the Streamlit-auto nav label
derived from the entry filename. Added ``sidebar_brand()`` which
injects a QQA brand block at the top of every page and hides the
auto heading via CSS. Paired with ``paper_link_footer()`` and
``hero_badges()`` so the OpenReview paper, GitHub repo, and live
demo are one click away from anywhere in the app.
- The live Plotly dynamics / population / diversity charts flashed
on every callback update. Added stable ``key=`` arguments
(``qqa_solve_dynamics``, ``qqa_solve_population``,
``qqa_solve_diversity``) so Streamlit updates the existing chart in
place rather than re-mounting the DOM element.
- New ``app/_solution_viz.py`` module dispatches on ``cfg["kind"]`` to
professional per-problem renderers: MIS / MaxClique / VertexCover
(graph with highlighted set), MaxCut (edges coloured by cut),
GraphBisection, Coloring (node colours + conflict edges), TSP (tour
path with visit-order annotations), QAP (assignment matrix),
NQueens (chessboard with queens + conflict detection), Knapsack
(value bars + capacity budget), NumberPartitioning (subset-sum
balance), MaxSAT3 (satisfaction pie), Ising1D / SK / EA (spin strip
or 2-D grid), Perceptron (signed-margin bars), Hopfield (overlap
with stored patterns). Every renderer uses ``plotly_layout()`` so
the theme stays coherent.
- Solve page renders the new solution view inline after a successful
run; Visualize page's Solution tab leads with the new view and
keeps the generic heatmap inside an expander.
- ``tests/test_gui_apptest.py`` gains
``test_solution_viz_smoke_across_problem_kinds`` which drives every
registered renderer end-to-end via AppTest.
Verified locally
- ``uv run ruff check src tests scripts app`` — clean.
- ``uv run ruff format --check src tests scripts app`` — clean.
- ``uv run pytest -q`` — 53 passed, 1 skipped (plotly-fallback path).
0 commit comments