mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
Found running the Email view's browser test against the production bundle: once in eight runs, searching for text that matches nothing still listed the previous search's card. Both views subscribe in an autorun, so a new search's subscription starts before the old one stops, and both published their page's ids into ONE shared index document; DDP's merge box shows the older subscription's value while both exist, so whenever the old one stopped late the new search showed the old rows. Each request now has its own index, keyed by its arguments (models/lib/reportPageIndex.js reportPageKey), built the same way on the server and the client (emailViewPageArgs normalizes the Email view's folder, page and search), and each view reads only the index of the request it made. Admin Panel / Problems stops its subscription before the next one, so its requests never overlap and keep a fixed id. Tests: tests/reportPageKey.test.cjs (one id per request, server and client agree, no autorun view reads a shared id); emailView and publicBoardsPage pin the keyed ids. Against a rebuilt bundle the Email view test passed 8 of 8, and with the Public Boards, Chat, Version Control and import specs 30 of 30. Thanks to xet7 !