diff --git a/frontend/src/contexts/SearchImageContext.tsx b/frontend/src/contexts/SearchImageContext.tsx index a4c0427..6e0c9c2 100644 --- a/frontend/src/contexts/SearchImageContext.tsx +++ b/frontend/src/contexts/SearchImageContext.tsx @@ -44,6 +44,15 @@ const getAllValues = (object: object): Array => { return loop([], object); }; +// On fast connections (or locally), the DB will send the complete update before the image has been fully saved. +// This is because it shouldn't really be an update, and that is hacky but hey. It works. +// The tech debt will be collected eventually. +// +// AND MORE IMPORTANTLY. The fucking AI agents aren't done. +// hhhhhhhhhhhhhhhhhhhhmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm +// wait groups. +const BIG_SHAME_TIMEOUT = 5000; + const SearchImageContext = createContext(); export const SearchImageContextProvider: Component = (props) => { const [images, { refetch }] = createResource(() => @@ -59,7 +68,7 @@ export const SearchImageContextProvider: Component = (props) => { setTimeout(refetch, BIG_SHAME_TIMEOUT), }} > {props.children}