Searching through threads is currently done with Fuse.js, a lightweight client side fuzzy search tool.
Over time, this will not be performant as the number of threads the user has grows. We currently have to fetch all threads, and all messages for this to work.
As part of this story, also refactor the frontend to paginate the user's threads and only the X last threads. Scrolling down in the sidenav should show a loading spinner and load more threads (paginate).
Searching through threads is currently done with Fuse.js, a lightweight client side fuzzy search tool.
Over time, this will not be performant as the number of threads the user has grows. We currently have to fetch all threads, and all messages for this to work.
Implement server side search on the SvelteKit backend using this: https://supabase.com/docs/guides/database/full-text-search?queryGroups=language&language=js
As part of this story, also refactor the frontend to paginate the user's threads and only the X last threads. Scrolling down in the sidenav should show a loading spinner and load more threads (paginate).