Skip to content

Fix monitor and node error banners - #436

Merged
ravjotbrar merged 2 commits into
mainfrom
fix/monitor-warning-modal-partial-cluster-connections
Jul 31, 2026
Merged

Fix monitor and node error banners#436
ravjotbrar merged 2 commits into
mainfrom
fix/monitor-warning-modal-partial-cluster-connections

Conversation

@ArgusLi

@ArgusLi ArgusLi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Addresses #425.

Instead of reading the current node's entry, which made the error invisible if a different node failed, monitorError is derived from the first cluster node whose MONITOR failed to start.

For the Hot Keys config changes not being reflected, the sendConfigReply now includes appliedConfig in the partial reply, so that the frontend will update config even on partial successes.

Change Visualization

image

Signed-off-by: Argus Li <argus@argusli.dev>
Comment thread apps/frontend/src/components/activity-view/hotkeys/hot-keys.tsx Outdated
Comment thread apps/frontend/src/state/valkey-features/monitor/monitorSlice.ts
Signed-off-by: ravjotb <ravjot.brar@improving.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Cluster monitoring now supports partial updates. Successful nodes return applied settings, failed nodes remain visible as partial data, and total failures preserve prior settings. Cluster selectors and activity views distinguish running nodes from node-level errors.

Changes

Cluster monitoring behavior

Layer / File(s) Summary
Applied configuration in aggregate replies
apps/server/src/actions/config.ts, apps/server/src/__tests__/config.test.ts
Aggregate replies include appliedConfig when at least one node applies the update. Total failures omit it.
Frontend configuration state handling
apps/frontend/src/state/valkey-features/config/configSlice.ts, apps/frontend/src/state/valkey-features/config/configSlice.test.ts
Partial failures apply returned monitoring fields. Total failures retain the previous monitoring configuration.
Cluster monitor aggregation and display
apps/frontend/src/state/valkey-features/monitor/monitorSlice.ts, apps/frontend/src/state/valkey-features/monitor/monitorSlice.test.ts, apps/frontend/src/components/activity-view/ActivityView.tsx, docs-site/src/content/docs/features/activity.md
Cluster monitoring reports running when any node runs, returns errors for non-running nodes, suppresses the aggregate activity error, and documents partial-start behavior.

Sequence Diagram(s)

sequenceDiagram
  participant ClusterNodes
  participant sendConfigReply
  participant configSlice
  participant ActivityView
  ClusterNodes->>sendConfigReply: Report node update outcomes
  sendConfigReply->>configSlice: Return appliedConfig for partial success
  configSlice->>ActivityView: Apply settings and partial state
  ActivityView->>ActivityView: Show node-level partial errors
Loading

Suggested reviewers: nassery318, ravjotbrar

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change to monitor and node error banners.
Description check ✅ Passed The description includes a change summary, issue reference, implementation details, and a before-and-after visualization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/frontend/src/components/activity-view/ActivityView.tsx`:
- Around line 362-364: Update the HotKeys props in ActivityView to include
selectClusterMonitorNodeErrors(clusterId) in nodeErrors for cluster routes,
while retaining the existing hotKeysNodeErrors behavior as appropriate. Keep
monitorError cleared for clusterId so MonitorNotRunningBanner continues showing
the start button.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0f6e1e32-0072-4763-91f1-198866f182d1

📥 Commits

Reviewing files that changed from the base of the PR and between 4c48393 and 4d54b3a.

📒 Files selected for processing (8)
  • apps/frontend/src/components/activity-view/ActivityView.tsx
  • apps/frontend/src/state/valkey-features/config/configSlice.test.ts
  • apps/frontend/src/state/valkey-features/config/configSlice.ts
  • apps/frontend/src/state/valkey-features/monitor/monitorSlice.test.ts
  • apps/frontend/src/state/valkey-features/monitor/monitorSlice.ts
  • apps/server/src/__tests__/config.test.ts
  • apps/server/src/actions/config.ts
  • docs-site/src/content/docs/features/activity.md

Comment on lines +362 to +364
// Cluster errors are surfaced by NodeErrorsBanner; passing monitorError
// here would hide the start button in MonitorNotRunningBanner.
monitorError={clusterId ? null : monitorError}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find every production consumer of the new selector and of monitor errors.
rg -n -C 4 --glob '*.{ts,tsx}' \
  '\bselectClusterMonitorNodeErrors\b|\bselectMonitorError\b|monitorError=|nodeErrors=' \
  apps/frontend/src

Repository: valkey-io/valkey-admin

Length of output: 13471


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== ActivityView relevant lines =="
sed -n '80,115p' apps/frontend/src/components/activity-view/ActivityView.tsx
sed -n '330,372p' apps/frontend/src/components/activity-view/ActivityView.tsx

echo
echo "== HotKeys outline and relevant implementation =="
ast-grep outline apps/frontend/src/components/activity-view/hotkeys/hot-keys.tsx --view expanded || true
sed -n '1,90p' apps/frontend/src/components/activity-view/hotkeys/hot-keys.tsx

echo
echo "== Monitor slice exports =="
sed -n '1,50p' apps/frontend/src/state/valkey-features/monitor/monitorSlice.ts

echo
echo "== NodeErrorsBanner definitions/usages =="
rg -n -C 4 --glob '*.{ts,tsx}' '<NodeErrorsBanner|NodeErrorsBanner\s+|function NodeErrorsBanner|const NodeErrorsBanner|interface NodeErrorsBanner|type NodeErrorsBanner' apps/frontend/src

Repository: valkey-io/valkey-admin

Length of output: 18600


Surface cluster MONITOR failures in HotKeys.

For cluster routes, monitorError is cleared and nodeErrors={hotKeysNodeErrors} does not include selectClusterMonitorNodeErrors. Add selectClusterMonitorNodeErrors(clusterId) and pass it as nodeErrors, while preserving the start button in MonitorNotRunningBanner.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/frontend/src/components/activity-view/ActivityView.tsx` around lines 362
- 364, Update the HotKeys props in ActivityView to include
selectClusterMonitorNodeErrors(clusterId) in nodeErrors for cluster routes,
while retaining the existing hotKeysNodeErrors behavior as appropriate. Keep
monitorError cleared for clusterId so MonitorNotRunningBanner continues showing
the start button.

@ravjotbrar
ravjotbrar merged commit a015aea into main Jul 31, 2026
9 checks passed
ravjotbrar added a commit that referenced this pull request Jul 31, 2026
* Fix monitor and node error banners.

Signed-off-by: Argus Li <argus@argusli.dev>

* Remove redundant error banner for clusters, keep for standalone

Signed-off-by: ravjotb <ravjot.brar@improving.com>

---------

Signed-off-by: Argus Li <argus@argusli.dev>
Signed-off-by: ravjotb <ravjot.brar@improving.com>
Co-authored-by: ravjotb <ravjot.brar@improving.com>
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.

START MONITOR warning modal does not handle partial cluster connections correctly

3 participants