Saved views, Columns and the shape switch use the address the page loaded with, not the filtered one on screen #623
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#623
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, reading the Views and Columns menus andtable_views, then filtering Companies live in headless Chromium and reading the menus'nextfields.Checked again on 2026-10-01 against
mainat0a5cad587: still present.The Views and Columns menus, and the Table / Board switch on Applications, carry the page's address in a hidden
nextfield written when the page was rendered. They sit in the page header, outside the table that live filters, sorting and paging swap withhx-push-url, and nothing updates them afterwards. So after any live narrowing the address bar shows the filtered table butnextstill holds the address from page load. Keep this view as saves that old address as the view, and every other action in these menus sends the person back to the table as first loaded, without the filters, sort or page they had set.templates/partials/table/views.html:41,:57and:81:<input type="hidden" name="next" value="{{ request.get_full_path }}">in Open as this, Forget and Keep.templates/partials/table/columns.html:13: the same field in Columns (Apply, Reset and the move arrows).core/views_tables.py:60-76,table_views: the saved view isurlsplit(back).query, wherebackisnext;:88and:40redirect tonext.applications/views.py:235-241(switch_next) andtemplates/applications/application_list.html:77-85: the shape switch.templates/jobs/company_list.html:67-68,templates/jobs/listing_list.html:70,templates/applications/application_list.html:89-90), outside the swap targets.static/js/app.jshas no code that rewritesnext; the only address it reads after a swap isdata-col-here, which is inside the swapped<thead>.mexico. The table narrows and the address becomes?…location=mexico…, but everynextfield in the Views menu still reads/jobs/companies/(observed). Keep the view as "In Mexico": it is stored with an empty query, the redirect shows every company, and from then on "In Mexico" opens the unfiltered table. In the same way, saving Columns, moving a column, Open as this, Forget or switching Table / Board after filtering live returns to the page as it was first loaded.nextfrom the current address rather than from the render. Either refresh these controls on every swap (send the menus and the switch back withhx-swap-oob, as the count already is, or move them inside the swapped region), or haveapp.jsset thenextfield of these forms tolocation.pathname + location.searchon submit. The out-of-band swap keeps one source of truth on the server and needs no new script.Done when
tests/e2e/test_saved_views.pytypes a filter into a column header before pressing Keep, and the view it then opens shows only the filtered rows. Today the test loads?location=mexicowithpage.goto, so it cannot fail on this.tests/test_saved_views.pyasserts that an htmx response for a filtered table carries the Views and Columnsnextfields with the filtered query (if the out-of-band route is taken).