=== modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java'
--- old/src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java	2026-09-29 20:37:11 +0000
+++ new/src/com/goldencode/p2j/ui/client/gui/driver/web/GuiWebDriver.java	2026-11-20 13:33:00 +0000
@@ -2778,20 +2778,34 @@
    }
 
    /**
-    * Retrieves the effective direct upload definitions.
+    * Retrieves the effective direct upload definitions of all windows. The web client replaces the
+    * definitions of every window with the ones it receives, so the result is always the complete set.
     *
-    * @return  A map of widget IDs to lists of client direct upload definitions.
-    *          Each client direct upload definition contains information such as
-    *          widget ID, event codes, title, multiple file upload support,
-    *          upload flag, upload directory, file filters, and widget bounds.
+    * @return  A map of window IDs to lists of client direct upload definitions, or {@code null} if
+    *          neither a registration nor the state of a registered widget changed since the last
+    *          call. Each client direct upload definition contains information such as widget ID,
+    *          event codes, title, multiple file upload support, upload flag, upload directory, file
+    *          filters, and widget bounds.
     */
    private Map<Integer, List<ClientDirectUploadDef>> getDirectUploadDefinitions()
    {
       ThinClient tc = ThinClient.getInstance();
 
-      List<DirectUploadDef> list = tc.getEffectiveDirectUploads();
-      boolean nomod = tc.getDirectUploadsModcount() == directUploadsModcount;
-      Map<Integer, List<ClientDirectUploadDef>> uploadDefs = nomod ? null : new HashMap<>();
+      List<DirectUploadDef> list     = tc.getEffectiveDirectUploads();
+      int                   modcount = tc.getDirectUploadsModcount();
+      boolean               nomod    = modcount == directUploadsModcount;
+
+      directUploadsModcount = modcount;
+
+      // the web client drops the definitions of all windows before it registers the ones sent, so a
+      // state change of one registered widget (e.g. hidden or disabled) must resend the complete set
+      if (nomod &&
+          (list == null || list.stream().noneMatch(ed -> stateChanged.contains(ed.getWidgetId()))))
+      {
+         return null;
+      }
+
+      Map<Integer, List<ClientDirectUploadDef>> uploadDefs = new HashMap<>();
 
       if (list != null)
       {
@@ -2799,18 +2813,6 @@
          {
             int wid = ed.getWidgetId();
 
-            // proceed even when directUploadsModcount didn't change, but the widget encountered
-            // a state change
-            if (nomod && !stateChanged.contains(wid))
-            {
-               continue;
-            }
-
-            if (uploadDefs == null)
-            {
-               uploadDefs = new HashMap<>();
-            }
-
             Widget w = tc.getWidget(wid);
             if (w == null || !w.isVisible() || !w.isEnabled())
             {
@@ -2838,7 +2840,6 @@
          }
       }
 
-      directUploadsModcount = tc.getDirectUploadsModcount();
       return uploadDefs;
    }
 

