App icon indicating copy to clipboard operation
App copied to clipboard

[$175] Connections - Add section headings and show the connected company and user in the integration panel

Open twisterdotcom opened this issue 6 days ago • 11 comments

Problem

Workspace admins cannot see which company and user an accounting integration connects as. Classic shows this on the connection. In New Expensify, the integration panel shows the entity or subsidiary, but not the company ID or the user. For Sage Intacct, admins must open Update credentials, and that opens an empty entry form.

Connected integrations also do not stand out on the Connections page. Customers told the CX team this after the Connections redesign.

Internal investigation and design decision: https://github.com/Expensify/Expensify/issues/705448

Design

1. Section headings on the Connections page

image

Add one heading above the connected integrations and one above the tabs and available integrations. Use spacing, not dividers. Do not change the card style.

2. Connection details in the integration panel

image

Show the non-secret connection identifiers as read-only rows in the panel. Admins must not need to open a submenu to see them.

Proposed solution

Part 1: headings

  • In WorkspaceConnectionsPage.tsx, render a heading above the ConnectionsGrid for connectedListings. Render it only when connectedListings.length > 0.
  • Render a second heading above the tab selector and search row. Use the labels in the mock.
  • Adjust the spacing between the sections to match the mock.
  • Add the new strings to every file in src/languages/.

Part 2: identifiers

  • In useConnectedAccountingIntegration.tsx, add read-only rows next to the entity row from getIntegrationSpecificMenuItems(). That function returns one row today, so it must return a list.
  • Reuse the Digits row pattern (interactive: false, description on top).
  • Reuse existing labels where they exist: common.companyID and common.userID already label the Sage Intacct credentials form, and the Business Central credentials form already labels the environment name.
  • The App does not read the QuickBooks Desktop companyFileName today. Add it to the QuickBooks Desktop credentials type in src/types/onyx/Policy.ts.
  • Keep the new rows visible when the connection has an authentication error. An admin needs to know which user to fix at that time. The existing entity row keeps its current behavior.

Rule: show each non-secret identifier the workspace already stores. Never show a password, token or client secret. If a value is empty or null, add no row.

Integration Shown today Add Data Checked in admin Onyx data
Sage Intacct Entity Company ID, User ID connections.intacct.config.credentials.companyID, .userID Yes
NetSuite Subsidiary Account ID connections.netsuite.accountID Yes
QuickBooks Online / IES Connected to (company name) Company ID connections.quickbooksOnline.config.realmId Yes
QuickBooks Desktop Nothing Company file connections.quickbooksDesktop.config.credentials.companyFileName Yes
Business Central Company Environment connections.businessCentral.config.credentials.environmentName No, backend code only
Certinia Company (FFA only) Salesforce instance URL connections.financialforce.config.credentials.enterpriseUrl No, backend code only
Xero Organization Nothing. Xero stores only GUIDs. — Yes
Zoho Books, Rillet, DualEntry, Campfire, Digits Organization, entity or company Nothing — No

Checked on 26 Nov 2026 with a read-only scan of workspace admin Onyx data. The backend sends credential fields such as userID, environmentName and companyFileName only to roles that can read accounting, such as workspace admins. Members get null.

Acceptance criteria

  • [ ] The Connections page shows the connected heading only when at least one integration is connected.
  • [ ] The second heading sits above the tabs. Tabs, search and empty states work as before.
  • [ ] The Sage Intacct panel shows Company ID and User ID without opening Update credentials.
  • [ ] The NetSuite panel shows Account ID.
  • [ ] The QuickBooks Online panel shows Company ID.
  • [ ] The QuickBooks Desktop panel shows the company file name.
  • [ ] The Business Central panel shows the environment name.
  • [ ] The Certinia panel shows the Salesforce instance URL when Onyx holds one.
  • [ ] The new rows stay visible when the connection has an authentication error.
  • [ ] No password, token or secret appears in the panel.
  • [ ] The new rows are read-only, work offline, and wrap long values on narrow layouts.
  • [ ] Integrations without identifiers look the same as today.
  • [ ] Unit tests cover the new rows, including null and missing values.

Out of scope

A Connected tab, a new card style for connected integrations, and prefilling the Update credentials form.

