Forráskód Böngészése

fix(inbounds): refresh routing inbound-tag list after inbound changes

The routing-rule tag picker reads inboundTags from the xray config query
(['xray','config']), but refresh() only invalidated the inbounds/clients
buckets. So after adding, editing or deleting an inbound the tag list stayed
stale until a hard refresh wiped the react-query cache. Invalidate the xray
config query too, alongside the existing inbounds-options fix.
MHSanaei 7 órája
szülő
commit
c5ff166056
1 módosított fájl, 4 hozzáadás és 1 törlés
  1. 4 1
      frontend/src/pages/inbounds/useInbounds.ts

+ 4 - 1
frontend/src/pages/inbounds/useInbounds.ts

@@ -249,11 +249,14 @@ export function useInbounds() {
     // Invalidate at the inbounds root so both `slim` (this page's list)
     // and `options` (the Clients page's inbound picker) refetch. Without
     // the options bucket, a freshly-created inbound stays invisible in
-    // the client add/edit modal until a full page reload.
+    // the client add/edit modal until a full page reload. The xray config
+    // response carries inboundTags for the routing-rule tag picker, so it
+    // needs invalidating too or that list stays stale until a hard refresh.
     await Promise.all([
       queryClient.invalidateQueries({ queryKey: keys.inbounds.root() }),
       queryClient.invalidateQueries({ queryKey: keys.clients.onlines() }),
       queryClient.invalidateQueries({ queryKey: keys.clients.lastOnline() }),
+      queryClient.invalidateQueries({ queryKey: keys.xray.config() }),
     ]);
   }, [queryClient]);