[demo] Interview Prep: Practice Q&A auto-triggers LLM on page load, silent st.error in collapsed expander #22
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/peregrine#22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Surfaced by E2E smoke harness (2026-03-17).
The Practice Q&A expander in Interview Prep calls
complete()on every page render when session state is empty. In demo mode this raisesRuntimeError("AI inference is disabled"), renderingst.error("LLM error: …")inside the collapsed expander.Because Streamlit collapsed expanders use
display:none, the error was invisible to users but present in the DOM. The test harness detected thestAlertContentErrorelement but reported empty text (Playwrightinner_text()respects CSS visibility).This was caught after switching the harness from
inner_text()totext_content()(which reads from all elements regardless of CSS visibility).Fix applied
app/pages/6_Interview_Prep.py: checkDEMO_MODEbefore auto-triggering the LLM session. In demo mode, renderst.info("AI features are disabled in the public demo…")instead.tests/e2e/conftest.py: switchedget_page_errors()frominner_text()totext_content()so errors inside collapsed expanders are captured with their actual message.Commit
5d14542— feat(e2e): add smoke + interaction tests; fix two demo mode errorsStatus
Fixed and verified. Smoke test passes clean.