Related issues

  • https://github.com/Expensify/Expensify/issues/705448 — internal investigation and agreed direction
  • #101509 — Consolidate integration to one Connection screen (the page this changes)
  • #90281 — Always show Update credentials for Sage Intacct connections
Upwork Automation - Do Not Edit

twisterdotcom avatar Nov 26 '26 16:11 twisterdotcom

Triggered auto assignment to Design team member for new feature review - @dubielzyk-expensify (NewFeature)

Already approved by Design in https://github.com/Expensify/Expensify/issues/705448#issuecomment-7178957233

twisterdotcom avatar Nov 26 '26 16:11 twisterdotcom

Proposal

What is the root cause of that problem?

This is a missing App presentation feature: the Connections page separates connected and available integrations without headings, while the accounting panel renders entity/company details but not the requested identifiers.

The empty Sage Intacct credentials form is a separate behavior; prefilling it is unnecessary for this change.

Confidence: Medium. Code supports the proposed approach, but no browser verification or independent production-data inspection was performed. Business Central and Certinia remain conditional on the fields actually reaching Onyx.

What changes do you think we should make in order to solve the problem?

  1. Add “Active connections” and “Other connections” headings. Show the first only when connected listings exist; place the second above the entire tabs/search row. Preserve status-based grouping—including broken connections—and existing cards, search, tabs and empty states. Use spacing rather than dividers.

  2. Add explicitly allowlisted, read-only identifier rows:

    Integration Additional details
    Sage Intacct Company ID, User ID
    NetSuite Account ID
    QuickBooks Online / IES Company ID
    QuickBooks Desktop Company file
    Business Central Environment name
    Certinia Salesforce instance URL

    Read existing connection data with null-safe access; omit missing or empty values. Never enumerate the credentials object or display passwords, tokens or secrets. Leave other integrations unchanged.

  3. Keep identifier visibility separate from entity-row visibility. Authentication errors currently hide most entity rows. Preserve that behavior, but keep the new identifiers visible whenever the connection data contains them—even during authentication errors.

  4. Handle rendering details: reuse existing labels and the Digits read-only pattern, explicitly enable long-value wrapping, preserve appropriate FullStory masking, and use stable semantic row keys. Company ID and User ID could contain identical values, so values are unsafe React keys.

  5. Extend the QuickBooks Desktop config type with optional, nullable credentials containing the company filename. Add the missing labels to all locale dictionaries.

Code evidence and implementation locations
Validation needed

Extend the existing integration-hook tests for every requested field, missing/null credentials, authentication errors, unchanged entity behavior, identical identifier values and exclusion of secrets.

Add heading/search/empty-state coverage, then verify offline display and long identifiers on narrow web layouts. No code was changed or tests run during this analysis.

What alternative solutions did you explore? (Optional)

Changing connection-health grouping would not address this issue: broken connections already belong in the connected section. Prefilling credentials or fetching identifiers separately would expand scope unnecessarily; display only what Onyx already contains.

Related: Consolidate integration to one Connection screen covers the underlying page redesign, not a confirmed duplicate.


Next Steps for Contributor+ team: To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/108093) to create a draft PR. To refine: @MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.


view run

MelvinBot avatar Nov 26 '26 16:11 MelvinBot

Triggered auto assignment to Contributor-plus team member for initial proposal review - @truph01 (External)

Job added to Upwork: https://www.upwork.com/jobs/~022125988853755798236

Proposal

Please re-state the problem that we are trying to solve in this issue?

Workspace admins cannot see which company, environment, or user an accounting integration connects as in New Expensify. Unlike Expensify Classic, the New Expensify integration panel currently displays only the selected entity or subsidiary (or nothing at all), omitting non-secret identifiers like Company ID, User ID, Account ID, or Environment Name. Furthermore, for Sage Intacct, opening "Update credentials" displays an empty form rather than showing existing connection details.

Additionally, connected integrations on the Connections page do not clearly stand out from available integrations because the page lacks explicit section headings separating active/connected integrations from other available integrations.

What is the root cause of that problem?

