Codex/stable surface hardening#9
Conversation
- Add _theme_tokens() for dynamic light/dark theme CSS variables - Fix light theme: softer backgrounds, better contrast, no pure-white panels - Fix dark theme: file uploader, inputs, expanders use dark surfaces - Restructure sidebar header: brand/tagline/license on top, controls row below - Add theme toggle (light/dark) via segmented control in sidebar - Update plot_builder to respect theme tokens for chart colors - Add get_ui_theme() to session_state for theme persistence - Update test_ui_consistency for new sidebar structure
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1226653fb6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| assert 'st.navigation(pages, position="hidden")' in app_entry | ||
| assert '_render_sidebar_page_section(t("nav.primary"), primary_pages, current_path)' in app_entry | ||
| assert 'label_visibility="collapsed"' in app_entry | ||
| assert 'header_meta_col, header_lang_col = st.columns([1.15, 0.95], gap="small")' in app_entry |
There was a problem hiding this comment.
Update stale sidebar-layout assertion
This assertion hard-codes a code pattern that no longer exists in app.py, so test_sidebar_navigation_uses_grouped_scientific_structure fails before it can validate the intended navigation behavior. In CI environments that run this suite, the commit will be blocked by a deterministic false negative rather than a product regression.
Useful? React with 👍 / 👎.
| def _default_layout() -> dict: | ||
| tokens = _plot_tokens() | ||
| return dict( | ||
| template=tokens["template"], |
There was a problem hiding this comment.
Preserve
DEFAULT_LAYOUT compatibility in plot builder
The refactor switched from a module-level DEFAULT_LAYOUT constant to _default_layout() without leaving a compatibility alias, but existing tests still access plot_builder.DEFAULT_LAYOUT (for example in tests/test_plot_builder.py and tests/test_xrd_page.py). This introduces AttributeError in the current repo test surface and breaks downstream callers that rely on the exported symbol.
Useful? React with 👍 / 👎.
Summary
Testing
Review & merge gates
Risk / rollback