B / app.py

Commit History

  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). Running

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

    Verified signature
    739d992

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

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

    Verified signature
    f3196ba
  3. revise-gate modal: quantified 90%/10% wording

    Verified signature
    309ec26

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

    Verified signature
    cf2f052
  2. logger.py + app.py: batch-checkpoint refactor (same shape as soc-ca).⁠

    Verified signature
    7a166f7

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

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

    Verified signature
    a022f28

  1. walkthrough: MSG2 new wording (AI assistant generated version + optional chat); 5 new tutorial images from ans-ca/

    Verified signature
    cfca241

  1. INTRO_MESSAGE: bold 'Read it carefully ...' clause; merge optional-chat sentence; close-session paragraph kept separate

    Verified signature
    2814ba1

  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
    bacd4db

  1. B condition: add post-essay general chat. After perfect_answer is shown, msg_input + send_btn become interactive; on_send builds messages from case + initial_argument + perfect_answer (NOT discussion_plan) and calls LLM. Logs each chat turn via SessionLogger.add_turn(manager_verdict=None).

    Verified signature
    760a1f1
  2. Fix broken patch: full app.py from local no_ai with title=B

    Verified signature
    5be0721
  3. INTRO_MESSAGE: B condition reframed for AI-assistant essay + optional chat

    Verified signature
    2a71eae
  4. case + placeholder: B condition reframed as 'AI assistant generates + optional chat'

    Verified signature
    6329f3e

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

    Verified signature
    81fbf0f
  2. STEP 1 framework detection rewritten from keyword-matching to reasoning-mode diagnosis. Previous prompt used indicator keyword lists ('right to X', 'consent', 'privacy' → duty_rights, etc.), which would misclassify drafts that mention a topic but argue through a different framework. New STEP 1 asks the LLM to (a) identify the load-bearing reasoning move, (b) ask 3 diagnostic questions in order (predicted outcomes / principles regardless of outcomes / character of an actor), (c) apply a topic-vs-load decoupling table, (d) verify via 'remove the lens' test. Mixed drafts hard-default to consequence. Regression tested in socratic_frame (8/8 cases including 1 synthetic privacy+consequence, 4 pilot consequence+privacy, 3 pilot duty_rights+privacy). Other downstream sections (essay generation, discussion plan, hooks) unchanged.

    Verified signature
    9fda70f

  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. RECOVERY_HEAD adds modal styling + window.__SOC_RECOVERY helpers; storage key no_ai_session_v1; touch-observer adapted (no chat input — watches chatbot clicks + arg_input edits). on_recover_session rebuilds chatbot as [case_display, user_arg, INTRO_MESSAGE, perfect_answer.text] (mirrors on_submit_initial yield 2) and re-activates the 60s snapshot_timer. SessionLogger.from_dict restores dominant_framework (no_ai's logger lacks argument_submitted_at, so that field is skipped).

    Verified signature
    81f0f87

  1. UI parity with socratic/socratic-frame: (1) hide Gradio Chatbot top chrome via show_label=False + CSS for share/clear/delete/trash; (2) strip the '# Case: ...' H1 from the initial chatbot message via display-only CASE_TEXT_DISPLAY; (3) hide the left yellow feedback-hint column (guide-col visible=False) so chatbot expands left, and drop the bottom-row mirror column to keep action buttons aligned under right-col.

    Verified signature
    2cf117d
  2. UI parity with socratic/socratic-frame: (1) hide Gradio Chatbot top chrome via show_label=False + CSS for share/clear/delete/trash; (2) strip the '# Case: ...' H1 from the initial chatbot message via display-only CASE_TEXT_DISPLAY; (3) hide the left yellow feedback-hint column (guide-col visible=False) so chatbot expands left, and drop the bottom-row mirror column to keep action buttons aligned under right-col.

    Verified signature
    2021c0b
  3. UI parity with socratic/socratic-frame: (1) hide Gradio Chatbot top chrome via show_label=False + CSS for share/clear/delete/trash; (2) strip the '# Case: ...' H1 from the initial chatbot message via display-only CASE_TEXT_DISPLAY; (3) hide the left yellow feedback-hint column (guide-col visible=False) so chatbot expands left, and drop the bottom-row mirror column to keep action buttons aligned under right-col.

    Verified signature
    4f0339d
  4. UI parity with socratic/socratic-frame: (1) hide Gradio Chatbot top chrome via show_label=False + CSS for share/clear/delete/trash; (2) strip the '# Case: ...' H1 from the initial chatbot message via display-only CASE_TEXT_DISPLAY; (3) hide the left yellow feedback-hint column (guide-col visible=False) so chatbot expands left, and drop the bottom-row mirror column to keep action buttons aligned under right-col.

    Verified signature
    d7c1b05

  1. UI parity with socratic/socratic-frame: (1) hide Gradio Chatbot top chrome via show_label=False + CSS for share/clear/delete/trash; (2) strip the '# Case: ...' H1 from the initial chatbot message via display-only CASE_TEXT_DISPLAY; (3) hide the left yellow feedback-hint column (guide-col visible=False) so chatbot expands left, and drop the bottom-row mirror column to keep action buttons aligned under right-col.

    Verified signature
    417dc48

  1. Record walkthrough_started_at client-side, pass to on_submit_initial via js= wrapper at submit

    Verified signature
    02dcc00
  2. Move walkthrough_started_at + start_session to walkthrough END Start click (with JS retry)

    Verified signature
    9387dbd
  3. Record walkthrough_started_at on Start walkthrough click (first click only)

    Verified signature
    278e578
  4. Bump chatbot to 65vh and argument textbox to 55vh

    Verified signature
    fd7055a
  5. Add welcome overlay before walkthrough; make image walkthrough full-screen; rename Done -> Start

    Verified signature
    fa60166

  1. Add tutorial image carousel (entry overlay, Done on last slide)

    Verified signature
    ab02820
  2. Hide Gradio chatbot copy button + add third yellow-panel bullet for leaving reactions unclicked

    Verified signature
    84c8b7d
  3. Stronger HF-widget hide + (no_ai) clipboard lockdown

    Verified signature
    39080d8
  4. Deploy: perfect_answer prompt simplified to consequence-only (always generates plan; duty-rights / responsibility-character branches removed)

    Verified signature
    769b091

  1. Deploy: no_ai control bot — chapters TOC + essay logging

    Verified signature
    f5f3917