Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.37 KB

File metadata and controls

47 lines (35 loc) · 1.37 KB

Refresh Functionality Debugging

Current Implementation

When 'r' is pressed:

  1. Check if we're in Status view
  2. Set is_refreshing = true and all field refresh states immediately
  3. Spawn async task to run refresh_all_fields
  4. The spawned task runs refresh for each validator/node

UI should show:

  • Footer: "r: Refresh | 🔄 Refreshing..."
  • Status field: "🔄 Checking... (node-label)"
  • Identity field: "🔄 Refreshing..."
  • Client/Version field: "🔄 Detecting..."

Test Key Added:

  • Press 't' to toggle refresh states manually
  • This helps verify if UI updates are working

Debugging Steps

  1. Test with 't' key first

    • Press 't' to toggle refresh indicators
    • If indicators show, UI updates are working
    • If not, there's an issue with state propagation
  2. Test with 'r' key

    • Press 'r' to trigger actual refresh
    • Watch for loading indicators
    • Check if UI freezes

Possible Issues

  1. UI not updating: Event loop might be blocked
  2. State not propagating: RwLock contention
  3. SSH commands blocking: Even in spawned tasks, SSH might block the runtime

Next Steps

If 't' works but 'r' doesn't:

  • The issue is likely in the SSH command execution
  • Consider using tokio::task::spawn_blocking for SSH operations

If 't' doesn't work:

  • The UI state updates aren't being reflected
  • Check the draw functions and state reading