Skip to content

Comments

🔐 add intercom test workspace keys#733

Merged
cruzdanilo merged 1 commit intomainfrom
intercom
Feb 6, 2026
Merged

🔐 add intercom test workspace keys#733
cruzdanilo merged 1 commit intomainfrom
intercom

Conversation

@dieguezguille
Copy link
Member

@dieguezguille dieguezguille commented Feb 6, 2026

Summary by CodeRabbit

  • Chores
    • Updated Intercom integration configuration to support environment-specific API key management.
    • Added test workspace key support for Intercom testing purposes.

@dieguezguille dieguezguille self-assigned this Feb 6, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

🦋 Changeset detected

Latest commit: f0a54fc

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link

Summary of Changes

Hello @dieguezguille, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the application's Intercom integration by introducing conditional API key selection based on the deployment environment, allowing for distinct Intercom workspaces for different application domains. It also refines the server's test configuration with a more specific Intercom identity key, ensuring robust testing of Intercom-related functionalities. These changes facilitate better environment management and testing practices for Intercom services.

Highlights

  • Intercom API Key Management: The Intercom plugin configuration in app.config.ts has been updated to dynamically select androidApiKey and iosApiKey based on the env.APP_DOMAIN environment variable. This allows for different Intercom workspaces to be used depending on the application's deployment environment.
  • New Intercom Test Workspace Keys: New Android and iOS Intercom API keys have been introduced for environments where env.APP_DOMAIN is not equal to 'web.exactly.app', likely supporting a dedicated test or staging Intercom workspace.
  • Server Test Configuration Update: The INTERCOM_IDENTITY_KEY in server/vitest.config.mts has been updated from a generic placeholder to a specific key, improving the realism of Intercom-related tests in the server environment.
  • Changelog Entry: A new changeset file (.changeset/violet-rabbits-appear.md) has been added to document this change as a patch release for @exactly/mobile.
Changelog
  • .changeset/violet-rabbits-appear.md
    • Added a new changeset file to document the addition of Intercom test workspace keys for a patch release of @exactly/mobile.
  • app.config.ts
    • Modified the Intercom plugin configuration to conditionally set androidApiKey and iosApiKey based on the env.APP_DOMAIN.
    • Introduced new Intercom API keys for Android and iOS for non-'web.exactly.app' domains.
  • server/vitest.config.mts
    • Updated the INTERCOM_IDENTITY_KEY from a generic placeholder to a specific value for Vitest environment variables.
Activity
  • No human activity (comments, reviews, etc.) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Walkthrough

The changes add support for test workspace Intercom keys to the mobile app. The Intercom configuration now conditionally selects API keys based on the deployment domain, and a test environment variable for Intercom identity is updated in the Vitest configuration.

Changes

Cohort / File(s) Summary
Changeset
.changeset/violet-rabbits-appear.md
Added changeset documenting a patch bump for "@exactly/mobile" with Intercom test workspace keys.
Configuration
app.config.ts, server/vitest.config.mts
Updated Intercom plugin configuration to conditionally select Android and iOS API keys based on APP_DOMAIN environment variable, and updated test Intercom identity key.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • nfmelendez
  • franm91
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and specifically describes the main change: adding Intercom test workspace keys across the configuration files and changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch intercom

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds Intercom keys for a test workspace. While the changes in app.config.ts for public keys are acceptable and follow the existing code style, a critical security issue has been identified in server/vitest.config.mts. A secret Intercom identity key has been hardcoded, which poses a significant security risk. My review includes a comment with a suggestion to load this key from environment variables to mitigate this vulnerability.

BRIDGE_API_URL: "https://bridge.test",
EXPO_PUBLIC_ALCHEMY_API_KEY: " ",
INTERCOM_IDENTITY_KEY: "intercom",
INTERCOM_IDENTITY_KEY: "a9cBeTfEtGPSQ58REZP35Bx00ofajvStEc8TTuBtSmk",

Choose a reason for hiding this comment

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

critical

