search: cache index per locale and tighten iframe postMessage origin - #1350
search: cache index per locale and tighten iframe postMessage origin #1350avinxshKD wants to merge 2 commits into
Conversation
|
@ksen0 @doradocodes pls take a look, kept focused fixes as discussed (search fetch/index flow + postMessage origin hardening) |
|
@avinxshKD From my understanding, this PR includes 2 different fixes:
If that is the case, it's important that we have 2 different issues created and 2 separate PRs to fix them. This helps keep things organized for the repo. Please update the original issue #1249 to have an accurate title+description, and create a new issue if relevant. Then have 2 PRs for the each of those issues. Thanks! |
|
Hi @avinxshKD, following up on this. Are you still working on it? |
|
Hi @avinxshKD, this is the third follow-up on this PR. Are you still available to work on this? If you are facing any issues or are no longer able to continue, please let us know. Thank you for your work on this so far |
Im so sorry, was really busy with work and studies. Can i pick this up on this weekend? |
This changes the search flow to fetch/build the index only when locale changes, reuse the same Fuse instance for typing with a small debounce, and abort stale fetches, and it also removes wildcard postMessage usage by using same-origin target/checks.
I’m sending this as a small perf/safety cleanup for #1249 since the p5.sound part looks outdated now, but the repeated search work and loose messaging behavior were still valid to fix.
Refs #1249