Status change: the htmx table-row answer is an empty row, nothing asks for it, and its test cannot fail #402
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#402
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, readingApplicationStatusView, searching the templates andstatic/js/app.jsfor posts toapplications:status, and posting to it with the test client.Checked again on 2026-10-01 against
mainat0a5cad587: still present.ApplicationStatusViewstill has a branch that answers an htmx request with a table row, for a list page that no longer posts to it. The row it renders has no cells, because the row partial draws one cell per entry incolumnsand the view does not pass any. The test that covers the branch checks only the row'sid, so it passes against an empty row.applications/views.py:557-561inApplicationStatusView.post(rendersapplications/partials/application_row.htmlwith only{"application": application}); the comment atapplications/views.py:565-567("The list page posts to the same status view and wants a table row");templates/applications/partials/application_row.html:6-14(the checkbox needsbulk_form_id, every cell needscolumns);tests/test_application_swaps.py:75-87(test_the_list_page_still_gets_its_row).POSTwithHX-Request: trueandHX-Target: application-1answers<tr id="application-1" class="…">with only whitespace inside. No page sends that request: the onlyhx-posttoapplications:statusis on the detail page's status card (partials/status_card.html:48), which is handled by thewants_a_detail_fragmentbranch above; the board card (partials/application_card.html:61) and the gone-quiet widget (widgets/gone_quiet.html:50) are plain posts, anddata-autosubmitsubmits them withrequestSubmit(), not htmx. Nothing in the sibling repositories posts to it either.request.htmxrow branch, correct the comment aboveDETAIL_TARGETS, and replacetest_the_list_page_still_gets_its_rowwith a test that an htmx request with any other target gets the ordinary redirect. If the row swap is to stay, render it with the table's context (columns=table.visible,bulk_form_id, a queryset annotated as the list's is) and make the test assert that the role and status cells are present.Done when
tests/test_application_swaps.pyeither asserts that a status post withHX-Target: application-<pk>redirects, or asserts that the returned row contains the application's title and status label; the second fails today.Related to #257 (closed), whose description of the list page asking for a swapped row no longer holds.
Landed on main with a green Forgejo CI run. Its entry in the CHANGELOG's Unreleased section ends in (#402).