[Bug] Suggest job titles / keywords / exclusions — results not visible until page navigation #18
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/peregrine#18
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?
Problem
Clicking "✨ Suggest" for job titles, keywords, or exclusions sends the request to the LLM and stores results in
st.session_state, but the results are not visibly importable on the first render. Navigating away and back (switching tabs) sometimes causes them to appear.Two root causes:
Bug 1 — Keyword suggestions: missing
st.rerun()In
app/pages/2_Settings.pyaround line 783, after storing_kw_suggestionsto session state, there is nost.rerun()call:Without a rerun, the Streamlit render is stale — the chip panel below the multiselects does not refresh until something else triggers a rerun (e.g. switching tabs). Fix: add
st.rerun()after the spinner block, consistent with how the search-terms suggest flow works.Bug 2 — Title suggestions: silent update with no visual confirmation
Around line 383-391, suggested titles are appended to
_sp_title_options(making them available in the multiselect dropdown) andst.rerun()is called. But:suggested_excludesis empty, the suggestions panel (lines 393-414) renders only a nearly-invisible "✕ Clear suggestions" button — nothing that communicates "X titles added"Fix: after a successful suggest, show a visible info banner such as
st.info(f"{len(new_titles)} title suggestions added to the dropdown — select the ones you want.")before the multiselect, and ensure it persists until cleared.Acceptance criteria