feat(automations): add deployment choice modal for responder automations#943
Open
FraterCCCLXIII wants to merge 2 commits into
Open
feat(automations): add deployment choice modal for responder automations#943FraterCCCLXIII wants to merge 2 commits into
FraterCCCLXIII wants to merge 2 commits into
Conversation
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>
|
@FraterCCCLXIII is attempting to deploy a commit to the openhands Team on Vercel. A member of the Team first needs to authorize it. |
HeyItsChloe
requested changes
May 29, 2026
Member
HeyItsChloe
left a comment
There was a problem hiding this comment.
LGTM. Just one small change.
| onClose, | ||
| }: DeploymentChoiceModalProps) { | ||
| const { t } = useTranslation("openhands"); | ||
| const hideResponderDeploymentChoice = useAutomationPreferencesStore( |
Member
There was a problem hiding this comment.
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}
/>
)}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
DeploymentChoiceModal(src/components/features/automations/deployment-choice-modal.tsx) — two-column local/cloud layout, docs link, and "don't show again" checkbox.isResponderAutomationhelper (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.RecommendedAutomationsLauncherintercepts responder launches on local backends to show the modal, otherwise proceeds straight to local setup.DEPLOYMENT_CHOICE$*across all 15 languages.Test plan
npm run typechecknpm run check-translation-completenesseslinton changed files__tests__/utils/automation-responder.test.ts__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