fix(session): rebuild session row fragment via shared builder (#53)#57
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Delete stale _session_row_fragment; end_session and reset_session_start return the canonical row plus an OOB navbar-playtime fragment. Clone keeps HX-Refresh since it changes row count. Fixes #53. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- SessionRowData.cell_data: list[Node | str] (date cells are str) - strengthen test_session_row_fragment_via_htmx to assert OOB navbar Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Staging deployment: https://timetracker-staging-feat-issue-53-session-row-frag.fly.dev |
…lbar Flowbite re-initialises popovers on every htmx swap. A popover hidden via Tailwind `invisible` (visibility:hidden) still occupies layout, so once Popper parks it with a transform offset it expands the table's overflow-x-auto wrapper and a spurious scrollbar appears (horizontal here, vertical in #40). Add `[&.invisible]:hidden` so the popover is removed from layout while hidden; Flowbite drops `invisible` on show, restoring display. Relates to #40. e2e regression covers no-overflow-after-swap plus popover-still-shows-on-hover. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 20, 2026
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.
Fixes #53.
Problem
_session_row_fragment()had drifted from the livelist_sessionstable (4 columns vs 6, noid="session-row-{pk}") and was effectively dead — every session action button used a plainhref(full nav), and the only htmx caller (reset_session_start) returned204 + HX-Refresh. The fragment was an independent re-implementation of a session row, free to drift.Change
session_row_data()(the row dict) +session_row()(Node wrapper). Bothlist_sessionsand the htmx fragment now render through the same builder +TableRow— no duplicated<tr>markup, drift impossible.end_sessionandreset_session_start(htmx) returnFragment(session_row(...), NavbarPlaytime(..., oob=True)): the row swaps into#session-row-{pk}and the navbar "Today · Last 7 days" totals refresh via an out-of-band swap (kept correct after the playtime recalc on save). List Finish/Reset buttons switched to htmx.new_session_from_existing_sessionreturns204 + HX-Refresh(it adds a row; sort/pagination placement can't be a single-row swap).NavbarPlaytimecomponent (id="navbar-playtime").Builders return
Node; stringification happens only at theHttpResponseboundary.Out of scope
The game-detail sessions table (different shape) keeps its full-nav buttons — standardizing all session tables on the canonical builder is tracked in #55.
Testing
session_row_data/session_rowshape,NavbarPlaytime(incl. OOB), endpoint behavior (row + OOB navbar; reset has noHX-Refresh; clone returnsHX-Refresh; non-htmx redirects).timestamp_endset.make checkgreen: ruff lint + format + ts-check + 533 tests.🤖 Generated with Claude Code