fix(console): REMOTE panel labels agents.toml, not the deprecated remote.toml - #72
Merged
Merged
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The REMOTE panel's Edit config has opened the registry (
agents.toml, the source of truth) since #69 — but the panel still displayed theremote.tomlpath (fromremoteConfig.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.tomlnext to an Edit config that actually opensagents.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 offview.path:remoteHtml(view, registryPath?)/renderRemote(el, view, registryPath?)— show the registry path, updated tooltip ("Edit config opens this registry file (agents.toml)") + comment.refreshRemoteloadsregistryConfigbest-effort (a registry read error never blanks the connection panel) and reuses the cache a save already refreshes; both render sites passregistryConfig?.path.remote.toml.No Rust / view-model change;
remoteConfig.path(stillremote.toml) is simply no longer surfaced.Verification
console:tsc --noEmitclean · 86 vitest (2 new — labels agents.toml not remote.toml; omits the label when no registry path) ·vite buildOK.🤖 Generated with Claude Code