RI-8188 Gate Profiler start with confirmation on production databases#5936
Open
KrumTy wants to merge 4 commits into
Open
RI-8188 Gate Profiler start with confirmation on production databases#5936KrumTy wants to merge 4 commits into
KrumTy wants to merge 4 commits into
Conversation
Extracts the Start Profiler button into a new ProfilerStartButton component that reads the connection's mode via useDatabaseMode and, when mode === 'production', intercepts the click with a Cancel/Run confirmation popover before launching the Profiler. Non-production modes start directly as before. References: #RI-8188
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
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 b2e9507. Configure here.
Renames the inline MonitorNotStarted component function to renderMonitorNotStarted and invokes it instead of rendering it as a child component. React was treating each re-render's component function as a new type and unmounting the subtree, which reset the isConfirmOpen state inside ProfilerStartButton and could close the production confirmation popover mid-decision. References: #RI-8188
Contributor
Code Coverage - Frontend unit tests
Test suite run success6968 tests passing in 803 suites. Report generated by 🧪jest coverage report action from 3eb459a |
The not-started screen was an inline function component defined inside Monitor's render body, which gave it a new function identity on every parent render. React treated each render's MonitorNotStarted as a new component type and unmounted/remounted the subtree — which reset the isConfirmOpen state inside ProfilerStartButton and could close the production confirmation popover mid-decision. Hoisting the component to module scope (in its own folder, matching the sibling MonitorLog/MonitorHeader/MonitorOutputList pattern) gives it a stable identity. saveLogValue, setSaveLogValue, and onStart are now passed explicitly as props. Replaces the renderMonitorNotStarted() workaround from 1117ccf. References: #RI-8188
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 a Cancel/Run confirmation popover that intercepts the Profiler Start button when the connected database is marked as production (
useDatabaseMode().mode === 'production'). Non-production and disabled modes start directly, preserving the existing behavior.The Start button is extracted into a new
ProfilerStartButtoncomponent that owns the popover state and the database-mode lookup, keepingMonitor.tsxas a minimal swap.Testing
jest redisinsight/ui/src/components/monitor(Monitor + new ProfilerStartButton specs).devProdModefeature flag on:Closes #RI-8188
Note
Medium Risk
Changes the Profiler start flow by adding a production-only confirmation popover; risk is limited to UI/UX but could inadvertently block or alter start behavior depending on
useDatabaseModedetection.Overview
Adds a production-safety gate to the Profiler start action: when
useDatabaseMode().mode === 'production', clicking Start Profiler now opens a Cancel/Run confirmation popover before invoking the start handler.Refactors the “not started” Profiler intro UI out of
Monitor.tsxinto a dedicatedMonitorNotStartedcomponent and introducesProfilerStartButtonto encapsulate the start/confirm logic, with new Jest unit tests covering both non-production and production flows.Reviewed by Cursor Bugbot for commit 3eb459a. Bugbot is set up for automated code reviews on this repo. Configure here.