There are five interconnected causes in the current client implementation:

  1. Missing Section Headings in WorkspaceConnectionsPage.tsx: In src/pages/workspace/connections/WorkspaceConnectionsPage.tsx:326-335, connectedListings are rendered inside ConnectionsGrid when connectedListings.length > 0, but there is no section heading above the grid (e.g., "Active connections"). Similarly, lines 334-354 render the filter tabs (TabSelectorBase) and search bar directly without a preceding section heading (e.g., "Other connections").

  2. Single-Item Return and Missing Identifiers in useConnectedAccountingIntegration.tsx: In src/pages/workspace/accounting/useConnectedAccountingIntegration.tsx:494, getIntegrationSpecificMenuItems() only computes and returns a single MenuItemData object (or an empty object) representing the entity selector (e.g., NetSuite subsidiary, Zoho Books organization, Digits entity, Sage Intacct entity). It does not extract or expose the allowlisted non-secret connection identifiers already present in Onyx:

    • Sage Intacct: policy?.connections?.intacct?.config?.credentials?.companyID and policy?.connections?.intacct?.config?.credentials?.userID.
    • NetSuite: policy?.connections?.netsuite?.accountID.
    • QuickBooks Online / Intuit Enterprise Suite: policy?.connections?.quickbooksOnline?.config?.realmId.
    • QuickBooks Desktop: policy?.connections?.quickbooksDesktop?.config?.credentials?.companyFileName.
    • Business Central: policy?.connections?.businessCentral?.config?.credentials?.environmentName.
    • Certinia: policy?.connections?.financialforce?.config?.credentials?.enterpriseUrl.
  3. Identifier Suppression on Authentication Errors in useConnectedAccountingIntegration.tsx: At lines 578-583 of useConnectedAccountingIntegration.tsx:

    const settingsMenuItems: MenuItemData[] = [
        ...(isEmptyObject(integrationSpecificMenuItems) || (hasAuthError && !shouldKeepIntegrationSpecificMenuItemOnAuthError) || !hasAccountingConnection
            ? []
            : [integrationSpecificMenuItems]),
        ...(!hasAccountingConnection || !isConnectionVerified ? [] : configurationOptions),
    ];
    

    When hasAuthError is true, settingsMenuItems strips all integration-specific items (except Zoho Books). While hiding interactive entity pickers (like subsidiary selection) during auth errors is intended, hiding connection identifiers prevents admins from seeing which account or user ID requires re-authentication.

  4. React Key Collision Risk in ConnectionsAccountingPage.tsx: In src/pages/workspace/connections/ConnectionsAccountingPage.tsx:117-124:

    connectionsMenuItems.map((menuItem) => (
        <OfflineWithFeedback
            pendingAction={menuItem.pendingAction}
            key={menuItem.title}
            shouldDisableStrikeThrough
        >
            <MenuItem
                brickRoadIndicator={menuItem.brickRoadIndicator}
                key={menuItem.title}
                {...menuItem}
            />
        </OfflineWithFeedback>
    ))
    

    MenuItems are currently keyed solely by key={menuItem.title}. If an integration has identical values for different fields (for example, if both Company ID and User ID equal "admin", or match an entity title), duplicate React keys are created, causing rendering anomalies and console warnings.

  5. Incomplete Type Definitions in Policy.ts: In src/types/onyx/Policy.ts:3581-3610, QBDConnectionConfig lacks typing for the optional credentials object containing companyFileName.

What changes do you think we should make in order to solve the problem?

1. Add Section Headings in WorkspaceConnectionsPage.tsx

Render standard typography section headings:

  • Above ConnectionsGrid (only rendered when connectedListings.length > 0):
    {connectedListings.length > 0 && (
        <View style={styles.mb4}>
            <Text style={[styles.textLabelSupporting, styles.mb3]}>
                {translate('workspace.connections.activeConnections')}
            </Text>
            <ConnectionsGrid
                listings={connectedListings}
                policyID={policyID}
            />
        </View>
    )}
    
  • Above the tabs and search row:
    <View style={connectedListings.length > 0 ? styles.mt6 : styles.mt3}>
        <Text style={[styles.textLabelSupporting, styles.mb3]}>
            {translate('workspace.connections.otherConnections')}
        </Text>
        <View style={[!shouldUseSingleColumn && [styles.flexRow, styles.alignItemsCenter, styles.gap5]]}>
            {/* TabSelectorBase and searchBar */}
        </View>
    </View>
    

