-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
[Bug]: Control UI - Core Files refresh never shows external edits #35428
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
In the Control UI “Core Files” panel, the Refresh button only reloads the file list metadata. It never re-fetches the active file’s contents, so any edits made from the CLI (or another editor) are invisible. Saving from the UI after that silently overwrites the newer file on disk.
Workaround
Hard-refresh the entire Control UI (Shift+Reload) or restart the gateway so the cached file contents are cleared, then reopen the file.
Proposed fix
Force a re-fetch of the active file when the Refresh button is clicked:
// ui/src/ui/app-render.ts
onLoadFiles: async (agentId) => {
const active = state.agentFileActive;
await loadAgentFiles(state, agentId);
if (active && resolvedAgentId === agentId) {
await loadAgentFileContent(state, agentId, active, {
force: true,
preserveDraft: false,
});
}
};
Patch: control-ui-refresh-source.patch (attached)
Built bundle diff comes from running corepack pnpm --filter openclaw-control-ui build.
Steps to reproduce
Open Control UI → Agents → Core Files.
Select MEMORY.md (or any file). The contents load once.
In a shell, echo "test" >> MEMORY.md.
Click Refresh in the Core Files card.
Expected behavior
The text area should update to show the new line or at least provide a way to reload the file body.
Actual behavior
The file contents stay frozen at the first version that was loaded. The only way to see the new text is to reload the entire Control UI (clearing all state).
OpenClaw version
OpenClaw 2026.3.2
Operating system
Ubuntu 24.04
Install method
npm global
Logs, screenshots, and evidence
Repro is deterministic via the steps above. Example shell command:
echo "agent-web refresh test" >> /opt/agent-workspace/agent_web/MEMORY.md
After clicking Refresh in Control UI, the textarea still shows the old content. Saving from the UI removes the new line.
(No screenshots because the behavior is just the text area staying unchanged.)Impact and severity
Affected: Anyone using Control UI → Agents → Core Files while also editing files via SSH/CLI.
Severity: High (silent data loss risk).
Frequency: 100% whenever Refresh is clicked after an external edit.
Consequence: Latest persona/instructions are overwritten unless the operator reloads the entire Control UI first.
Additional information
First observed on 2026.3.2 (fresh install); earlier versions unverified.
Workaround: hard-refresh the Control UI (Shift+Reload) before editing, or avoid the Refresh button and reopen the page