A secret key (INTERCOM_IDENTITY_KEY) is hardcoded in this test configuration. Committing secrets to source control is a major security risk, even for test environments. This key should be loaded from environment variables instead. This prevents secrets from being exposed in the repository's history.

      INTERCOM_IDENTITY_KEY: env.INTERCOM_IDENTITY_KEY ?? "",

@sentry
Copy link

sentry bot commented Feb 6, 2026

✅ All tests passed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app.config.ts`:
- Around line 96-103: Extract the repeated domain check env.APP_DOMAIN ===
"web.exactly.app" into a single local boolean (e.g., const isProduction =
env.APP_DOMAIN === "web.exactly.app") declared near the top of the config, then
replace each inline check used to set androidApiKey and iosApiKey (and any other
Intercom/plugin usage) with isProduction to ensure consistency and reduce
duplication.

Comment on lines +96 to +103
androidApiKey:
env.APP_DOMAIN === "web.exactly.app"
? "android_sdk-d602d62cbdb9e8e0a6f426db847ddc74d2e26090"
: "android_sdk-e98928bdde6eeb08efe3c1a1f683756b98fc1ba1",
iosApiKey:
env.APP_DOMAIN === "web.exactly.app"
? "ios_sdk-ad6831098d9c2d69bd98e92a5ad7a4f030472a92"
: "ios_sdk-53eec69c747965af2ed69c8e0454b381f04feb86",
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider extracting the repeated domain check into a local constant.

env.APP_DOMAIN === "web.exactly.app" now appears three times (line 20, 97, 101). A single const isProduction = … near line 18–20 would keep all three usages in sync and reduce the chance of a future mismatch.

♻️ Proposed refactor

Near the top (around lines 18–20):

 if (env.EAS_BUILD_RUNNER === "eas-build") env.APP_DOMAIN ??= "web.exactly.app";
 if (env.APP_DOMAIN) env.EXPO_PUBLIC_DOMAIN = env.APP_DOMAIN;
-env.EXPO_PUBLIC_INTERCOM_APP_ID ??= env.APP_DOMAIN === "web.exactly.app" ? "eknd6y0s" : "pxd0wo85"; // cspell:ignore eknd6y0s
+const isProduction = env.APP_DOMAIN === "web.exactly.app";
+env.EXPO_PUBLIC_INTERCOM_APP_ID ??= isProduction ? "eknd6y0s" : "pxd0wo85"; // cspell:ignore eknd6y0s

Then in the Intercom plugin block:

-        androidApiKey:
-          env.APP_DOMAIN === "web.exactly.app"
-            ? "android_sdk-d602d62cbdb9e8e0a6f426db847ddc74d2e26090"
-            : "android_sdk-e98928bdde6eeb08efe3c1a1f683756b98fc1ba1",
-        iosApiKey:
-          env.APP_DOMAIN === "web.exactly.app"
-            ? "ios_sdk-ad6831098d9c2d69bd98e92a5ad7a4f030472a92"
-            : "ios_sdk-53eec69c747965af2ed69c8e0454b381f04feb86",
+        androidApiKey: isProduction
+          ? "android_sdk-d602d62cbdb9e8e0a6f426db847ddc74d2e26090"
+          : "android_sdk-e98928bdde6eeb08efe3c1a1f683756b98fc1ba1",
+        iosApiKey: isProduction
+          ? "ios_sdk-ad6831098d9c2d69bd98e92a5ad7a4f030472a92"
+          : "ios_sdk-53eec69c747965af2ed69c8e0454b381f04feb86",
🤖 Prompt for AI Agents
In `@app.config.ts` around lines 96 - 103, Extract the repeated domain check
env.APP_DOMAIN === "web.exactly.app" into a single local boolean (e.g., const
isProduction = env.APP_DOMAIN === "web.exactly.app") declared near the top of
the config, then replace each inline check used to set androidApiKey and
iosApiKey (and any other Intercom/plugin usage) with isProduction to ensure
consistency and reduce duplication.

@cruzdanilo cruzdanilo merged commit f0a54fc into main Feb 6, 2026
12 checks passed
@cruzdanilo cruzdanilo deleted the intercom branch February 6, 2026 20:15
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.

2 participants