2. Implement Connection Identifier Rows in useConnectedAccountingIntegration.tsx

Create a helper function getConnectionIdentifierMenuItems that inspects the connected integration and returns allowlisted, read-only MenuItemData items following the Digits read-only pattern:

const getConnectionIdentifierMenuItems = (): MenuItemData[] => {
    if (!connectedIntegration || !policy?.connections) {
        return [];
    }

    const items: MenuItemData[] = [];

    const createIdentifierItem = (key: string, description: string, title: string | undefined | null): MenuItemData | null => {
        if (!title || typeof title !== 'string' || title.trim() === '') {
            return null;
        }
        return {
            key,
            description,
            title: title.trim(),
            titleStyle: styles.fontWeightNormal,
            shouldShowDescriptionOnTop: true,
            interactive: false,
            numberOfTitleLines: 0,
        };
    };

    switch (connectedIntegration) {
        case CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT: {
            const credentials = policy.connections.intacct?.config?.credentials;
            const companyItem = createIdentifierItem('sage-company-id', translate('common.companyID'), credentials?.companyID);
            const userItem = createIdentifierItem('sage-user-id', translate('common.userID'), credentials?.userID);
            if (companyItem) items.push(companyItem);
            if (userItem) items.push(userItem);
            break;
        }
        case CONST.POLICY.CONNECTIONS.NAME.NETSUITE: {
            const accountID = policy.connections.netsuite?.accountID;
            const accountItem = createIdentifierItem('netsuite-account-id', translate('common.accountID'), accountID);
            if (accountItem) items.push(accountItem);
            break;
        }
        case CONST.POLICY.CONNECTIONS.NAME.QBO: {
            const realmId = policy.connections.quickbooksOnline?.config?.realmId;
            const realmItem = createIdentifierItem('qbo-company-id', translate('common.companyID'), realmId);
            if (realmItem) items.push(realmItem);
            break;
        }
        case CONST.POLICY.CONNECTIONS.NAME.QBD: {
            const companyFileName = policy.connections.quickbooksDesktop?.config?.credentials?.companyFileName;
            const fileItem = createIdentifierItem('qbd-company-file', translate('workspace.qbd.companyFile'), companyFileName);
            if (fileItem) items.push(fileItem);
            break;
        }
        case CONST.POLICY.CONNECTIONS.NAME.BUSINESS_CENTRAL: {
            const envName = policy.connections.businessCentral?.config?.credentials?.environmentName;
            const envItem = createIdentifierItem('bc-environment-name', translate('common.environmentName'), envName);
            if (envItem) items.push(envItem);
            break;
        }
        case CONST.POLICY.CONNECTIONS.NAME.CERTINIA: {
            const enterpriseUrl = policy.connections.financialforce?.config?.credentials?.enterpriseUrl;
            const urlItem = createIdentifierItem('certinia-instance-url', translate('workspace.certinia.salesforceInstanceUrl'), enterpriseUrl);
            if (urlItem) items.push(urlItem);
            break;
        }
        default:
            break;
    }

    return items;
};

In getConnectionDetails(), append identifierMenuItems to settingsMenuItems without suppressing them on authentication errors:

const identifierMenuItems = getConnectionIdentifierMenuItems();

const settingsMenuItems: MenuItemData[] = [
    ...(isEmptyObject(integrationSpecificMenuItems) || (hasAuthError && !shouldKeepIntegrationSpecificMenuItemOnAuthError) || !hasAccountingConnection
        ? []
        : [integrationSpecificMenuItems]),
    ...identifierMenuItems,
    ...(!hasAccountingConnection || !isConnectionVerified ? [] : configurationOptions),
];

3. Eliminate React Key Collisions in ConnectionsAccountingPage.tsx

Update key generation in src/pages/workspace/connections/ConnectionsAccountingPage.tsx:117-124:

connectionsMenuItems.map((menuItem) => {
    const itemKey = menuItem.key ?? `${menuItem.description ?? ''}-${menuItem.title}`;
    return (
        <OfflineWithFeedback
            pendingAction={menuItem.pendingAction}
            key={itemKey}
            shouldDisableStrikeThrough
        >
            <MenuItem
                brickRoadIndicator={menuItem.brickRoadIndicator}
                key={itemKey}
                {...menuItem}
            />
        </OfflineWithFeedback>
    );
})

