Skip to content

Commit 56bcab0

Browse files
fix(cloud-agent): simplify Bitbucket repo picker banner to token replacement prompt only (#4403)
* fix(cloud-agent): remove Bitbucket connection prompt from repo picker Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> * Restore Bitbucket token replacement prompt Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> * fixup: add optional chaining for bitbucketRepoData status check Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> --------- Co-authored-by: eshurakov <54751+eshurakov@users.noreply.github.com> Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
1 parent d0fe981 commit 56bcab0

1 file changed

Lines changed: 9 additions & 21 deletions

File tree

‎apps/web/src/components/cloud-agent-next/NewSessionPanel.tsx‎

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,28 +1511,16 @@ export function NewSessionPanel({ organizationId, isDevcontainerAvailable }: New
15111511
/>
15121512
</button>
15131513
</div>
1514-
{organizationId &&
1515-
bitbucketIntegrationHref &&
1516-
bitbucketRepoData?.status &&
1517-
bitbucketRepoData.status !== 'available' && (
1514+
{(bitbucketRepoData?.status === 'reconnect_required' ||
1515+
bitbucketRepoData?.status === 'insufficient_permissions') &&
1516+
bitbucketIntegrationHref && (
15181517
<div className="border-b px-3 py-2 text-xs">
1519-
{bitbucketRepoData.status === 'temporarily_unavailable' ? (
1520-
<span className="text-muted-foreground">
1521-
Bitbucket is temporarily unavailable. Refresh repositories to try again.
1522-
</span>
1523-
) : (
1524-
<Link
1525-
href={bitbucketIntegrationHref}
1526-
className="text-link hover:text-link-hover underline underline-offset-4"
1527-
>
1528-
{bitbucketRepoData.status === 'reconnect_required' ||
1529-
bitbucketRepoData.status === 'insufficient_permissions'
1530-
? 'Replace the Bitbucket token to list repositories'
1531-
: bitbucketRepoData.status === 'invalid_request'
1532-
? 'Review the Bitbucket connection'
1533-
: 'Connect Bitbucket to list repositories'}
1534-
</Link>
1535-
)}
1518+
<Link
1519+
href={bitbucketIntegrationHref}
1520+
className="text-link hover:text-link-hover underline underline-offset-4"
1521+
>
1522+
Replace the Bitbucket token to list repositories
1523+
</Link>
15361524
</div>
15371525
)}
15381526
<CommandEmpty>No repositories match your search</CommandEmpty>

0 commit comments

Comments
 (0)