RI-8181 Visual environment indicators in DB list + header#5965
Merged
Conversation
Adds PROD badge and Development label, gated by the dev-prodMode feature flag, in the databases-list rows and the top instance header. Renders a subtle red gradient on the InstanceHeader container when the active connection is classified as Production. Extends the connect-to-database telemetry event with the database environment. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
The styled.div<P> generic in styled-components v5 needs the props type to extend HTMLAttributes<HTMLDivElement> for children to be allowed. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…eader spec Avoids the leading-semicolon ;(... as jest.Mock) pattern at each call site by typing the mocked selectors once at the top of the file. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Code Coverage - Frontend unit tests
Test suite run success7003 tests passing in 804 suites. Report generated by 🧪jest coverage report action from c94afde |
References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replaces the InstanceHeader linear gradient with a flat danger100 tint across the entire top bar for the production environment. Drops the fallback-prop precedence between DbStatus and EnvironmentBadge so both indicators render together in the list cell. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
OAuthConnectFreeDb was pulling environment from the currently connected instance, but the telemetry event reports the opening of a different (target) database. Source environment from firstFreeInstance so analytics reflect the actual classification of the free DB being launched. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
valkirilov
reviewed
May 27, 2026
… drop inline style - Move EnvironmentBadgeProps and EnvironmentBadgeConfig to EnvironmentBadge.types.ts; tooltip strings and BADGE_CONFIG to EnvironmentBadge.constants.ts, per the style guide. - Replace hardcoded 'production' strings with Environment.Production in the OAuth and handlers specs. - Replace the inline paddingLeft on the InstanceHeader env-badge slot with a styled FlexItem in InstanceHeader.styles.ts. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3b596e8. Configure here.
EnvironmentBadgeSlot now hides via :empty when EnvironmentBadge returns null (feature flag off, environment unspecified), so the 8px padding no longer reserves space in the header for users without a badge. References: #RI-8181 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
valkirilov
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Adds the visual layer of the Prod vs non-prod modes epic (RI-6594):
environment === Productionor the neutral Development label forenvironment === Development. Existing temporary indicators (cloud unused-db warning, "New" dot) take precedence —DbStatusnow owns that decision through afallbackprop, so there's no duplicated logic.@redis-ui/stylessemantic.color.background.danger100/200tokens) when the connection is Production.CONFIG_DATABASES_OPEN_DATABASEevent now carriesenvironmentfrom all three emission sites (databases list, OAuth connect-free-db, instances navigation popover).All visuals are gated by the existing
dev-prodModefeature flag.Testing
dev-prodModeflag on. Open Add/Edit Database, set Environment to Production → verify the PROD badge appears in the list row and next to the connection name in the top header, and the header picks up the red gradient.CONFIG_DATABASES_OPEN_DATABASEtelemetry event payload includesenvironment.Automated:
yarn lint:uicleanEnvironmentBadge.spec.tsx,DatabasesListCellName.spec.tsx, fallback cases added toDbStatus.spec.tsx, environment cases added toInstanceHeader.spec.tsx, payload assertions updated inhandlers.spec.tsandOAuthConnectFreeDb.spec.tsx.Closes #RI-8181
🤖 Generated with Claude Code
Note
Low Risk
UI-only, feature-flagged labeling and telemetry field additions with no auth or data-path changes in this diff.
Overview
Introduces a shared
EnvironmentBadge(PROD / DEV labels with tooltips) behind thedevProdModefeature flag, and wires it into the databases list row name cell and the instance header next to the active database name.The header also exposes
data-environment, applies a production danger background tint when connected to Production, and resolves environment viauseDatabaseEnvironment(so the badge hides when the flag is off).CONFIG_DATABASES_OPEN_DATABASEtelemetry now includesenvironmentwhen opening a DB from the list, OAuth free-db connect, and the instances navigation popover.Tests cover the badge, list cell, header environment cases, and updated telemetry payloads.
Reviewed by Cursor Bugbot for commit c94afde. Bugbot is set up for automated code reviews on this repo. Configure here.