From 2a1585831fbf7f9e26364c6029f1755f22dacf21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 20 Jun 2026 20:37:44 +0200 Subject: [PATCH] feat(session): reset running session start time to now from list Adds a confirm-gated button on running sessions in the session list that sets timestamp_start to now (issue #33). The htmx path returns HX-Refresh; ButtonGroup gains optional hx_confirm/hx_swap keys. Co-Authored-By: Claude Opus 4.8 --- common/components/primitives.py | 11 ++++- ...ue-33-reset-session-start-to-now-design.md | 39 ++++++++++------ e2e/test_session_reset_e2e.py | 46 +++++++++++++++++++ games/templates/icons/reset.html | 11 +++++ games/urls.py | 5 ++ games/views/session.py | 32 +++++++++++++ tests/test_rendered_pages.py | 42 +++++++++++++++++ 7 files changed, 170 insertions(+), 16 deletions(-) create mode 100644 e2e/test_session_reset_e2e.py create mode 100644 games/templates/icons/reset.html diff --git a/common/components/primitives.py b/common/components/primitives.py index 182194e..500211d 100644 --- a/common/components/primitives.py +++ b/common/components/primitives.py @@ -328,6 +328,8 @@ def _button_group_button( title: str = "", hx_get: str = "", hx_target: str = "", + hx_swap: str = "", + hx_confirm: str = "", ) -> Element: """Generate a single button-group button (inner