Skip to content

Fix dashboard fallback auth in profile browsing (#499 regression)#710

Open
JulianMendezw wants to merge 1 commit into
outsourc-e:mainfrom
JulianMendezw:fix/dashboard-profile-fallback-auth
Open

Fix dashboard fallback auth in profile browsing (#499 regression)#710
JulianMendezw wants to merge 1 commit into
outsourc-e:mainfrom
JulianMendezw:fix/dashboard-profile-fallback-auth

Conversation

@JulianMendezw

Copy link
Copy Markdown

Summary

#499 ("Profile UI in split-host deployments returns empty list") was closed by #520, which added a dashboard-API fallback to profiles-browser.ts. That fallback authenticates against the dashboard's /api/profiles route using a static bearer token (HERMES_API_TOKEN / CLAUDE_API_TOKEN / CLAUDE_DASHBOARD_TOKEN). The dashboard's /api/profiles route does not accept static bearer tokens — it only recognizes its own ephemeral per-boot session token (scraped from the dashboard's root HTML). So the fallback request always gets a 401 and silently degrades back to the (empty) local filesystem read, meaning #499 is not actually fixed for the scenario it describes.

Confirmed this on a real split-host deployment: hermes-workspace container with no /data/hermes mount, HERMES_DASHBOARD_URL pointed at a working dashboard — /api/profiles/list returned only the synthetic default profile until this fix, then returned all real profiles afterward.

Fix

fetchDashboardProfiles() and readProfileWithFallback() now use dashboardFetch() from gateway-capabilities.ts — the same ephemeral-token scrape/retry helper skills.ts and toggle-skill.ts already use for their own dashboard-proxied routes — instead of the hand-rolled static-token fetch. Removed the now-unused getDashboardToken().

Test plan

  • Manually verified against a real split-host deployment: POST /api/auth login + GET /api/profiles/list now returns all configured profiles (previously only default) with correct model/provider/skillCount/hasEnv metadata.
  • No existing automated test covers the dashboard-fallback path; happy to add one if maintainers want it scoped into this PR.

fetchDashboardProfiles() and readProfileWithFallback() sent a static
bearer token (HERMES_API_TOKEN/CLAUDE_API_TOKEN/CLAUDE_DASHBOARD_TOKEN)
to the dashboard's /api/profiles route. That route only accepts the
dashboard's ephemeral per-boot session token, so the static token was
always rejected and the fallback silently degraded to the (empty)
local filesystem. Use dashboardFetch() from gateway-capabilities.ts
instead — the same helper skills.ts/toggle-skill.ts already use for
their dashboard proxy calls, and the only thing the dashboard accepts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@JulianMendezw
JulianMendezw requested a review from outsourc-e as a code owner July 9, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant