Skip to content

Commit e1a8d86

Browse files
committed
fix(integrations): keep the Atlassian coverage hint visible, and trim comments
Cursor Bugbot: `ChipModalField` hides a `hint` whenever that field shows an `error`, so the multi-product coverage sentence vanished the moment the domain format check fired — exactly when someone mid-form most needs it. The sentence also describes the token, not the domain, so it read as domain guidance. Moves it to the API token field, which surfaces its errors through `ChipModalError` at the bottom rather than its own `error` prop, so the hint cannot be displaced. Also drops rationale comments that restated the code they sat above.
1 parent 811a39e commit e1a8d86

4 files changed

Lines changed: 11 additions & 23 deletions

File tree

apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-block-detail.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ export function IntegrationBlockDetail({ integration, workspaceId }: Integration
6767
useScrollRestoration(scrollContainerRef, { ready: !credentialsLoading })
6868

6969
/**
70-
* Credentials that authenticate this integration. Matching goes through
71-
* `credentialProviderMatchesService` so a family service account lists on
72-
* every product it powers — one Atlassian token covers Jira, Jira Service
73-
* Management, and Confluence. Comparing resolved `providerId`s instead would
74-
* hide it from all three, since `atlassian-service-account` resolves to its
75-
* own pseudo-service rather than to any product.
70+
* Matches on the service's own id *or* its service-account id, so a family
71+
* credential lists on every product it powers. Comparing resolved
72+
* `providerId`s instead hides it from all of them.
7673
*/
7774
const connectedCredentials = useMemo(() => {
7875
if (!oauthService) return []

apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ function openDocs(url: string): void {
6262
const ATLASSIAN_DOMAIN_HINT_REGEX = /^[a-z0-9-]+\.atlassian\.net$/i
6363

6464
/**
65-
* States the site-wide reach of the token up front. Users reaching this modal
66-
* from the Jira page were left unsure whether they had connected Jira or Jira
67-
* Service Management; the credential covers both, plus Confluence. Derived from
68-
* the catalog so it cannot drift as Atlassian integrations are added.
65+
* States the token's reach up front — the ambiguity this modal exists to remove.
66+
* Sits on the API token field, not Site domain: it describes the token, and
67+
* `ChipModalField` hides a `hint` whenever that field shows an `error`, which
68+
* would drop it exactly while the user is correcting a domain typo. Derived
69+
* from the catalog so it cannot drift as Atlassian integrations are added.
6970
*/
7071
const ATLASSIAN_COVERAGE_HINT = getServiceAccountCoverageSentence(
7172
ATLASSIAN_SERVICE_ACCOUNT_PROVIDER_ID
@@ -502,7 +503,7 @@ function AtlassianServiceAccountModal({
502503
Add {serviceName} service account
503504
</ChipModalHeader>
504505
<ChipModalBody>
505-
<ChipModalField type='custom' title='API token' required>
506+
<ChipModalField type='custom' title='API token' required hint={ATLASSIAN_COVERAGE_HINT}>
506507
<SecretInput
507508
value={apiToken}
508509
onChange={(value) => {
@@ -535,7 +536,6 @@ function AtlassianServiceAccountModal({
535536
? 'Atlassian sites usually look like your-team.atlassian.net.'
536537
: undefined
537538
}
538-
hint={ATLASSIAN_COVERAGE_HINT}
539539
/>
540540

541541
<ChipModalField

apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/use-service-account-connect.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ import { isHiddenUnder, overlayVisibility } from '@/blocks/visibility/context'
2828
export interface ServiceAccountConnectTarget {
2929
serviceAccountProviderId: ServiceAccountProviderId
3030
/**
31-
* Name the setup surface is titled with. For a family service account this is
32-
* the vendor ("Atlassian"), not the product page you came from — one Atlassian
33-
* token authenticates Jira, Jira Service Management, and Confluence alike, so
34-
* calling it a "Jira service account" is what made users think they had
35-
* connected the wrong product.
31+
* Name the setup surface is titled with — the vendor ("Atlassian") for a
32+
* family service account, not the product page you opened it from.
3633
*/
3734
serviceName: string
3835
serviceIcon: ComponentType<{ className?: string }>

apps/sim/app/workspace/[workspaceId]/integrations/connected/[credentialId]/connected-credential-detail.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ export function ConnectedCredentialDetail({
9696
[oauthServiceNameByProviderId]
9797
)
9898

99-
/**
100-
* Service, brand tile, and copy all come from the shared resolver so this
101-
* page, the integrations list, and the Cmd-K search agree on how a credential
102-
* is named and branded — a family service account reads as its family
103-
* ("Atlassian"), not as whichever product the provider walk happened to hit.
104-
*/
10599
const display = useMemo(
106100
() => (credential ? resolveCredentialDisplay(credential) : null),
107101
[credential]

0 commit comments

Comments
 (0)