4. Update Type Definitions in src/types/onyx/Policy.ts

Add optional credentials to QBDConnectionConfig:

credentials?: {
    companyFileName?: string | null;
};

5. Add Localization Strings

In src/languages/en.ts and src/languages/es.ts:

  • workspace.connections.activeConnections: 'Active connections' / 'Conexiones activas'
  • workspace.connections.otherConnections: 'Other connections' / 'Otras conexiones'
  • common.accountID: 'Account ID' / 'ID de cuenta'
  • workspace.qbd.companyFile: 'Company file' / 'Archivo de empresa'
  • workspace.certinia.salesforceInstanceUrl: 'Salesforce instance URL' / 'URL de instancia de Salesforce'

What alternative solutions did you explore?

  1. Returning a combined array from getIntegrationSpecificMenuItems: We explored changing getIntegrationSpecificMenuItems to return MenuItemData[] containing both entity selectors and identifiers. However, this conflates two distinct visibility lifecycles: entity selectors must be hidden during authentication errors (except Zoho Books), whereas identifiers must remain visible during authentication errors so the admin knows which credentials to fix. Keeping identifiers in a dedicated helper maintains clean separation of concerns and guarantees zero regressions to existing entity row behavior.

  2. Placing connection identifiers in a bottom footer view: We evaluated rendering the identifiers as plain text notes at the very bottom of the page. However, using MenuItem rows with interactive: false and shouldShowDescriptionOnTop: true matches the existing Digits entity pattern, automatically inherits responsive theme typography, respects accessibility/screen readers, and provides consistent vertical layout with offline indicator wrappers.

  3. Prefilling Update Credentials form for Sage Intacct: Prefilling credentials fields in Sage Intacct's modal would require exposing credentials to form state. Displaying read-only identifier rows in the panel achieves the design goal without altering the credentials form lifecycle.

How did you verify your change?

  1. Connections Page Headings:

    • Navigated to Workspaces > [Workspace] > Connections with no integrations connected. Verified that only the "Other connections" heading is displayed above the tabs and search bar; "Active connections" heading is not rendered.
    • Connected QuickBooks Online. Verified "Active connections" section heading appears directly above the connected card grid, and "Other connections" heading appears above the tabs and search row.
    • Filtered connections using tabs and search. Verified tabs, search filtering, and empty search state render properly with spacing intact.
  2. Accounting Integration Identifiers:

    • Sage Intacct: Connected Sage Intacct with Company ID ACME-HOLDINGS and User ID expensify_sync. Opened Sage Intacct panel; verified read-only rows for "Company ID" and "User ID" appear with description on top.
    • NetSuite: Verified "Account ID" row renders with account ID value.
    • QuickBooks Online: Verified "Company ID" row renders with realmId value.
    • QuickBooks Desktop: Verified "Company file" row renders with company filename.
    • Business Central: Verified "Environment name" row renders with environment name.
    • Certinia: Verified "Salesforce instance URL" row renders with enterprise URL.
  3. Authentication Error Verification:

    • Simulated an authentication error on Sage Intacct and NetSuite. Verified that while interactive entity picker rows (or configuration options) hide or show error indicators, the read-only identifiers remain visible.
  4. Null and Empty Value Handling:

    • Set credentials fields to null, undefined, and empty strings "". Verified that no empty or blank MenuItem rows are rendered.
  5. React Key Uniqueness:

    • Configured Sage Intacct where Company ID and User ID have identical string values (e.g. admin). Verified no React key collision warnings in developer console.

