Resizing a column: every step renders the whole list page in the background and queues Columns saved. #521
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#521
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 column-width save instatic/js/app.jsand the view it posts to.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atstatic/js/app.js:2079-2102(saveWidth) andstatic/js/app.js:2190-2236(the saves onpointerup,pointercanceland the arrow keys);core/views_tables.pyandcore/tables.pyare unchanged.A column width is saved by posting to the same view as the Columns form, and that view answers every save with a success message and a redirect.
fetchfollows the redirect, so each save is a profile write plus a full render of the list page whose result is thrown away, and that discarded render is what consumes the message. The keyboard path saves on every arrow press, with no debounce and no ordering.static/js/app.js:1846-1869(saveWidth:fetch(head.dataset.colSettings, {method: "POST", …})with noredirectoption; theX-Requested-Withheader it sends is read nowhere on the server);static/js/app.js:1976-2003(a save onpointerup, onpointercanceland on every ArrowLeft or ArrowRight keydown);core/views_tables.py:34-40(table.clean_settings(request.POST, current),messages.success(request, _("Columns saved."))unlessmoveis posted,redirect(safe_next(request, "/")));core/tables.py:759-770(save_settingsreads the profile's wholetable_settings, changes one key and writes it back).204 No Contentand no message (for example whenwidthis in the POST, or on an explicit flag the script sends), and keep the redirect and message for the form. InsaveWidth, debounce the keyboard saves (save once the arrows have been still for about 400 ms, or on keyup); pointer saves are already one per drag.Done when
tests/test_tables.pypostswidth,px,orderandshowthe way the script does and asserts a 204 with no message stored, while the Columns form's post still redirects with Columns saved. It fails today and passes after the fix.Landed on main with a green Forgejo CI run. Its entry in the CHANGELOG's Unreleased section ends in (#521).