Skip to content

feat(automations): add deployment choice modal for responder automations#943

Open
FraterCCCLXIII wants to merge 2 commits into
OpenHands:mainfrom
FraterCCCLXIII:feature/deployment-choice-modal
Open

feat(automations): add deployment choice modal for responder automations#943
FraterCCCLXIII wants to merge 2 commits into
OpenHands:mainfrom
FraterCCCLXIII:feature/deployment-choice-modal

Conversation

@FraterCCCLXIII
Copy link
Copy Markdown
Contributor

Summary

When a user launches a GitHub or Slack "responder" automation on a local backend, Agent Canvas now shows a modal explaining the two available runtime options so they can pick the right path before investing time configuring the automation:

  • Setup locally — keeps everything on the user's machine, but only runs while the laptop is awake and Agent Canvas is running.
  • Connect to OpenHands — keeps responding even when the laptop is closed (links to OpenHands Cloud integrations).

The modal description also links to docs for self-hosting a cloud backend, and includes a persisted "don't show this again" preference.

Closes #868

What changed

  • New DeploymentChoiceModal (src/components/features/automations/deployment-choice-modal.tsx) — two-column local/cloud layout, docs link, and "don't show again" checkbox.
  • isResponderAutomation helper (src/utils/automation-responder.ts) gates the modal to GitHub/Slack responders.
  • useAutomationPreferencesStore (src/stores/automation-preferences-store.ts) persists the "don't show again" preference per the app's standard Zustand + localStorage pattern.
  • RecommendedAutomationsLauncher intercepts responder launches on local backends to show the modal, otherwise proceeds straight to local setup.
  • i18n keys added under DEPLOYMENT_CHOICE$* across all 15 languages.

Test plan

  • npm run typecheck
  • npm run check-translation-completeness
  • eslint on changed files
  • Unit tests: __tests__/utils/automation-responder.test.ts
  • Component flow tests: __tests__/components/automations/recommended-automations.test.tsx (18 passing) — covers modal appearance for responders, "continue with local setup", cloud link opening in a new tab, and "don't show again" persistence bypassing the modal on a subsequent mount.

Made with Cursor

When launching a GitHub or Slack "responder" automation on a local backend,
show a modal explaining the two runtime options (poll locally vs. OpenHands
Cloud) so users pick the right path before configuring. Includes a
"don't show this again" preference, a docs link for self-hosting a cloud
backend, and the cloud connect CTA.

Closes OpenHands#868

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

@FraterCCCLXIII is attempting to deploy a commit to the openhands Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Member

@HeyItsChloe HeyItsChloe left a comment

Choose a reason for hiding this comment

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

LGTM. Just one small change.

onClose,
}: DeploymentChoiceModalProps) {
const { t } = useTranslation("openhands");
const hideResponderDeploymentChoice = useAutomationPreferencesStore(
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.

We could avoid calling useAutomationPreferencesStore here directly by passing a getter & setter (dontShowAgain and onDontShowAgainChange) as props from RecommendedAutomationsLauncher.

RecommendedAutomationsLauncher already reads from the store, so adding the setter selector there and passing both values down would keep the modal purely presentational. And tests should no longer need a global store reset in beforeEach.

deployment-choice-modal.tsx

// Remove the two useAutomationPreferencesStore calls and add explicit props
interface DeploymentChoiceModalProps {
  onContinueLocal: () => void;
  onClose: () => void;
  dontShowAgain: boolean;
  onDontShowAgainChange: (value: boolean) => void;
}

export function DeploymentChoiceModal({
  onContinueLocal,
  onClose,
  dontShowAgain,
  onDontShowAgainChange,
}: DeploymentChoiceModalProps) {
  // no store access here
  // replace `hideResponderDeploymentChoice` → `dontShowAgain`
  // replace `setHideResponderDeploymentChoice` → `onDontShowAgainChange`
}

recommended-automations-launcher.tsx

// Add the setter 
const setHideResponderDeploymentChoice = useAutomationPreferencesStore(
  (state) => state.setHideResponderDeploymentChoice,
);

// Pass both into the modal
{deploymentChoice && (
  <DeploymentChoiceModal
    onContinueLocal={() => {
      const automation = deploymentChoice;
      setDeploymentChoice(null);
      proceedWithLocalSetup(automation);
    }}
    onClose={() => setDeploymentChoice(null)}
    dontShowAgain={hideResponderDeploymentChoice}
    onDontShowAgainChange={setHideResponderDeploymentChoice}
  />
)}

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.

Add deployment choice modal for GitHub and Slack responder automations

3 participants