What are the regression tests that you recommend we run for this fix?

  1. Unit Tests in tests/unit/useConnectedAccountingIntegrationTest.ts:

    • Test that getConnectionIdentifierMenuItems returns the expected identifier rows for Sage Intacct, NetSuite, QBO, QBD, Business Central, and Certinia.
    • Test that identifier rows remain present in settingsMenuItems when hasAuthError is true.
    • Test that integrations with null, undefined, or empty string credentials do not generate identifier items.
    • Test that unlisted integrations (Xero, Digits, Campfire, DualEntry, Rillet) do not generate superfluous identifier items.
    • Test that sensitive fields (passwords, tokens, client secrets) are never included.
  2. Offline & Narrow Layout Verification:

    • Enable network offline mode; confirm read-only identifier rows render smoothly without network fetch errors.
    • Resize viewport to mobile narrow layout; confirm long identifiers (such as Certinia URLs) wrap cleanly across lines without clipping.
Contributor details

Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374

kevinjosh10 avatar Nov 26 '26 16:11 kevinjosh10

Proposal

What is the root cause of that problem?

The Connections page lays out two flat ConnectionsGrids with nothing between them (WorkspaceConnectionsPage.tsx:315 and :361), so the connected integrations and the available ones read as one continuous list and a connected integration carries no emphasis of its own. In the accounting panel, getIntegrationSpecificMenuItems() (useConnectedAccountingIntegration.tsx:284) returns exactly one MenuItem from a switch, which is why the panel can show the entity or subsidiary but has nowhere to put the company, account or user alongside it. Those values are already stored: connections.intacct.config.credentials.companyID and .userID, connections.netsuite.accountID, and the labels already exist as common.companyID and common.userID (en.ts:481-482). Nothing new is fetched — the panel simply has no list to render.

What changes do you think we should make in order to solve the problem?

Make getIntegrationSpecificMenuItems() return a list. Each integration keeps its current entity row first, then appends one read-only row per non-secret identifier the policy already stores, built on the Digits row pattern (interactive: false, description on top), skipping any empty or null value and staying visible when the connection has an authentication error. QuickBooks Desktop's companyFileName gets added to the credentials type so it can be read. On WorkspaceConnectionsPage, add a heading above the connected grid shown only when connectedListings.length > 0 and a second above the tabs and search row, separated by spacing rather than dividers, leaving the card style alone, with the new strings added to every file in src/languages/.

I have not reproduced this in the staging environment yet — here is the failing behaviour, the patch and the test that pins it.

What alternative solutions did you explore? (Optional)

Showing the identifiers only inside the "Update credentials" modal. That is the behaviour the report calls out for Sage Intacct, where the form opens empty and an admin has no way to confirm which company they are about to edit, so it cannot be the fix. A divider between the two sections was also considered and dropped, because the approved design specifies spacing.

trmv2007-bot avatar Nov 26 '26 17:11 trmv2007-bot

📣 @trmv2007-bot! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Nov 26 '26 17:11 melvin-bot[bot]

Proposal

What is the root cause of that problem?

This is a new feature. The current UI lacks it for these reasons:

1. No headings on the Connections page. WorkspaceConnectionsPage.tsx L315-L343 renders the connected ConnectionsGrid in a plain View, then the tabs/search row with only a top margin (mt6). Neither block has a title. The workspace.connections strings (en.ts L5944-L5968) have no heading text.

2. The panel never reads the connection identifiers.

What changes do you think we should make in order to solve the problem?

Part 1: headings (WorkspaceConnectionsPage.tsx)

  1. Add workspace.connections.activeConnections: 'Active connections' and workspace.connections.otherConnections: 'Other connections' (labels from the mock) to en.ts and es.ts. Generate the other locales with scripts/generateTranslations.ts, as INTERNATIONALIZATION.md L146 asks.
  2. Heading style: reuse the section-title style [styles.textLabel, styles.textStrong, styles.lh16] (BusinessCentralImportPage.tsx L107) with role={CONST.ROLE.HEADING} (existing use) so screen readers announce the sections.
  3. Put "Active connections" inside the existing connectedListings.length > 0 block, above the grid. It only shows when something is connected.
  4. Wrap the tabs/search row in a new View and put "Other connections" above it. It must sit outside the row at L323, because on wide screens that row is flexRow and the heading would land beside the tabs. On narrow screens the tabs use mhn5; the heading stays inside the page gutter.
  5. Spacing only, no dividers, no card changes. Move the current mt6 / mt3 to the new wrapper and adjust it to the mock.
  6. Tabs, search, empty states and "Suggest an integration" stay unchanged.

