Index: src/views/shell.ejs
===================================================================
--- src/views/shell.ejs	(revision 6b8afb1fd6fd9cbf8a7e8d8d9c4c7a0bb99b5512)
+++ src/views/shell.ejs	(revision b919a67397d06a47a68126c93ca221802faa8cca)
@@ -503,11 +503,13 @@
   // Doe daarom de adresbalk-update hier zelf zodra htmx swapt. Programmatische
   // htmx.ajax-calls (boost/popstate) hebben geen elt met hx-push-url → geen dubbel.
-  document.body.addEventListener('htmx:beforeSwap', function (evt) {
+  document.body.addEventListener('htmx:beforeRequest', function (evt) {
     try {
-      var elt = evt.detail && evt.detail.elt;
-      if (!elt || !elt.getAttribute) return;
-      var u = elt.getAttribute('hx-push-url');
+      var elt = evt.detail && evt.detail.elt;       // het TRIGGERENDE element (de link)
+      if (!elt || !elt.closest) return;
+      var node = elt.closest('[hx-push-url]');
+      if (!node) return;
+      var u = node.getAttribute('hx-push-url');
       if (!u || u === 'false') return;
-      if (u !== lastPath) history.pushState({ b: 1 }, '', u);
+      if (u !== (location.pathname + location.search)) history.pushState({ b: 1 }, '', u);
       lastPath = u;
     } catch (_) {}
