Skip to content

feat(ui): make API keys instruction configurable via NEXT_PUBLIC_API_…#3329

Open
rahulkumaar03 wants to merge 1 commit intoblockscout:mainfrom
rahulkumaar03:fixenvfiletext
Open

feat(ui): make API keys instruction configurable via NEXT_PUBLIC_API_…#3329
rahulkumaar03 wants to merge 1 commit intoblockscout:mainfrom
rahulkumaar03:fixenvfiletext

Conversation

@rahulkumaar03
Copy link
Copy Markdown

@rahulkumaar03 rahulkumaar03 commented Mar 28, 2026

Description and Related Issue(s)

The intro line on the API keys account page (“Create API keys to use for your RPC and EthRPC API requests…”) was hardcoded. This change makes it optional and environment-driven, consistent with the existing NEXT_PUBLIC_API_KEYS_ALERT_MESSAGE banner on the same page.

Proposed Changes

Make the API keys account page intro line (“Create API keys to use for your RPC and EthRPC API requests…”) configurable via environment variables, instead of hardcoded React copy.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

Note

Medium Risk
Introduces dangerouslySetInnerHTML rendering of env-provided HTML on the API keys page; misconfiguration could enable XSS or broken markup. Otherwise changes are localized to UI config/env validation and documentation.

Overview
Makes the API keys page intro text optional and environment-configurable via new NEXT_PUBLIC_API_KEYS_INSTRUCTION, replacing the previously hardcoded copy.

Plumbs the new env var through configs/app/ui.ts, adds it to the env validator schema and test .env.base, and documents it in docs/ENVS.md. The API keys page now renders the instruction HTML (when set) above the list and styles any included links.

Written by Cursor Bugbot for commit a05836a. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include @coderabbitai review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ed6744b3-824b-4356-b8b4-d8dc5e836637

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment thread ui/pages/ApiKeys.tsx
}, [ deleteModalProps ]);

const description = (
const description = apiKeysInstructionHtml ? (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @rahulkumaar03,
Thank you for your contribution. However, we would prefer to keep the current text as the default if the variable is not set.

@tom2drum tom2drum added the ENVs label Apr 1, 2026
@tom2drum tom2drum linked an issue Apr 1, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Keys page: allow modification of the helping text

3 participants