RI-8189 Disable tutorial Run + bulk-imports on production connections#5933
Merged
KrumTy merged 1 commit intoMay 19, 2026
Merged
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
dantovska
previously approved these changes
May 18, 2026
6f6ed8e to
ae6934f
Compare
Wire useDatabaseMode into the three tutorial/sample-data write surfaces so they are disabled with a tooltip when the connected database mode is 'production': - CodeButtonBlock (Run button on tutorial code blocks) - RedisUploadButton (bulk-upload directive inside tutorial markdown) - LoadSampleData (browser empty-state "Load sample data" button) Other modes keep today's behaviour. References: #RI-8189
ae6934f to
48e1460
Compare
dantovska
approved these changes
May 19, 2026
Contributor
Code Coverage - Frontend unit tests
Test suite run success6967 tests passing in 801 suites. Report generated by 🧪jest coverage report action from 48e1460 |
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
Wire
useDatabaseModeinto the three write-data surfaces tied to tutorials / sample data, so they are disabled with a tooltip when the connected database mode isproduction. All other modes (fast,unmarked,disabled) keep today's behaviour.Gated surfaces:
Runbutton on tutorial code blocks.redis-uploadmarkdown directive.Tooltip copy (PRD-verbatim): "Button disabled for your production database to avoid accidental data modifications."
Testing
dev-prodModefeature flag on.Runbutton is disabled with the prod tooltip on hover.redis-uploaddirective (e.g. a sample-data tutorial) → bulk-upload button is disabled with the prod tooltip; clicking does nothing and no telemetry fires./browser, on an empty database (no keys) → "Load sample data" button is disabled with the prod tooltip.Unit tests: 30/30 passing.
Closes #RI-8189
Note
Medium Risk
Changes user-facing execution paths by disabling tutorial run/bulk-import controls in
productionmode; risk is mainly regressions around incorrectly disabling actions or tooltip/telemetry behavior.Overview
Prevents write-affecting tutorial/sample-data actions on production connections by wiring
useDatabaseModeinto the tutorialRunbutton (CodeButtonBlock), theredis-uploadbulk-import button (RedisUploadButton), and the browser empty-state Load sample data control (LoadSampleData).In
production, these buttons are now disabled and show a consistent tooltip message; clicks no longer open their confirmation popovers or trigger the associated actions/telemetry. Unit tests were extended to coverproductionvs non-prod behavior and tooltip visibility.Reviewed by Cursor Bugbot for commit 48e1460. Bugbot is set up for automated code reviews on this repo. Configure here.