From 85596da08653b092328c644e3f307b18846352fa Mon Sep 17 00:00:00 2001 From: brunorezio Date: Sat, 25 Jul 2026 22:19:00 +0100 Subject: [PATCH] fix ReferenceError in the pipeline "View in Jobs" button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The handler called onOpenChange and navigate, neither of which is in scope in PipelineRunner — they belong to TaskRunnerModal, declared further down. Clicking the button after a pipeline finished threw instead of navigating. PipelineRunner now takes an onClose prop and calls useNavigate itself. Co-Authored-By: Claude Opus 5 --- .../FileBrowserApp/components/TaskRunnerModal.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/TaskRunnerModal.tsx b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/TaskRunnerModal.tsx index 22fce617..9cbb3385 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/TaskRunnerModal.tsx +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/TaskRunnerModal.tsx @@ -1267,10 +1267,12 @@ type PipelineRunnerProps = { taskDirName: string; context: Record; cwd?: string; + onClose: () => void; }; -const PipelineRunner = ({ taskDirName, context, cwd }: PipelineRunnerProps) => { +const PipelineRunner = ({ taskDirName, context, cwd, onClose }: PipelineRunnerProps) => { const pipeline = usePipelineRunner(); + const navigate = useNavigate(); const client = useClient(); const bottomRef = useRef(null); const [inputDefs, setInputDefs] = useState | null>(null); @@ -1567,7 +1569,7 @@ const PipelineRunner = ({ taskDirName, context, cwd }: PipelineRunnerProps) => { {pipeline.jobId && (