A / app.py

Commit History

  1. End Session gates: turn off end_session_gate (probe-count/20-min condition no longer blocks); demote revise_check to a one-shot warning (first click below the ~10% revision threshold shows the revision modal and blocks; every later click finalises regardless). Running

    Verified signature
    34ef029

  1. Fix auto-restart watchdog (strptime parsing log filenames with new _<sessioncode> suffix), SyntaxWarning (\s in JS-inside-Python string), and pin python_version to 3.11 (avoids Python 3.14 asyncio cleanup noise with Gradio 6.x).

    Verified signature
    3c467b4
  2. Fix auto-restart watchdog strptime: log filenames now include _<sessioncode> suffix; parse only the YYYYMMDD_HHMMSS prefix so idle check succeeds.

    Verified signature
    fd3bf73

  1. revise-gate modal: reword body to "Please revise at least 10% ... before submitting your final version."

    Verified signature
    2e69ce8
  2. revise-gate modal: single-line body, no title, button -> Go back to argument

    Verified signature
    247e731
  3. revise-gate modal: quantified 90%/10% wording; Gate 1 timeout 20min -> 15min

    Verified signature
    8ad33ca

  1. app.py: simplify gr.Blocks title to single letter (A/B) for consistency with C

    Verified signature
    e10e5a0
  2. logger.py + app.py: batch-checkpoint refactor (push only on per-turn / submit_initial / recover_session / end_session_confirm).⁠

    Verified signature
    3d93dc5

  1. recovery: rename localStorage keys to current condition names + JS namespace __SOC_RECOVERY -> __RECOVERY (clean up no_ai / socratic_frame legacy)

    Verified signature
    b9acdc0
  2. key-pool rotation: per-session OpenAI key assignment from OPENAI_KEY_01..10 (app.py)

    Verified signature
    a7d00d8

  1. walkthrough: MSG2/MSG3 use AI assistant; 5 new tutorial images

    Verified signature
    621918c

  1. Auto-grow chat input: lines=1, max_lines=6; CSS splits chat-input from buttons (textarea grows 42-160px; buttons stay 42px); chat-row aligns flex-end so Send stays at the bottom of the input.

    Verified signature
    6925d99

  1. case + placeholder: 'chatbot' -> 'AI assistant' to match condition framing

    Verified signature
    95b1b9d

  1. Rename page title to "A" for A/B blinding

    Verified signature
    c3f5236
  2. Opening + transition-due rewritten as multi-message output via <<<MSG-BREAK>>> marker. Opening: host hardcodes M1 (greeting + 'I'm here to help you think through your argument, rather than think for you' framing with explicit bolded phrases), LLM generates M2 (verbatim 'We may look at a few aspects of your argument, such as:' + bullet agenda + 'There is no single correct answer here. You can push back or ask me to rephrase anything unclear : )') and M3 (verbatim 'Let's start with one part of your draft. You wrote that [quote].' + first probe question). Transition-due: Block 1 (close-of-topic recap + revision rec + 'on the right' pointer) and Block 2 (transition phrase + new probe + question) now render as two separate chatbot bubbles. stream_turn splits raw LLM output on MSG_BREAK_MARKER after streaming completes; during streaming the marker is hidden behind a paragraph break to keep the participant from seeing the literal token. Other turn types (engaging-default / needs-clarification / plan-complete) unchanged.

    Verified signature
    ce485c3

  1. Session-recovery propagated from socratic: hidden gr.Textbox (#recovery-payload) + Gradio .then(js=...) chains write/clear localStorage; on_submit_initial / on_end_session yield JSON events on their CONFIRM yields (includes ENFORCE_END_SESSION_GATE toast path). RECOVERY_HEAD adds modal styling + window.__SOC_RECOVERY helpers; storage key socratic_frame_session_v1. on_recover_session restricts HF file lookup to this Space's mode_prefix (v5-HOT/socratic_frame/) because the dataset AE-Talk-bot/log-socratic is shared with socratic and a loose match would risk cross-condition recovery. TUTORIAL_HEAD walkthrough guard early-returns when localStorage carries an unfinished session. SessionLogger.from_dict restores dominant_framework + argument_submitted_at.

    Verified signature
    7edb5d1

  1. UI hotfix: restore aha!/ugh. buttons. The previous top-chrome-hide CSS included '.icon-button-wrapper { display: none }', but Gradio uses that same wrapper class for the repurposed Like/Dislike (aha/ugh) buttons in the message footer, so they disappeared along with the share/clear toolbar buttons. Drop the wrapper rule and rely solely on aria-label / title matchers for share/clear/delete/trash.

    Verified signature
    d88b134
  2. UI hotfix: restore aha!/ugh. buttons. The previous top-chrome-hide CSS included '.icon-button-wrapper { display: none }', but Gradio uses that same wrapper class for the repurposed Like/Dislike (aha/ugh) buttons in the message footer, so they disappeared along with the share/clear toolbar buttons. Drop the wrapper rule and rely solely on aria-label / title matchers for share/clear/delete/trash.

    Verified signature
    793c3d6
  3. UI hotfix: restore aha!/ugh. buttons. The previous top-chrome-hide CSS included '.icon-button-wrapper { display: none }', but Gradio uses that same wrapper class for the repurposed Like/Dislike (aha/ugh) buttons in the message footer, so they disappeared along with the share/clear toolbar buttons. Drop the wrapper rule and rely solely on aria-label / title matchers for share/clear/delete/trash.

    Verified signature
    a084e70
  4. UI hotfix: restore aha!/ugh. buttons. The previous top-chrome-hide CSS included '.icon-button-wrapper { display: none }', but Gradio uses that same wrapper class for the repurposed Like/Dislike (aha/ugh) buttons in the message footer, so they disappeared along with the share/clear toolbar buttons. Drop the wrapper rule and rely solely on aria-label / title matchers for share/clear/delete/trash.

    Verified signature
    1c13af7

  1. UI hotfix: restore aha!/ugh. buttons. The previous top-chrome-hide CSS included '.icon-button-wrapper { display: none }', but Gradio uses that same wrapper class for the repurposed Like/Dislike (aha/ugh) buttons in the message footer, so they disappeared along with the share/clear toolbar buttons. Drop the wrapper rule and rely solely on aria-label / title matchers for share/clear/delete/trash.

    Verified signature
    14696af
  2. UI: drop the bottom-row mirror column. Since the top-row guide-col is visible=False (Gradio collapses it and the chatbot panel expands left), the bottom row's empty scale=1 mirror column was no longer mirroring anything — it reserved blank space on the left and pushed the chat input + Send button out of alignment with the chatbot panel above. Removing it puts chat-row (scale=3) directly under the chatbot, and bottom-action-col (scale=2) directly under the argument textbox.

    Verified signature
    8757b4e
  3. UI: hide Gradio Chatbot top chrome and the case H1 title (parity with socratic). show_label=False on gr.Chatbot + CSS to suppress the residual label badge and share/clear/delete/trash icons that Gradio 6.11 still renders. Strips the leading '# Case: ...' H1 from the initial chatbot message via display-only CASE_TEXT_DISPLAY; full CASE_TEXT (with title) still passed to the LLM in stream_turn.

    Verified signature
    40ee03f
  4. Deploy v8.3: add Look-back check to question_set generation. Manager must scan INITIAL_ARGUMENT + RECENT_TURNS + CURRENT_MSG before outputting any fresh question_set (opening or transition-due) and adjust the entry angle of candidate questions that would draw an 'as I said' pushback (redundancy) or 'I already rejected that premise' pushback. Probe target stays fixed; only entry angle moves. Two worked examples added (expected_consequences pivot, evaluation rejected-premise reformulation). Common mistakes updated.

    Verified signature
    2dc3234
  5. 3-framework support: dominant detection + slot-based component map

    Verified signature
    e407acd
  6. Clone from v5-AI-ethic-HOT-socratic to v5-AI-ethic-HOT-socratic-frame

    Verified signature
    068faf9