Skip to content

fix(console): REMOTE panel labels agents.toml, not the deprecated remote.toml - #72

Merged
brettchien merged 1 commit into
mainfrom
fix/remote-panel-registry-path
Aug 17, 2026
Merged

fix(console): REMOTE panel labels agents.toml, not the deprecated remote.toml#72
brettchien merged 1 commit into
mainfrom
fix/remote-panel-registry-path

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

What

The REMOTE panel's Edit config has opened the registry (agents.toml, the source of truth) since #69 — but the panel still displayed the remote.toml path (from remoteConfig.path), with a "edit this file to configure the remote connection" tooltip. So the file shown didn't match the file the button opens (visible in the latest desktop screenshot: REMOTE …/remote.toml next to an Edit config that actually opens agents.toml).

Fix

Label the registry path instead. It lives in a different view-model (RegistryConfig) than the connection view (RemoteConfig), so it's passed in rather than read off view.path:

  • remoteHtml(view, registryPath?) / renderRemote(el, view, registryPath?) — show the registry path, updated tooltip ("Edit config opens this registry file (agents.toml)") + comment.
  • refreshRemote loads registryConfig best-effort (a registry read error never blanks the connection panel) and reuses the cache a save already refreshes; both render sites pass registryConfig?.path.
  • When the registry path isn't known yet, the path label is omitted — better than mislabelling remote.toml.

No Rust / view-model change; remoteConfig.path (still remote.toml) is simply no longer surfaced.

Verification

console: tsc --noEmit clean · 86 vitest (2 new — labels agents.toml not remote.toml; omits the label when no registry path) · vite build OK.

🤖 Generated with Claude Code

…ote.toml

Since #69 the REMOTE panel's "Edit config" opens the registry (`agents.toml`,
the source of truth), but the panel still *displayed* the `remote.toml` path
(from `remoteConfig.path`) with a "configure the remote connection" tooltip —
so the shown file didn't match the file the button opens.

Label the registry path instead. It lives in a different view-model
(`RegistryConfig`) than the connection view, so `remoteHtml`/`renderRemote`
take it as a param; `refreshRemote` loads it best-effort (a registry read
error never blanks the connection panel) and re-uses the cache a save
refreshes. When the registry path isn't known yet the label is omitted —
better than mislabelling `remote.toml`.

- render.ts: `remoteHtml(view, registryPath?)` / `renderRemote(el, view,
  registryPath?)` — show the registry path, updated tooltip + comment.
- main.ts: `refreshRemote` loads `registryConfig` best-effort; both render
  sites pass `registryConfig?.path`.
- render.test.ts: +2 cases (labels agents.toml not remote.toml; omits the
  label when no registry path is known).

Verification: `tsc --noEmit` clean · 86 vitest (2 new) · `vite build` OK.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@brettchien
brettchien merged commit 51ada46 into main Aug 17, 2026
2 checks passed
@brettchien
brettchien deleted the fix/remote-panel-registry-path branch August 17, 2026 10:15
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