Skip to content

background compute card for OperatorExecutionTrigger#7266

Open
imanjra wants to merge 1 commit intodevelopfrom
feat/inline-bc-msg
Open

background compute card for OperatorExecutionTrigger#7266
imanjra wants to merge 1 commit intodevelopfrom
feat/inline-bc-msg

Conversation

@imanjra
Copy link
Copy Markdown
Contributor

@imanjra imanjra commented Mar 30, 2026

🔗 Related Issues

📋 What changes are proposed in this pull request?

  • Add background compute card for OperatorExecutionTrigger
  • Upgrade voodo to latest

🧪 How is this patch tested? If it is not, please explain why.

Using an operator that cannot be executed immediately

📝 Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

Release Notes

  • New Features

    • Added dedicated messaging and setup prompts when background compute configuration is required, guiding users to complete orchestrator setup.
  • Refactor

    • Consolidated orchestrator setup notifications for improved consistency across the application interface.

@imanjra imanjra requested a review from a team as a code owner March 30, 2026 22:16
@voxel51-bot
Copy link
Copy Markdown
Collaborator

Thanks for opening this pull request, @imanjra! 🎉

A maintainer will review your changes soon. In the meantime, please ensure:

  • You filled out the PR template above, completely to the best of your knowledge
  • You include tests (if applicable)
  • You read the contribution guide

Helpful resources:

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Walkthrough

This change introduces orchestrator setup requirement detection across the operator execution UI. A new RequiresOrchestrator component was created to display setup guidance. The useOperatorExecutionOptions hook was updated to expose a requiresOrchestratorSetup boolean flag alongside execution options. Two existing components (OperatorExecutionTrigger and OperatorPromptFooter) now conditionally render the orchestrator setup component based on this flag, replacing previous inline implementations with the centralized component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a background compute card component for OperatorExecutionTrigger.
Description check ✅ Passed The description fills out all required template sections with specific details about changes, testing approach, and release notes categorization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/inline-bc-msg

Comment @coderabbitai help to get the list of available commands and usage tips.

@imanjra imanjra force-pushed the feat/inline-bc-msg branch from 5a03882 to 8dfbb6d Compare March 30, 2026 22:18
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/packages/operators/src/components/OperatorExecutionTrigger/index.tsx (1)

118-139: 🧹 Nitpick | 🔵 Trivial

Consider conditionally rendering OperatorExecutionMenu when not in setup mode.

When requiresOrchestratorSetup is true, the Box (anchor element) is not rendered, so containerRef.current will be null. While the menu won't open (since clickHandler can't fire), rendering OperatorExecutionMenu with a null anchor is unnecessary.

♻️ Proposed refactor
       {!requiresOrchestratorSetup && (
         <Box ref={containerRef} onClick={clickHandler} {...props}>
           {children}
         </Box>
       )}

-      <OperatorExecutionMenu
-        anchor={containerRef.current}
-        open={isMenuOpen && !disabled}
-        onClose={() => setIsMenuOpen(false)}
-        onOptionClick={onOptionSelected}
-        executionOptions={executionOptions}
-        insideModal={insideModal}
-        anchorOrigin={menuAnchorOrigin}
-        transformOrigin={menuTransformOrigin}
-      />
+      {!requiresOrchestratorSetup && (
+        <OperatorExecutionMenu
+          anchor={containerRef.current}
+          open={isMenuOpen && !disabled}
+          onClose={() => setIsMenuOpen(false)}
+          onOptionClick={onOptionSelected}
+          executionOptions={executionOptions}
+          insideModal={insideModal}
+          anchorOrigin={menuAnchorOrigin}
+          transformOrigin={menuTransformOrigin}
+        />
+      )}
     </>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/packages/operators/src/components/OperatorExecutionTrigger/index.tsx`
around lines 118 - 139, The OperatorExecutionMenu is rendered even when
requiresOrchestratorSetup is true which means the anchor Box
(containerRef.current) doesn't exist; change rendering so OperatorExecutionMenu
is only mounted when not in setup mode (i.e., wrap or gate the
OperatorExecutionMenu with !requiresOrchestratorSetup) so it receives a valid
anchor and is not unnecessarily rendered when requiresOrchestratorSetup is true;
keep existing props (anchor, open, onClose, onOptionClick, executionOptions,
insideModal, anchorOrigin, transformOrigin) and the open logic (isMenuOpen &&
!disabled).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/packages/operators/src/components/RequiresOrchestrator.tsx`:
- Around line 12-17: The external Link component rendering the "Set up now"
Button uses target="_blank" but is missing rel="noopener noreferrer"; update the
Link element (the Link wrapping the Button in RequiresOrchestrator.tsx) to
include rel="noopener noreferrer" so new windows cannot access window.opener and
to follow best practices for external links.

In `@app/packages/operators/src/state.ts`:
- Around line 437-446: The return object explicitly maps
requiresOrchestratorSetup property but can use ES object property shorthand;
update the return in the function that calls useOperatorPromptSubmitOptions
(where options and requiresOrchestratorSetup are destructured) to return {
executionOptions: options, requiresOrchestratorSetup } instead of repeating
requiresOrchestratorSetup: requiresOrchestratorSetup.