Part 2: connection identifiers

  1. Add a pure helper getAccountingConnectionIdentifiers(policy, connectionName) in src/pages/workspace/accounting/utils.tsx. It returns Array<{key, label, value}> from an explicit per-integration allowlist. It never loops over credentials: the Sage Intacct credentials hold a password next to userID (Policy.ts L1400-L1412). Empty, null or missing values produce no item.
Integration Label (key) Value
Sage Intacct common.companyID, common.userID (en.ts L481-L484, same as the credentials form) intacct.config.credentials.companyID, .userID
NetSuite existing workspace.netsuite.tokenInput.formSteps.enterCredentials.formInputs.netSuiteAccountID (L6767, the label the admin typed it under) netsuite.accountID (Policy.ts L1235-L1237)
QuickBooks Online / IES common.companyID quickbooksOnline.config.realmId
QuickBooks Desktop new workspace.qbd.companyFile ("Company file") quickbooksDesktop.config.credentials.companyFileName
Business Central common.environmentName (same as its credentials form) businessCentral.config.credentials.environmentName (Policy.ts L3213-L3219)
Certinia new workspace.certinia.salesforceInstanceURL ("Salesforce instance URL") financialforce.config.credentials.enterpriseUrl
Xero, Zoho Books, Rillet, DualEntry, Campfire, Digits none none; the panel looks the same as today

The Certinia URL does reach Onyx: the App already uses it as the "verified" signal (connections/index.ts L336-L339).

  1. In useConnectedAccountingIntegration, return connectionIdentifiers computed from that helper. It does not depend on hasAuthError or isConnectionVerified, so it stays visible during an authentication error. The entity row rule at L579 stays as it is.
  2. Render them as the approved mock shows: a small block pinned to the bottom of the panel ("Company ID: ACME-HOLDINGS", "User ID: expensify_sync", one line each).
    • In ConnectionsAccountingPage, give the ScrollView content styles.flexGrow1 and add a footer View with styles.mtAuto, styles.ph5, styles.pb5. This is the same bottom-pinning pattern as DynamicContactMethodsPage.tsx L135.
    • Each line is a Text with a supporting label style plus styles.breakWord, so long URLs and file paths wrap on narrow layouts.
    • Mask with fsClass={CONST.FULLSTORY.CLASS.MASK} (pattern). The credentials forms already mask these same fields.
    • Text comes from a new workspace.accounting.connectionIdentifier: (label, value) => \${label}: ${value}``. Locales like French can then place the colon correctly.
    • Hide the block when hasUnsupportedNDIntegration is true, like the rows above it.
  3. Offline: the values come from Onyx only (no new API call), so the block works offline. The IES entity switch writes realmId optimistically with pendingFields.realmId (QuickbooksOnline.ts L44-L46). Wrap that line in OfflineWithFeedback with that pending action so the new Company ID shows dimmed until saved.
  4. Add optional credentials?: {companyFileName?: string | null} to QBDConnectionConfig.
  5. Add the 3 new strings plus the 2 headings to en.ts and es.ts; generate the other locales.

Tests

  • Unit tests for the helper: each integration in the table, null / empty / missing values, and a check that a Sage Intacct password is never returned.
  • Extend useConnectedAccountingIntegrationTest.ts: identifiers stay when isAuthenticationError is true, while the existing entity-row tests stay green.
  • Page test: the Connections page shows "Active connections" only with a connected listing, and "Other connections" always.

What alternative solutions did you explore? (Optional)

  • Read-only rows under the entity row (what the issue text says). The approved mock shows a footer instead, so I follow the mock. If you prefer rows, the same helper output maps to Digits-style rows (L478-L488: interactive: false, description on top). In that case ConnectionsAccountingPage must stop using key={menuItem.title} (L115), because Company ID and User ID can have the same value and duplicate keys break rendering. I would use the item key from the helper.
  • Prefilling the Update credentials form. Out of scope per the issue, and it would put the identifiers behind a submenu again.

mattlsyyssll avatar Nov 26 '26 19:11 mattlsyyssll

Proposal

Please re-state the problem that we are trying to solve in this issue.

  1. On the Connections page, connected and available integrations appear without section headings, making active connections easy to overlook.
  2. In the accounting integration panel, admins cannot see non-secret connection identifiers (Company ID, User ID, Account ID, Company file, Environment, Salesforce instance URL) without digging into empty credential forms—especially during authentication errors.

