From 1d1087fa7fe727a4c749d66794ee51a7205622b5 Mon Sep 17 00:00:00 2001 From: tegwick Date: Tue, 29 Sep 2026 18:05:34 +0200 Subject: [PATCH] Show the finished comment as a comment Co-Authored-By: Claude Sonnet 5.5 Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 295952@bnt-lap001 Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477 --- rtut/ui_v2.py | 4 ++-- tests/test_ui_locked.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rtut/ui_v2.py b/rtut/ui_v2.py index 5e3a2e6..66d9fd7 100644 --- a/rtut/ui_v2.py +++ b/rtut/ui_v2.py @@ -602,8 +602,8 @@ def _overview_view(c: Ctx, ov: dict) -> str: def _close(c: Ctx) -> str: run = c.run if c.finished: - note = f" - {e(run.data['outcome_note'])}" if run.data.get("outcome_note") else "" - return (f"

Run finished: {e(run.data['outcome'])}

{note}

{c.app.locked_note(run)}" + note = f"

Comment: {e(run.data['outcome_note'])}

" if run.data.get("outcome_note") else "" + return (f"

Run finished: {e(run.data['outcome'])}

{note}{c.app.locked_note(run)}" "

The outcome is part of this runbook's score and maturity evidence at this revision.

") fl = c.fl steps = [run.data["steps"][s]["state"] for s in fl.steps] diff --git a/tests/test_ui_locked.py b/tests/test_ui_locked.py index a00acbb..e2b7a25 100644 --- a/tests/test_ui_locked.py +++ b/tests/test_ui_locked.py @@ -140,6 +140,13 @@ def test_a_closed_run_says_it_is_locked_and_refuses_every_change(srv, pack): assert run_of(srv, base).data["outcome"] == "abandoned" +def test_the_finished_comment_is_shown_as_a_comment_not_as_a_stray_dash(srv): + base, _ = start(srv, "rtut.showcase-lighthouse-v2") + post(srv, f"{base}/finalize", outcome="abandoned", note="gave up on step two") + body = req(srv, "GET", base)[2] + assert "

Comment: gave up on step two

" in body and "

- " not in body + + def test_the_record_file_is_read_only_after_closing_and_tampering_is_called_out(srv): base, _ = start(srv, "rtut.showcase-lighthouse-v2") post(srv, f"{base}/finalize", outcome="abandoned")