Explorar o código

fix(webui): keep the toolbar reachable while viewing an execution

The execution banner is fixed to the top of the viewport, so it sat over the
editor toolbar and swallowed clicks meant for Save, Execute and Results. The
editor is now offset by the banner's height while it is shown, which is the
same treatment toasts already had through their offsetTop prop.

Also rebuilds the executions summary view on startup instead of reusing an
existing one. A view is metadata over a collection, so recreating it costs
nothing, and reusing it meant the view could outlive the field list it was
built from.
fszontagh hai 1 mes
pai
achega
ba0eb51e39

+ 7 - 2
src/webserver/webserver_service.cpp

@@ -243,10 +243,15 @@ void WebServerService::ensureExecutionsSummaryView() {
     // view created by this client is also queryable by it. Earlier versions
     // registered the name unqualified while queries were project-prefixed, which
     // made the view unreachable.
+    // Recreate rather than reuse. A view is metadata over a collection, so
+    // rebuilding it costs nothing, and keeping an existing one means the view
+    // silently outlives the field list below: after a database recovery the old
+    // view served documents that were no longer in the collection at all.
     for (const auto& view : storage_->listViews()) {
         if (view.name == kExecutionsSummaryView) {
-            LOG_DEBUG("Executions summary view already present");
-            return;
+            LOG_INFO("Rebuilding the executions summary view");
+            storage_->dropView(kExecutionsSummaryView);
+            break;
         }
     }
 

+ 9 - 1
webui/src/pages/WorkflowEditorPage.tsx

@@ -2025,7 +2025,15 @@ function WorkflowEditorInner() {
   }
 
   return (
-    <div className="h-full flex flex-col bg-white dark:bg-slate-900">
+    // The execution banner is fixed to the top of the viewport, so while it is
+    // shown the editor is pushed down by its height. Without this the banner
+    // sits over the toolbar and swallows clicks meant for Save, Execute and
+    // Results.
+    <div
+      className={`h-full flex flex-col bg-white dark:bg-slate-900 ${
+        isViewingExecution && pinnedExecution ? 'pt-12' : ''
+      }`}
+    >
       {/* Execution Viewer Banner */}
       {isViewingExecution && pinnedExecution && (
         <ExecutionViewerBanner