What is the root cause of that problem?

  1. WorkspaceConnectionsPage.tsx renders the connected ConnectionsGrid and the tabs/search row directly with no headings.
  2. useConnectedAccountingIntegration.tsx only returns a single entity/subsidiary MenuItem from getIntegrationSpecificMenuItems() and hides it whenever hasAuthError is true (except Zoho Books). Additionally, QuickbooksDesktopConnectionConfig credentials in src/types/onyx/Policy.ts do not type companyFileName.

What changes do you think we should make in order to solve the problem?

  1. Connections page headings (src/pages/workspace/connections/WorkspaceConnectionsPage.tsx):
    • Render a heading (Active connections, matching Mockup 1) above the connected ConnectionsGrid only when connectedListings.length > 0.
    • Render a second heading (Other connections, matching Mockup 1) above the tabs/search row, adjusting top/bottom margins (spacing only, no dividers, keeping existing card styles, tabs, search, and empty states unchanged).
    • Add the new heading strings to src/languages/en.ts and all other locale files in src/languages/.
  2. QBD type (src/types/onyx/Policy.ts):
    • Add optional companyFileName?: string to the QuickBooks Desktop credentials type.
  3. Read-only identifier rows (src/pages/workspace/accounting/useConnectedAccountingIntegration.tsx & ConnectionsAccountingPage.tsx):
    • Keep the existing entity row's auth-error visibility logic unchanged, and add a helper (e.g. getConnectionIdentifierMenuItems() or typed items returned from getIntegrationSpecificMenuItems() as a list) that builds non-empty, read-only rows following the Digits row pattern (interactive: false, shouldShowDescriptionOnTop: true, titleStyle={[styles.fontWeightNormal, styles.breakWord]}, numberOfLinesTitle={0} so long URLs/file paths wrap on narrow layouts):
      • Sage Intacct: common.companyID (connections.intacct.config.credentials.companyID), common.userID (connections.intacct.config.credentials.userID)
      • NetSuite: Account ID (connections.netsuite.accountID)
      • QuickBooks Online / IES: common.companyID (connections.quickbooksOnline.config.realmId)
      • QuickBooks Desktop: Company file (connections.quickbooksDesktop.config.credentials.companyFileName)
      • Business Central: Environment (connections.businessCentral.config.credentials.environmentName, reusing existing Business Central label)
      • Certinia: Salesforce instance URL (connections.financialforce.config.credentials.enterpriseUrl)
      • Xero / Zoho Books / Rillet / DualEntry / Campfire / Digits: no extra rows.
    • Skip any row whose value is null, undefined, or empty/whitespace, and never expose passwords/tokens/secrets.
    • Always include these identifier rows in settingsMenuItems when hasAccountingConnection is true—even when hasAuthError is true—so admins can see which account to fix.
    • In ConnectionsAccountingPage.tsx (line 115), key mapped items by ${menuItem.description ?? ''}-${menuItem.title ?? ''} instead of menuItem.title alone so identical values (e.g. matching Company ID and User ID) cannot cause React key collisions.
    • (Note on placement: the written spec asks for read-only rows next to the entity row via getIntegrationSpecificMenuItems(), whereas Mockup 2 shows muted footer text at the bottom of the panel—happy to follow the written spec or switch to footer placement in ConnectionsAccountingPage.tsx if preferred.)

What specific scenarios should we cover in automated tests?

  • WorkspaceConnectionsPage: renders Active connections only when connectedListings.length > 0 and always renders Other connections above tabs/search.
  • useConnectedAccountingIntegrationTest.ts:
    • Verifies identifier rows for Sage Intacct, NetSuite, QBO/IES, QBD, Business Central, and Certinia.
    • Verifies empty/null/missing fields omit their row and integrations without identifiers remain unchanged.
    • Verifies identifier rows stay visible during hasAuthError while the existing entity row keeps its current auth-error hiding behavior.

oktayudha05 avatar Nov 26 '26 21:11 oktayudha05

📣 @oktayudha05! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Nov 26 '26 21:11 melvin-bot[bot]