From 38bc27df0d55b874556187309e1e0928ac37f0ac Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Tue, 5 May 2026 17:55:24 -0700 Subject: [PATCH] =?UTF-8?q?fix(canvas/config):=20skip=20config.yaml=20fetc?= =?UTF-8?q?h=20for=20external=20/=20hermes=20runtimes=20=E2=80=94=20elimin?= =?UTF-8?q?ate=20404=20console=20noise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported on production reno-stars 2026-05-05 (browser console): /workspaces/d76977b1-…/files/config.yaml:1 Failed to load resource: the server responded with a status of 404 The workspace was an external-runtime mac-mini-style agent that doesn't use the platform's config.yaml template — every Config tab open issued a GET that 404d cleanly, and the existing catch block fell into the runtime-manages-own-config branch + populated the form from workspace metadata. Functionally correct, but the request fired anyway, surfaced as a 404 in DevTools, and burned an RTT. Fix: branch on RUNTIMES_WITH_OWN_CONFIG BEFORE the fetch — when the workspace's runtime is one of those (external, hermes), skip the GET, populate the form from workspace metadata directly, set loading=false, return. Same code path as the existing 404-catch fallback, just skipping the wasted request. Behavior preserved for runtimes that DO use the template (claude-code, etc.): unchanged GET → parse → setConfig flow. Tests: 24/24 existing ConfigTab tests pass; no behavioral change for the documented runtimes. tsc clean. Refs reno-stars production 2026-05-05. Co-Authored-By: Claude Opus 4.7 (1M context) --- canvas/src/components/tabs/ConfigTab.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/canvas/src/components/tabs/ConfigTab.tsx b/canvas/src/components/tabs/ConfigTab.tsx index 4e1bfbbf..2250f3f1 100644 --- a/canvas/src/components/tabs/ConfigTab.tsx +++ b/canvas/src/components/tabs/ConfigTab.tsx @@ -262,6 +262,27 @@ export function ConfigTab({ workspaceId }: Props) { setOriginalProvider(""); } + // Skip the config.yaml fetch entirely for runtimes that manage + // their own config (external, hermes, etc.) — they don't have a + // platform-side template, so the GET would 404. The catch block + // below handles 404 gracefully, but issuing the request adds + // browser-console noise + a wasted RTT on every open of the + // Config tab for the affected workspaces. Reported on + // production reno-stars 2026-05-05 (workspace runtime=external, + // 404 on /files/config.yaml visible in the console even though + // the form rendered correctly). + if (RUNTIMES_WITH_OWN_CONFIG.has(wsMetadataRuntime)) { + setConfig({ + ...DEFAULT_CONFIG, + runtime: wsMetadataRuntime, + model: wsMetadataModel, + ...(wsMetadataModel ? { runtime_config: { model: wsMetadataModel } } : {}), + ...(wsMetadataTier !== null ? { tier: wsMetadataTier } : {}), + } as ConfigData); + setOriginalModel(wsMetadataModel); + setLoading(false); + return; + } try { const res = await api.get<{ content: string }>(`/workspaces/${workspaceId}/files/config.yaml`); const parsed = parseYaml(res.content);