Skip to content

fix(console): refine node health polling timeout and document CORS requirements #3

Description

@bordumb

Description

In web/app/node/page.tsx (lines 76-93), useNodeHealth polls node endpoints over plain HTTP with a rigid 8-second timeout:

const res = await fetch(`${NODE_BASE}/health`, {
  cache: "no-store",
  signal: AbortSignal.timeout(8000),
});

Root Cause

  1. Aggressive Timeout: An 8-second network delay or temporary CPU load spike on the node instantly triggers an AbortSignal exception, flipping node health to DOWN and clearing UI state.
  2. CORS Requirement: Browser fetch() calls to NODE_BASE fail with opaque network errors if remote witness nodes do not explicitly return Access-Control-Allow-Origin headers for the web app origin.

Expected Behavior

  • Implement retry logic or exponential backoff before marking a node as DOWN.
  • Add clear developer/operator documentation or warning banners regarding CORS configuration when connecting to non-local witness nodes.

Location

  • web/app/node/page.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions