Skip to content

Fix direct links to experimental Streamlit pages - #136

Merged
EvenSol merged 1 commit into
mainfrom
fix/experimental-direct-links
Sep 7, 2026
Merged

EvenSol merged 1 commit into
mainfrom
fix/experimental-direct-links

Conversation

@EvenSol

@EvenSol EvenSol commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Direct experimental links currently fail in new sessions because the router omits those pages before Streamlit can select them.

Build the experimental page metadata first and match the initial st.context.url against Streamlit's own page.url_path values before calling st.navigation. Opening /CO2_mechanisticModel or another experimental URL enables the mode and its toggle automatically. Home, stable and unknown URLs retain normal mode. Initialize only once so turning the toggle off is respected on subsequent reruns.

Documentation impact: updated README and front-page instructions to describe direct-link opt-in. Added URL-policy regressions and AppTest coverage across the experimental inventory, including disabling afterward; wired policy tests into the existing CI workflow.

Validation:

  • PYTHONPATH=. python tests/test_experimental_links.py -v: PASS (3 tests, multiple URL cases).
  • python -m py_compile app_navigation.py welcome.py home.py tests/test_app_navigation.py tests/test_experimental_links.py: PASS.
  • Streamlit UI/AppTest execution: VALIDATION PENDING CI. Streamlit is unavailable locally and dependency installation was blocked by the environment. Local policy tests used the exact repository page inventory with temporary page placeholders; no simulation or live deployment validation is claimed.
  • No pre-commit configuration is present in this repository. The existing Process Flowsheet Studio workflow runs the interaction tests.

The change uses the public st.context.url API available in the existing minimum Streamlit 1.46.0 dependency. No simulation code changes.

@EvenSol
EvenSol marked this pull request as ready for review September 7, 2026 15:12
@EvenSol
EvenSol merged commit 15bb354 into main Sep 7, 2026
2 of 3 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-07T15:14:29.179920Z 39292b6 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant