feat(session): reset running session start time to now (#33)#54
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 <noreply@anthropic.com>
|
Staging deployment: https://timetracker-staging-feat-issue-33-reset-session-st.fly.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #33.
What
Adds a confirm-gated Reset start to now button to each running session in the session list (next to Finish / Edit / Delete). It sets
timestamp_startto the current time in one click instead of the old edit → "Set to now" → submit flow.timestamp_end is None), like the Finish button.reseticon.hx-confirmdialog before resetting (start time is overwritten).204+HX-Refresh: true(full list reload); non-htmx path redirects.Why HX-Refresh instead of an in-place row swap
The original plan was to swap the row in place via
_session_row_fragment(likeend_session). That fragment renders a legacy 4-column<tr>with noid="session-row-{pk}", incompatible with the live 6-column table — swapping it would produce a malformed row. Filed as #53. UsedHX-Refreshhere (consistent with the Finish button's full-nav behavior).Changes
games/templates/icons/reset.html— new icongames/views/session.py—reset_session_startview + list buttongames/urls.py—list_sessions_reset_session_startroutecommon/components/primitives.py—ButtonGroupgains optionalhx_confirm/hx_swapkeystests/test_rendered_pages.py), 1 e2e (e2e/test_session_reset_e2e.py)Testing
ruff format/ruff checkclean;make tscleanDesign spec:
docs/superpowers/specs/2026-06-20-issue-33-reset-session-start-to-now-design.md🤖 Generated with Claude Code