diff --git a/webapp/app/main.py b/webapp/app/main.py index f43d76e..42bbeb7 100644 --- a/webapp/app/main.py +++ b/webapp/app/main.py @@ -372,7 +372,7 @@ async def questions_partial(request: Request, sid: str): s = state.get(sid) if s is None: return _render("expired.html", request) - return _render("partials/question_list.html", request, s=s) + return _render("partials/question_list.html", request, s=s, status_oob=True) @app.post("/sessions/{sid}/answers", response_class=HTMLResponse) @@ -401,7 +401,7 @@ async def section_partial(request: Request, sid: str, section_id: str): if s is None or sec is None: return HTMLResponse("
Unknown section
") return _render("partials/section_card.html", request, s=s, sec=sec, - examples=flow.REFINE_EXAMPLES) + examples=flow.REFINE_EXAMPLES, oob=True) @app.post("/sessions/{sid}/sections/{section_id}/retry", response_class=HTMLResponse) diff --git a/webapp/app/templates/partials/question_list.html b/webapp/app/templates/partials/question_list.html index 1b5c5d4..4a6162a 100644 --- a/webapp/app/templates/partials/question_list.html +++ b/webapp/app/templates/partials/question_list.html @@ -1,11 +1,15 @@ +{% set status_oob = status_oob|default(oob|default(false)) %} +{% set questions_oob = questions_oob|default(oob|default(false)) %} {% if s.error %} -
+{% if status_oob %}
{% endif %} +

Generation failed: {{ s.error }}

Start over

{% elif s.phase == 'clarify' and s.qas %} +{% if status_oob %}
{% endif %} {# Ready: plain div, no auto-refresh attrs — typed answers must survive #} -
+

Answer what you can — anything you skip falls back to the stated assumption.

{% for qa in s.qas %} @@ -31,7 +35,7 @@
{% else %} {# Waiting: keeps refreshing itself via SSE pokes + 10s polling fallback #} -
diff --git a/webapp/app/templates/partials/section_card.html b/webapp/app/templates/partials/section_card.html index 75e44cb..19cf5cc 100644 --- a/webapp/app/templates/partials/section_card.html +++ b/webapp/app/templates/partials/section_card.html @@ -1,3 +1,9 @@ +{% if oob and not (s.sections | selectattr("status", "in", ["pending", "generating"]) | list) %} +
+
+ {% include "partials/step3_actions.html" %} +
+{% endif %} {% if sec.status in ('pending', 'generating') %} {# Waiting: refreshes itself via SSE pokes + 10s polling fallback #}