A / app.py

Commit History

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).
34ef029
Running
verified

linxinhua commited on

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).
3c467b4
verified

linxinhua commited on

Fix auto-restart watchdog strptime: log filenames now include _<sessioncode> suffix; parse only the YYYYMMDD_HHMMSS prefix so idle check succeeds.
fd3bf73
verified

linxinhua commited on

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

linxinhua commited on

revise-gate modal: single-line body, no title, button -> Go back to argument
247e731
verified

linxinhua commited on

revise-gate modal: quantified 90%/10% wording; Gate 1 timeout 20min -> 15min
8ad33ca
verified

linxinhua commited on

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

linxinhua commited on

logger.py + app.py: batch-checkpoint refactor (push only on per-turn / submit_initial / recover_session / end_session_confirm).
3d93dc5
verified

linxinhua commited on

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

linxinhua commited on

key-pool rotation: per-session OpenAI key assignment from OPENAI_KEY_01..10 (app.py)
a7d00d8
verified

linxinhua commited on

walkthrough: MSG2/MSG3 use AI assistant; 5 new tutorial images
621918c
verified

linxinhua commited on

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.
6925d99
verified

linxinhua commited on

case + placeholder: 'chatbot' -> 'AI assistant' to match condition framing
95b1b9d
verified

linxinhua commited on

Rename page title to "A" for A/B blinding
c3f5236
verified

linxinhua commited on

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.
ce485c3
verified

linxinhua commited on

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.
7edb5d1
verified

linxinhua commited on

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.
d88b134
verified

linxinhua commited on

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.
793c3d6
verified

linxinhua commited on

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.
a084e70
verified

linxinhua commited on

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.
1c13af7
verified

linxinhua commited on

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.
14696af
verified

linxinhua commited on

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.
8757b4e
verified

linxinhua commited on

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.
40ee03f
verified

linxinhua commited on

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.
2dc3234
verified

linxinhua commited on

3-framework support: dominant detection + slot-based component map
e407acd
verified

linxinhua commited on

Clone from v5-AI-ethic-HOT-socratic to v5-AI-ethic-HOT-socratic-frame
068faf9
verified

linxinhua commited on