[Bug] Suggest job titles / keywords / exclusions — results not visible until page navigation #18

Closed
opened 2026-03-16 11:58:53 -07:00 by pyr0ball · 0 comments
Owner

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.py around line 783, after storing _kw_suggestions to session state, there is no st.rerun() call:

if _run_kw_suggest:
    with st.spinner("Asking LLM for keyword suggestions…"):
        _kw_sugg = _suggest_resume_keywords(...)
        st.session_state["_kw_suggestions"] = _kw_sugg
    # ← no st.rerun() here

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) and st.rerun() is called. But:

  • There is no banner or indicator telling the user that new options were added to the dropdown
  • If suggested_excludes is empty, the suggestions panel (lines 393-414) renders only a nearly-invisible "✕ Clear suggestions" button — nothing that communicates "X titles added"
  • Users don't know to look in the multiselect dropdown for the new options

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

  • After clicking " Suggest" for keywords, suggestion chips appear immediately without requiring a tab switch
  • After clicking " Suggest" for titles, a visible message confirms how many suggestions were added and where to find them
  • All three suggest flows (titles, exclusions, keywords) give clear immediate feedback
## 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.py` around line 783, after storing `_kw_suggestions` to session state, there is no `st.rerun()` call: ```python if _run_kw_suggest: with st.spinner("Asking LLM for keyword suggestions…"): _kw_sugg = _suggest_resume_keywords(...) st.session_state["_kw_suggestions"] = _kw_sugg # ← no st.rerun() here ``` 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) and `st.rerun()` is called. But: - There is no banner or indicator telling the user that new options were added to the dropdown - If `suggested_excludes` is empty, the suggestions panel (lines 393-414) renders only a nearly-invisible "✕ Clear suggestions" button — nothing that communicates "X titles added" - Users don't know to look in the multiselect dropdown for the new options 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 - After clicking "✨ Suggest" for keywords, suggestion chips appear immediately without requiring a tab switch - After clicking "✨ Suggest" for titles, a visible message confirms how many suggestions were added and where to find them - All three suggest flows (titles, exclusions, keywords) give clear immediate feedback
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#18
No description provided.