From b2d3de697dda4d2311f4b3a3d3a45df6368397c3 Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Thu, 12 Mar 2026 15:59:15 -0400 Subject: [PATCH 1/5] A start --- src/static/css/common.css | 1 + src/templates/exercise.html | 70 ++++++++++++++----------------------- 2 files changed, 27 insertions(+), 44 deletions(-) diff --git a/src/static/css/common.css b/src/static/css/common.css index 0bb5dd0..7c4e192 100644 --- a/src/static/css/common.css +++ b/src/static/css/common.css @@ -2,6 +2,7 @@ background-color: rgba(0, 0, 0, 0.05); /* Change this color as needed */ } + .trace-option-label { cursor: pointer; } diff --git a/src/templates/exercise.html b/src/templates/exercise.html index b606e81..1202358 100644 --- a/src/templates/exercise.html +++ b/src/templates/exercise.html @@ -35,53 +35,35 @@
{% include 'navbar.html' %} -
{{ exercise_name }}
- {% if syntax_choice %} -

- Syntax: {{ syntax_choice }} -

- {% endif %} -
{% for q in questions %} {%set qindex = loop.index %}
- - - -
-
-
-

- {% if q.description %} - {{ q.description }} - {% endif %} -

-
-
-
-
-

- {% if q.type == "englishtoltl" %} - Which of the following LTL formulae best represents this English sentence? - {% elif q.type == "tracesatisfaction_mc" %} - Which of the following traces satisfies the following LTL formula? - {% elif q.type == "tracesatisfaction_yn" %} - Does this trace satisfy the following LTL formula? - {% else %} -

- {% endif %} -

-
-
- Question {{ qindex }} of {{ questions | length}} - -
+
+
+ + {{ exercise_name }} + {% if syntax_choice %}·{{ syntax_choice }}{% endif %} + + Question {{ qindex }} of {{ questions | length }}
- +

+ {% if q.type == "englishtoltl" %} + Which of the following LTL formulae best represents this English sentence? + {% elif q.type == "tracesatisfaction_mc" %} + Which of the following traces satisfies the following LTL formula? + {% elif q.type == "tracesatisfaction_yn" %} + Does this trace satisfy the following LTL formula? + {% else %} +

+ {% endif %} +

+ {% if q.description %} +

{{ q.description }}

+ {% endif %}
@@ -125,9 +107,9 @@
    {% for option in q.options %} -
  • -
  • +
-
Tickets
- - - - - - - - - - - - - - - - - -
- {% include 'navbar.html' %} - -

Light Panel

- - - - -
- {% for q in questions %} - {%set qindex = loop.index %} -
-
-

Question {{ qindex }} of {{ questions | length}}

-
- {% if q.type == "englishtoltl" %} - Which of the following LTL formulae best represents this English sentence? - {% elif q.type == "tracesatisfaction_mc" %} - Which of the following traces satisfies the following LTL formula? - {% elif q.type == "tracesatisfaction_yn" %} - Does this trace satisfy the following LTL formula? - {% else %} - - {% endif %} -
-
- {% if q.feedback %} - - {% endif %} - - - {% if q.type == "tracesatisfaction_yn" %} -
Formula: -
 {{ q.question}} 
-
- - -
Trace Alt: -
 {{ q.trace}}
-
- {% elif q.type == "tracesatisfaction_mc" %} -
Formula: -
{{ q.question}}
- {% else %} -
{{ q.question}} -
- {% endif %} - -
    - {% for option in q.options %} -
  • - - -
  • - {% endfor %} -
