Skip to content

Desktop tray queries local management endpoints instead of connected hub #6920

Closed

Description

@AdamsGH

Client or integration

Other: OpenCodex Desktop tray popup

Area

Dashboard / connected-client routing

Summary

With OpenCodex Desktop connected to a remote hub, the main dashboard works, but the tray popup displays Companion settings unavailable and Status unavailable. The popup requests management endpoints on the local connected-client runtime instead of resolving the hub management target.

Expected: the tray should resolve and authenticate against the connected hub, as the main dashboard does.

Reproduction

  1. Connect an OCX 2.83.0 client to a remote hub:
    ocx connect 'https://hub.example.com' --management-url 'https://hub.example.com' --pairing-code-stdin
    Supply a valid hub invitation through stdin.
  2. Open OpenCodex Desktop and complete GUI pairing for its local browser origin, http://127.0.0.1:10100.
  3. Confirm that the main dashboard can display hub usage and provider quotas.
  4. Open the tray popup.
  5. Observe the two unavailable messages. Closing and reopening the main application does not resolve the tray failure.

Version

OpenCodex Desktop and OCX runtime: 2.83.0. Source inspected at 33b3218.

Operating system

Reported in Windows Desktop; exact Windows release was not collected. Independently reproduced using Chromium on Linux against an isolated connected OCX client runtime.

Logs or error output

The independent browser reproduction loaded http://127.0.0.1:10100/#/tray and captured:

http://127.0.0.1:10100 /api/config 404
http://127.0.0.1:10100 /api/companion/settings 404
Companion settings unavailable: 1 Status unavailable: 1

The Windows hub access logs show successful main-dashboard requests, including session bootstrap, usage and quotas, but no Desktop requests to the hub's /api/companion/settings during the tray failure. The 404 statuses above were captured in the independent Linux browser reproduction, not directly on Windows.

Likely cause

The tray entry point mounts Tray instead of App and installs the auth fetch wrapper, but does not run connected-target discovery. The main dashboard calls discoverApiTargets, configures the resolved targets and bootstraps the shared session. The tray fetch helper uses relative paths, while the auth wrapper defaults to standalone targets until targets are configured.

This appears to leave the tray targeting the local connected-client listener. No client patch has been applied or verified.

Workaround and verification limits

Opening https://hub.example.com/#/tray directly in a browser worked in the tested deployment: companion settings, configuration, usage, timeline and account requests returned 200, and neither unavailable message appeared. This deployment has authenticated management access through a reverse proxy. The workaround does not repair the native tray popup.

The automated reproduction exercised the packaged GUI in Chromium, not the Windows native webview. The Windows symptom was observed in Desktop and compared with the hub access logs.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    gui
    on Oct 10, 2026
  2. Ingwannu commented on Oct 11, 2026

    @Ingwannu
    Owner

    Source follow-up at trusted dev 433764e9d8: the reported bootstrap gap is present. gui/src/main.tsx mounts Tray directly and installs the auth-fetch wrapper, whereas App discovers/configures API targets and bootstraps the connected shared session. api.ts falls back to standalone targets before configuration; fetchTrayJson then sends relative management paths. That is a concrete source path consistent with the reported local 404s, not a new Windows-webview reproduction from me.

    The fix should reuse the existing target-discovery/session bootstrap for the tray entry point, with a loading/error boundary before its management polling starts. It should retain machine/shared-plane routing, cancellation on unmount, and existing session handling; copying a hub URL or credential into each tray fetch would create a second initialization contract.

    Focused acceptance should cover standalone tray behavior, a connected tray that sends shared endpoints to the discovered hub rather than local /api/config/companion routes, failed discovery/authentication, and unmount while discovery is pending. The direct authenticated hub URL remains a deployment-specific workaround, not proof that the native tray is repaired. No live pairing, native desktop operation or GUI implementation was performed here.

  3. added 2 commits that reference this issue on Oct 11, 2026
  4. lidge-jun commented on Oct 11, 2026

    @lidge-jun
    Owner

    Fixed on dev by #6949 (b1f39cd): the tray resolves and authenticates the connected hub before polling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions