Skip to content

Conversation

@pawelangelow
Copy link
Contributor

@pawelangelow pawelangelow commented Dec 4, 2025

What

Fixed the connection indicator (red icon) in the Database Overview not automatically clearing when the Redis connection is restored.

The issue was that auto-refresh stopped making API calls while a connectivity error was present. Now, auto-refresh continues during errors and clears the error indicator automatically when the API succeeds.

Screenshots

Before (bug persists after Redis restart)

State Screenshot
Connected before-01-connected
Disconnected before-02-disconnected
After Redis restart before-03-error-persists

After (error clears automatically)

State Screenshot
Connected after-01-connected
Disconnected after-02-disconnected
After Redis restart after-03-reconnected

Testing

  1. Connect to a Redis database
  2. Stop the Redis instance → Red error indicator should appear
  3. Start the Redis instance → Error indicator should automatically clear within the auto-refresh interval

Closes #RI-7761


Pull Request opened by Augment Code with guidance from the PR author


Note

Keep overview auto-refresh polling and clear the connectivity error on successful fetch; remove handleRefreshClick and clear connectivity error during context reset.

  • Database Overview:
    • Updates useDatabaseOverview to always dispatch getDatabaseConfigInfoAction and clear connectivityError on successful response via callback; sets lastRefreshTime after dispatch.
    • Simplifies refresh API: removes handleRefreshClick; handleRefresh now triggers data load directly.
    • Removes onRefreshClicked usage from DatabaseOverview and relies on onRefresh/onEnableAutoRefresh.
  • App Context:
    • resetDatabaseContext now dispatches setConnectivityError(null) during reset.
  • Tests:
    • Adjusts specs to reflect removal of handleRefreshClick and new behavior (expecting setConnectivityError(null) after resets and ensuring refresh dispatches config fetch).

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟢 Statements 81.49% 16321/20028
🟡 Branches 64.55% 7371/11418
🟡 Functions 70.39% 2287/3249
🟢 Lines 81.12% 15355/18927

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.32% 13948/15109
🟡 Branches 74.05% 4206/5680
🟢 Functions 85.87% 2146/2499
🟢 Lines 92.12% 13335/14475

Test suite run success

2990 tests passing in 287 suites.

Report generated by 🧪jest coverage report action from 7f64d4d

valkirilov
valkirilov previously approved these changes Dec 4, 2025
- Clear connectivity error on successful API response, avoiding stale
  closure issues where the callback captures an outdated value
- Remove unused handleRefreshClick callback since loadData() is already
  called via onRefresh

Fixes: #RI-7761
Clears stale connectivity error from previous database when user
switches to a different database, preventing brief display of error
indicator for healthy connections.

References: #RI-7761
@pawelangelow pawelangelow force-pushed the bugfix/RI-7761/fix-connection-indicator branch from 44ad0e1 to 7f64d4d Compare December 4, 2025 14:18
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.89% 21020/25360
🟡 Branches 68.03% 8841/12995
🟡 Functions 78.03% 5756/7377
🟢 Lines 83.29% 20586/24715

Test suite run success

5467 tests passing in 703 suites.

Report generated by 🧪jest coverage report action from 7f64d4d

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.

3 participants