- - - - - - - - -
-
- {% endfor %} -
- - -
- -
- - -
- - - - - - - - \ No newline at end of file diff --git a/src/templates/prebuiltexercises/robotrain.html b/src/templates/prebuiltexercises/robotrain.html deleted file mode 100644 index d135edb..0000000 --- a/src/templates/prebuiltexercises/robotrain.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - LTL Tutor: RoboTrain - - - - - - - - - - - - - - - - - - - - - - - -
- {% include 'navbar.html' %} -
{{ exercise_name }}
- - - - -
- {% for q in questions %} - {%set qindex = loop.index %} -
- - -
-
- {% if q.type == "englishtoltl" %} - Which of the following LTL formulae best represents this English sentence? - {% elif q.type == "tracesatisfaction_mc" %} - Which of the following traces satisfies the following LTL formula? - {% elif q.type == "tracesatisfaction_yn" %} - Does this trace satisfy the following LTL formula? - {% else %} - - {% endif %} -
- Question {{ qindex }} of {{ questions | length}} -
- -
- - - {% if q.feedback %} - - {% endif %} - - - {% if q.type == "tracesatisfaction_yn" %} -
-
 {{ q.question}} 
-
-
- -
Trace Alt: -
 {{ q.trace}}
-
- {% elif q.type == "tracesatisfaction_mc" %} -
-
{{ q.question}}
-
- {% else %} -
{{ q.question}} -
- {% endif %} - -
    - {% for option in q.options %} -
  • - -
  • - {% endfor %} -
- - - - - - - - -
-
- {% endfor %} -
- - -
- -
- - -
- - - - - {% include 'footer.html' %} - - - From 8d9c3021407571a340d6f54f14b083b02074ac91 Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Fri, 13 Mar 2026 10:09:53 -0400 Subject: [PATCH 3/5] A start --- .github/workflows/e2e.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ad421db..b703b4e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -43,14 +43,6 @@ jobs: - name: Run Playwright E2E tests run: BASE_URL=http://localhost:5000 pytest e2e/ -v - - name: Upload test artifacts - if: failure() - uses: actions/upload-artifact@v4 - with: - name: playwright-report - path: playwright-report/ - retention-days: 7 - - name: Stop services if: always() run: docker compose down From 88de7fa83d816a0edd2ec457d380c23fa31ba070 Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Fri, 13 Mar 2026 10:21:53 -0400 Subject: [PATCH 4/5] Changing more --- e2e/test_exercise_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/test_exercise_flow.py b/e2e/test_exercise_flow.py index 2efc8df..6228fe2 100644 --- a/e2e/test_exercise_flow.py +++ b/e2e/test_exercise_flow.py @@ -15,7 +15,7 @@ # Helpers # --------------------------------------------------------------------------- -def _load_prebuilt_exercise(page, base_url, exercise_file="robotrain.json"): +def _load_prebuilt_exercise(page, base_url, exercise_file="equivalent.json"): """Navigate to the predefined exercise page for a prebuilt JSON file.""" page.goto(f"{base_url}/exercise/predefined?sourceuri=preload:{exercise_file}") page.wait_for_selector("#questions") From c9f9b879d6540a5a0847503536a1819d091f98ea Mon Sep 17 00:00:00 2001 From: Siddhartha Prasad Date: Fri, 13 Mar 2026 10:29:00 -0400 Subject: [PATCH 5/5] ? --- e2e/test_exercise_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/test_exercise_flow.py b/e2e/test_exercise_flow.py index 6228fe2..b97224e 100644 --- a/e2e/test_exercise_flow.py +++ b/e2e/test_exercise_flow.py @@ -44,7 +44,7 @@ def _answer_and_advance(page): """Select the first radio option, check the answer, then click Next.""" visible = page.locator(".question:visible") # Remember the current question number so we can detect advance - text = visible.locator("small.text-muted").inner_text() + text = visible.locator(".question-counter").inner_text() m = re.search(r"Question (\d+) of (\d+)", text) current_q = int(m.group(1)) total_q = int(m.group(2)) @@ -66,7 +66,7 @@ def _answer_and_advance(page): f"""(() => {{ const vis = document.querySelector('.question:not([style*="display: none"])'); if (!vis) return false; - const t = vis.querySelector('small.text-muted')?.textContent || ''; + const t = vis.querySelector('.question-counter')?.textContent || ''; const m = t.match(/Question (\\d+) of/); return m && parseInt(m[1]) > {current_q}; }})()""",