---

Outside diff comments:
In `@app/packages/operators/src/components/OperatorExecutionTrigger/index.tsx`:
- Around line 118-139: The OperatorExecutionMenu is rendered even when
requiresOrchestratorSetup is true which means the anchor Box
(containerRef.current) doesn't exist; change rendering so OperatorExecutionMenu
is only mounted when not in setup mode (i.e., wrap or gate the
OperatorExecutionMenu with !requiresOrchestratorSetup) so it receives a valid
anchor and is not unnecessarily rendered when requiresOrchestratorSetup is true;
keep existing props (anchor, open, onClose, onOptionClick, executionOptions,
insideModal, anchorOrigin, transformOrigin) and the open logic (isMenuOpen &&
!disabled).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a616a336-3a85-47a2-b439-21894dc961a5

📥 Commits

Reviewing files that changed from the base of the PR and between 104ae4d and 8dfbb6d.

⛔ Files ignored due to path filters (2)
  • app/packages/core/package.json is excluded by !**/*.json
  • app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock, !**/*.lock
📒 Files selected for processing (4)
  • app/packages/operators/src/components/OperatorExecutionTrigger/index.tsx
  • app/packages/operators/src/components/OperatorPromptFooter.tsx
  • app/packages/operators/src/components/RequiresOrchestrator.tsx
  • app/packages/operators/src/state.ts

Comment on lines +12 to +17
<Link
href="https://docs.voxel51.com/plugins/using_plugins.html#delegated-operations"
target="_blank"
>
<Button variant={Variant.Secondary}>Set up now</Button>
</Link>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add rel="noopener noreferrer" to external link.

When using target="_blank", always include rel="noopener noreferrer" to prevent the new page from accessing window.opener (potential security risk) and to avoid performance issues.

🔒 Proposed fix
         <Link
           href="https://docs.voxel51.com/plugins/using_plugins.html#delegated-operations"
           target="_blank"
+          rel="noopener noreferrer"
         >
           <Button variant={Variant.Secondary}>Set up now</Button>
         </Link>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link
href="https://docs.voxel51.com/plugins/using_plugins.html#delegated-operations"
target="_blank"
>
<Button variant={Variant.Secondary}>Set up now</Button>
</Link>
<Link
href="https://docs.voxel51.com/plugins/using_plugins.html#delegated-operations"
target="_blank"
rel="noopener noreferrer"
>
<Button variant={Variant.Secondary}>Set up now</Button>
</Link>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/packages/operators/src/components/RequiresOrchestrator.tsx` around lines
12 - 17, The external Link component rendering the "Set up now" Button uses
target="_blank" but is missing rel="noopener noreferrer"; update the Link
element (the Link wrapping the Button in RequiresOrchestrator.tsx) to include
rel="noopener noreferrer" so new windows cannot access window.opener and to
follow best practices for external links.

Comment on lines +437 to 446
const { options, requiresOrchestratorSetup } = useOperatorPromptSubmitOptions(
operatorUri,
execDetails,
onExecute
);

return {
executionOptions: submitOptions.options,
executionOptions: options,
requiresOrchestratorSetup: requiresOrchestratorSetup,
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

LGTM - logic is correct.

The destructuring and return of requiresOrchestratorSetup correctly exposes the orchestrator setup state to consumers. Minor nit: line 445 can use object property shorthand.

✨ Optional shorthand refactor
   return {
     executionOptions: options,
-    requiresOrchestratorSetup: requiresOrchestratorSetup,
+    requiresOrchestratorSetup,
   };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { options, requiresOrchestratorSetup } = useOperatorPromptSubmitOptions(
operatorUri,
execDetails,
onExecute
);
return {
executionOptions: submitOptions.options,
executionOptions: options,
requiresOrchestratorSetup: requiresOrchestratorSetup,
};
const { options, requiresOrchestratorSetup } = useOperatorPromptSubmitOptions(
operatorUri,
execDetails,
onExecute
);
return {
executionOptions: options,
requiresOrchestratorSetup,
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/packages/operators/src/state.ts` around lines 437 - 446, The return
object explicitly maps requiresOrchestratorSetup property but can use ES object
property shorthand; update the return in the function that calls
useOperatorPromptSubmitOptions (where options and requiresOrchestratorSetup are
destructured) to return { executionOptions: options, requiresOrchestratorSetup }
instead of repeating requiresOrchestratorSetup: requiresOrchestratorSetup.

</Link>
}
/>
<RequiresOrchestrator />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a hard time reconciling the changes in this file with the changes in your other PR. It seems that both of these PRs touch a lot of the same files, and I'm not sure which set of changes is meant to supersede the other set.

Is there a way to simplify this? Could this PR use your other PR (#2469) as its target instead of the develop branch? Also, it may be possible that the other PR needs to be rebased onto the develop branch because there are some items in its diff that are already on develop.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has a subset of changes of the other PR. The changes have been pulled into other PR for testabilty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants