Skip to content

[109f] HealthBar instance switcher (Combobox wired to /api/instances) #115

@fedorovvvv

Description

@fedorovvvv

Sub-issue of #109.

Goal

Replace the static <span class="project"> in HealthBar with a Combobox that lists running instances and switches between them by changing the URL.

Scope

  • Replace template/src/widgets/health-bar/ui/HealthBar.svelte brand block:
    • If 1 instance → keep current / {project} static label (no clutter).
    • If ≥2 instances → render Combobox (mono variant, sm size) listing all instances.
  • Items: \${projectName} (primary) + \${host}:\${port} (secondary, mono).
  • Current instance: highlighted/disabled in list.
  • On select: window.location.replace('http://' + selectedInstance.id) — instance ID = host:port.
  • Data source: new /api/instances endpoint (added by 109d).
  • Polling: piggyback on existing healthPoller cadence (10s).

Forgeplan

  • PRD-029 + RFC-024

Acceptance

  • 3 instances running → all 3 appear in Combobox; selecting any other navigates browser to that instance.
  • 1 instance → no Combobox, current behavior preserved (visual nil change).
  • Type-check 0, smoke green, rule 24 grep clean.

Depends on

  • 109d (registry + /api/instances)
  • 109e (Combobox primitive)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions