Skip to content

Conversation

@camden11
Copy link
Contributor

Description and Context

When testing legacy private app local dev on an account without sandboxes, I noticed that we still showed the sandbox prompt but the only option was to proceed with your current account. This replaces that prompt with the more generic prompt we show when your default account fits the recommended requirements (i.e. is a sandbox or dev test account).

I also updated the copy of the prompt to be more in line with the rest of the language we use in hs project dev

Screenshots

Before
Screenshot 2025-04-22 at 3 52 40 PM

After
Screenshot 2025-04-22 at 5 05 24 PM

Who to Notify

@brandenrodgers @joe-yeager @kemmerle

joe-yeager
joe-yeager previously approved these changes Apr 23, 2025
Copy link
Contributor

@joe-yeager joe-yeager 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 a nit about nesting.

Comment on lines 83 to 92
if (isDeveloperTestAccount(accountConfig)) {
bypassRecommendedAccountPrompt = true;
} else if (!hasPublicApps) {
if (isSandbox(accountConfig)) {
bypassRecommendedAccountPrompt = true;
} else {
const defaultAccountHasSandboxes = await hasSandboxes(accountConfig);
bypassRecommendedAccountPrompt = !defaultAccountHasSandboxes;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (isDeveloperTestAccount(accountConfig)) {
bypassRecommendedAccountPrompt = true;
} else if (!hasPublicApps) {
if (isSandbox(accountConfig)) {
bypassRecommendedAccountPrompt = true;
} else {
const defaultAccountHasSandboxes = await hasSandboxes(accountConfig);
bypassRecommendedAccountPrompt = !defaultAccountHasSandboxes;
}
}
if (isDeveloperTestAccount(accountConfig)) {
bypassRecommendedAccountPrompt = true;
} else if (!hasPublicApps && isSandbox(accountConfig)) {
bypassRecommendedAccountPrompt = true;
} else if (!hasPublicApps) {
const defaultAccountHasSandboxes = await hasSandboxes(accountConfig);
bypassRecommendedAccountPrompt = !defaultAccountHasSandboxes;
}

Nit: We can reduce nesting by one layer

@camden11 camden11 merged commit 9afe083 into main Apr 23, 2025
1 check passed
@camden11 camden11 deleted the hide-sandbox-prompt branch April 23, 2025 18:18
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